diff --git a/base/comment-injection-objective-c/test/inputs/schema/comment-injection.schema/default/QTTopLevel.h b/head/comment-injection-objective-c/test/inputs/schema/comment-injection.schema/default/QTTopLevel.h
index 4e98030..d398b55 100644
--- a/base/comment-injection-objective-c/test/inputs/schema/comment-injection.schema/default/QTTopLevel.h
+++ b/head/comment-injection-objective-c/test/inputs/schema/comment-injection.schema/default/QTTopLevel.h
@@ -31,12 +31,6 @@ NSString   *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding en
 /// }
 /// }
 @interface QTTopLevel : NSObject
-/// Ends with a backslash \.
-@property (nonatomic, nullable, copy) NSString *trailingBackslash;
-/// Ends with a quote "
-@property (nonatomic, nullable, copy) NSString *trailingQuote;
-/// Ends with a triple quote """
-@property (nonatomic, nullable, copy) NSString *trailingTripleQuote;
 /// Property delimiters:
 /// */
 /// /*
@@ -50,6 +44,12 @@ NSString   *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding en
 /// }
 /// }
 @property (nonatomic, copy) NSString *value;
+/// Ends with a backslash \.
+@property (nonatomic, nullable, copy) NSString *trailingBackslash;
+/// Ends with a quote "
+@property (nonatomic, nullable, copy) NSString *trailingQuote;
+/// Ends with a triple quote """
+@property (nonatomic, nullable, copy) NSString *trailingTripleQuote;
 
 + (_Nullable instancetype)fromJSON:(NSString *)json encoding:(NSStringEncoding)encoding error:(NSError *_Nullable *)error;
 + (_Nullable instancetype)fromData:(NSData *)data error:(NSError *_Nullable *)error;
diff --git a/base/comment-injection-objective-c/test/inputs/schema/comment-injection.schema/default/QTTopLevel.m b/head/comment-injection-objective-c/test/inputs/schema/comment-injection.schema/default/QTTopLevel.m
index a4e986e..38548de 100644
--- a/base/comment-injection-objective-c/test/inputs/schema/comment-injection.schema/default/QTTopLevel.m
+++ b/head/comment-injection-objective-c/test/inputs/schema/comment-injection.schema/default/QTTopLevel.m
@@ -54,10 +54,10 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding enco
 {
     static NSDictionary<NSString *, NSString *> *properties;
     return properties = properties ? properties : @{
+        @"value": @"value",
         @"trailingBackslash": @"trailingBackslash",
         @"trailingQuote": @"trailingQuote",
         @"trailingTripleQuote": @"trailingTripleQuote",
-        @"value": @"value",
     };
 }
 
diff --git a/base/comment-injection-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts b/head/comment-injection-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
index 00f72f9..163aff5 100644
--- a/base/comment-injection-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
+++ b/head/comment-injection-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
@@ -22,18 +22,6 @@
  * }
  */
 export interface TopLevel {
-    /**
-     * Ends with a backslash \
-     */
-    trailingBackslash?: string;
-    /**
-     * Ends with a quote "
-     */
-    trailingQuote?: string;
-    /**
-     * Ends with a triple quote """
-     */
-    trailingTripleQuote?: string;
     /**
      * Property delimiters:
      * * /
@@ -49,6 +37,18 @@ export interface TopLevel {
      * }
      */
     value: string;
+    /**
+     * Ends with a backslash \
+     */
+    trailingBackslash?: string;
+    /**
+     * Ends with a quote "
+     */
+    trailingQuote?: string;
+    /**
+     * Ends with a triple quote """
+     */
+    trailingTripleQuote?: string;
 }
 
 // Converts JSON strings to/from your types
@@ -218,9 +218,9 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "value", js: "value", typ: "" },
         { json: "trailingBackslash", js: "trailingBackslash", typ: u(undefined, "") },
         { json: "trailingQuote", js: "trailingQuote", typ: u(undefined, "") },
         { json: "trailingTripleQuote", js: "trailingTripleQuote", typ: u(undefined, "") },
-        { json: "value", js: "value", typ: "" },
     ], false),
 };
diff --git a/base/schema-cjson/test/inputs/schema/accessors.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/accessors.schema/default/TopLevel.c
index cb311bd..cb928c7 100644
--- a/base/schema-cjson/test/inputs/schema/accessors.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/accessors.schema/default/TopLevel.c
@@ -81,13 +81,8 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
-            if (cJSON_HasObjectItem(j, "bar")) {
-                x->barre = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "bar")));
-            }
-            else {
-                if (NULL != (x->barre = cJSON_malloc(sizeof(char)))) {
-                    x->barre[0] = '\0';
-                }
+            if (cJSON_HasObjectItem(j, "union")) {
+                x->unionization = cJSON_GetUnionValue(cJSON_GetObjectItemCaseSensitive(j, "union"));
             }
             if (cJSON_HasObjectItem(j, "enum")) {
                 x->enumerification = cJSON_GetEnumValue(cJSON_GetObjectItemCaseSensitive(j, "enum"));
@@ -100,8 +95,13 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
                     x->foo[0] = '\0';
                 }
             }
-            if (cJSON_HasObjectItem(j, "union")) {
-                x->unionization = cJSON_GetUnionValue(cJSON_GetObjectItemCaseSensitive(j, "union"));
+            if (cJSON_HasObjectItem(j, "bar")) {
+                x->barre = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "bar")));
+            }
+            else {
+                if (NULL != (x->barre = cJSON_malloc(sizeof(char)))) {
+                    x->barre[0] = '\0';
+                }
             }
         }
     }
@@ -112,12 +112,7 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            if (NULL != x->barre) {
-                cJSON_AddStringToObject(j, "bar", x->barre);
-            }
-            else {
-                cJSON_AddStringToObject(j, "bar", "");
-            }
+            cJSON_AddItemToObject(j, "union", cJSON_CreateUnion(x->unionization));
             cJSON_AddItemToObject(j, "enum", cJSON_CreateEnum(x->enumerification));
             if (NULL != x->foo) {
                 cJSON_AddStringToObject(j, "foo", x->foo);
@@ -125,7 +120,12 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
             else {
                 cJSON_AddStringToObject(j, "foo", "");
             }
-            cJSON_AddItemToObject(j, "union", cJSON_CreateUnion(x->unionization));
+            if (NULL != x->barre) {
+                cJSON_AddStringToObject(j, "bar", x->barre);
+            }
+            else {
+                cJSON_AddStringToObject(j, "bar", "");
+            }
         }
     }
     return j;
@@ -145,14 +145,14 @@ char * cJSON_PrintTopLevel(const struct TopLevel * x) {
 
 void cJSON_DeleteTopLevel(struct TopLevel * x) {
     if (NULL != x) {
-        if (NULL != x->barre) {
-            cJSON_free(x->barre);
+        if (NULL != x->unionization) {
+            cJSON_DeleteUnion(x->unionization);
         }
         if (NULL != x->foo) {
             cJSON_free(x->foo);
         }
-        if (NULL != x->unionization) {
-            cJSON_DeleteUnion(x->unionization);
+        if (NULL != x->barre) {
+            cJSON_free(x->barre);
         }
         cJSON_free(x);
     }
diff --git a/base/schema-cjson/test/inputs/schema/accessors.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/accessors.schema/default/TopLevel.h
index 5cd9f05..605e831 100644
--- a/base/schema-cjson/test/inputs/schema/accessors.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/accessors.schema/default/TopLevel.h
@@ -49,10 +49,10 @@ struct Union {
 };
 
 struct TopLevel {
-    char * barre;
+    struct Union * unionization;
     enum Enum enumerification;
     char * foo;
-    struct Union * unionization;
+    char * barre;
 };
 
 enum Enum cJSON_GetEnumValue(const cJSON * j);
diff --git a/base/schema-cjson/test/inputs/schema/bool-string.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/bool-string.schema/default/TopLevel.c
index 357ced3..9ba1a71 100644
--- a/base/schema-cjson/test/inputs/schema/bool-string.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/bool-string.schema/default/TopLevel.c
@@ -62,6 +62,31 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
+            if (cJSON_HasObjectItem(j, "one")) {
+                x->one = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "one")));
+            }
+            else {
+                if (NULL != (x->one = cJSON_malloc(sizeof(char)))) {
+                    x->one[0] = '\0';
+                }
+            }
+            if (cJSON_HasObjectItem(j, "optional")) {
+                x->optional = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional")));
+            }
+            if ((cJSON_HasObjectItem(j, "nullable")) && (!cJSON_IsNull(cJSON_GetObjectItemCaseSensitive(j, "nullable")))) {
+                x->nullable = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "nullable")));
+            }
+            if (cJSON_HasObjectItem(j, "arrOne")) {
+                list_t * x1 = list_create(false, NULL);
+                if (NULL != x1) {
+                    cJSON * e1 = NULL;
+                    cJSON * j1 = cJSON_GetObjectItemCaseSensitive(j, "arrOne");
+                    cJSON_ArrayForEach(e1, j1) {
+                        list_add_tail(x1, strdup(cJSON_GetStringValue(e1)), sizeof(char *));
+                    }
+                    x->arr_one = x1;
+                }
+            }
             if (cJSON_HasObjectItem(j, "arrNullable")) {
                 list_t * x1 = list_create(false, NULL);
                 if (NULL != x1) {
@@ -78,31 +103,6 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
                     x->arr_nullable = x1;
                 }
             }
-            if (cJSON_HasObjectItem(j, "arrOne")) {
-                list_t * x1 = list_create(false, NULL);
-                if (NULL != x1) {
-                    cJSON * e1 = NULL;
-                    cJSON * j1 = cJSON_GetObjectItemCaseSensitive(j, "arrOne");
-                    cJSON_ArrayForEach(e1, j1) {
-                        list_add_tail(x1, strdup(cJSON_GetStringValue(e1)), sizeof(char *));
-                    }
-                    x->arr_one = x1;
-                }
-            }
-            if ((cJSON_HasObjectItem(j, "nullable")) && (!cJSON_IsNull(cJSON_GetObjectItemCaseSensitive(j, "nullable")))) {
-                x->nullable = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "nullable")));
-            }
-            if (cJSON_HasObjectItem(j, "one")) {
-                x->one = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "one")));
-            }
-            else {
-                if (NULL != (x->one = cJSON_malloc(sizeof(char)))) {
-                    x->one[0] = '\0';
-                }
-            }
-            if (cJSON_HasObjectItem(j, "optional")) {
-                x->optional = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional")));
-            }
             if (cJSON_HasObjectItem(j, "unionWithBool")) {
                 x->union_with_bool = cJSON_GetUnionWithBoolValue(cJSON_GetObjectItemCaseSensitive(j, "unionWithBool"));
             }
@@ -118,6 +118,31 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
+            if (NULL != x->one) {
+                cJSON_AddStringToObject(j, "one", x->one);
+            }
+            else {
+                cJSON_AddStringToObject(j, "one", "");
+            }
+            if (NULL != x->optional) {
+                cJSON_AddStringToObject(j, "optional", x->optional);
+            }
+            if (NULL != x->nullable) {
+                cJSON_AddStringToObject(j, "nullable", x->nullable);
+            }
+            else {
+                cJSON_AddNullToObject(j, "nullable");
+            }
+            if (NULL != x->arr_one) {
+                cJSON * j1 = cJSON_AddArrayToObject(j, "arrOne");
+                if (NULL != j1) {
+                    char * x1 = list_get_head(x->arr_one);
+                    while (NULL != x1) {
+                        cJSON_AddItemToArray(j1, cJSON_CreateString(x1));
+                        x1 = list_get_next(x->arr_one);
+                    }
+                }
+            }
             if (NULL != x->arr_nullable) {
                 cJSON * j1 = cJSON_AddArrayToObject(j, "arrNullable");
                 if (NULL != j1) {
@@ -133,31 +158,6 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
                     }
                 }
             }
-            if (NULL != x->arr_one) {
-                cJSON * j1 = cJSON_AddArrayToObject(j, "arrOne");
-                if (NULL != j1) {
-                    char * x1 = list_get_head(x->arr_one);
-                    while (NULL != x1) {
-                        cJSON_AddItemToArray(j1, cJSON_CreateString(x1));
-                        x1 = list_get_next(x->arr_one);
-                    }
-                }
-            }
-            if (NULL != x->nullable) {
-                cJSON_AddStringToObject(j, "nullable", x->nullable);
-            }
-            else {
-                cJSON_AddNullToObject(j, "nullable");
-            }
-            if (NULL != x->one) {
-                cJSON_AddStringToObject(j, "one", x->one);
-            }
-            else {
-                cJSON_AddStringToObject(j, "one", "");
-            }
-            if (NULL != x->optional) {
-                cJSON_AddStringToObject(j, "optional", x->optional);
-            }
             cJSON_AddItemToObject(j, "unionWithBool", cJSON_CreateUnionWithBool(x->union_with_bool));
             cJSON_AddItemToObject(j, "unionWithBoolAndEnum", cJSON_CreateUnionWithBool(x->union_with_bool_and_enum));
         }
@@ -179,15 +179,14 @@ char * cJSON_PrintTopLevel(const struct TopLevel * x) {
 
 void cJSON_DeleteTopLevel(struct TopLevel * x) {
     if (NULL != x) {
-        if (NULL != x->arr_nullable) {
-            char * x1 = list_get_head(x->arr_nullable);
-            while (NULL != x1) {
-                if ((void *)0xDEADBEEF != x1) {
-                    cJSON_free(x1);
-                }
-                x1 = list_get_next(x->arr_nullable);
-            }
-            list_release(x->arr_nullable);
+        if (NULL != x->one) {
+            cJSON_free(x->one);
+        }
+        if (NULL != x->optional) {
+            cJSON_free(x->optional);
+        }
+        if (NULL != x->nullable) {
+            cJSON_free(x->nullable);
         }
         if (NULL != x->arr_one) {
             char * x1 = list_get_head(x->arr_one);
@@ -197,14 +196,15 @@ void cJSON_DeleteTopLevel(struct TopLevel * x) {
             }
             list_release(x->arr_one);
         }
-        if (NULL != x->nullable) {
-            cJSON_free(x->nullable);
-        }
-        if (NULL != x->one) {
-            cJSON_free(x->one);
-        }
-        if (NULL != x->optional) {
-            cJSON_free(x->optional);
+        if (NULL != x->arr_nullable) {
+            char * x1 = list_get_head(x->arr_nullable);
+            while (NULL != x1) {
+                if ((void *)0xDEADBEEF != x1) {
+                    cJSON_free(x1);
+                }
+                x1 = list_get_next(x->arr_nullable);
+            }
+            list_release(x->arr_nullable);
         }
         if (NULL != x->union_with_bool) {
             cJSON_DeleteUnionWithBool(x->union_with_bool);
diff --git a/base/schema-cjson/test/inputs/schema/bool-string.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/bool-string.schema/default/TopLevel.h
index 2633300..0c02ee3 100644
--- a/base/schema-cjson/test/inputs/schema/bool-string.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/bool-string.schema/default/TopLevel.h
@@ -43,11 +43,11 @@ struct UnionWithBool {
 };
 
 struct TopLevel {
-    list_t * arr_nullable;
-    list_t * arr_one;
-    char * nullable;
     char * one;
     char * optional;
+    char * nullable;
+    list_t * arr_one;
+    list_t * arr_nullable;
     struct UnionWithBool * union_with_bool;
     struct UnionWithBool * union_with_bool_and_enum;
 };
diff --git a/base/schema-cjson/test/inputs/schema/comment-injection.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/comment-injection.schema/default/TopLevel.c
index f203297..4b7d5c8 100644
--- a/base/schema-cjson/test/inputs/schema/comment-injection.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/comment-injection.schema/default/TopLevel.c
@@ -22,6 +22,14 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
+            if (cJSON_HasObjectItem(j, "value")) {
+                x->value = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "value")));
+            }
+            else {
+                if (NULL != (x->value = cJSON_malloc(sizeof(char)))) {
+                    x->value[0] = '\0';
+                }
+            }
             if (cJSON_HasObjectItem(j, "trailingBackslash")) {
                 x->trailing_backslash = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "trailingBackslash")));
             }
@@ -31,14 +39,6 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
             if (cJSON_HasObjectItem(j, "trailingTripleQuote")) {
                 x->trailing_triple_quote = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "trailingTripleQuote")));
             }
-            if (cJSON_HasObjectItem(j, "value")) {
-                x->value = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "value")));
-            }
-            else {
-                if (NULL != (x->value = cJSON_malloc(sizeof(char)))) {
-                    x->value[0] = '\0';
-                }
-            }
         }
     }
     return x;
@@ -48,6 +48,12 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
+            if (NULL != x->value) {
+                cJSON_AddStringToObject(j, "value", x->value);
+            }
+            else {
+                cJSON_AddStringToObject(j, "value", "");
+            }
             if (NULL != x->trailing_backslash) {
                 cJSON_AddStringToObject(j, "trailingBackslash", x->trailing_backslash);
             }
@@ -57,12 +63,6 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
             if (NULL != x->trailing_triple_quote) {
                 cJSON_AddStringToObject(j, "trailingTripleQuote", x->trailing_triple_quote);
             }
-            if (NULL != x->value) {
-                cJSON_AddStringToObject(j, "value", x->value);
-            }
-            else {
-                cJSON_AddStringToObject(j, "value", "");
-            }
         }
     }
     return j;
@@ -82,6 +82,9 @@ char * cJSON_PrintTopLevel(const struct TopLevel * x) {
 
 void cJSON_DeleteTopLevel(struct TopLevel * x) {
     if (NULL != x) {
+        if (NULL != x->value) {
+            cJSON_free(x->value);
+        }
         if (NULL != x->trailing_backslash) {
             cJSON_free(x->trailing_backslash);
         }
@@ -91,9 +94,6 @@ void cJSON_DeleteTopLevel(struct TopLevel * x) {
         if (NULL != x->trailing_triple_quote) {
             cJSON_free(x->trailing_triple_quote);
         }
-        if (NULL != x->value) {
-            cJSON_free(x->value);
-        }
         cJSON_free(x);
     }
 }
diff --git a/base/schema-cjson/test/inputs/schema/comment-injection.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/comment-injection.schema/default/TopLevel.h
index c08b10c..0b05b7e 100644
--- a/base/schema-cjson/test/inputs/schema/comment-injection.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/comment-injection.schema/default/TopLevel.h
@@ -49,18 +49,6 @@ extern "C" {
  * }
  */
 struct TopLevel {
-    /**
-     * Ends with a backslash \.
-     */
-    char * trailing_backslash;
-    /**
-     * Ends with a quote "
-     */
-    char * trailing_quote;
-    /**
-     * Ends with a triple quote """
-     */
-    char * trailing_triple_quote;
     /**
      * Property delimiters:
      * * /
@@ -76,6 +64,18 @@ struct TopLevel {
      * }
      */
     char * value;
+    /**
+     * Ends with a backslash \.
+     */
+    char * trailing_backslash;
+    /**
+     * Ends with a quote "
+     */
+    char * trailing_quote;
+    /**
+     * Ends with a triple quote """
+     */
+    char * trailing_triple_quote;
 };
 
 struct TopLevel * cJSON_ParseTopLevel(const char * s);
diff --git a/base/schema-cjson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.c
index 4d0fc54..4498ada 100644
--- a/base/schema-cjson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.c
@@ -22,14 +22,6 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
-            if (cJSON_HasObjectItem(j, "bar")) {
-                x->bar = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "bar")));
-            }
-            else {
-                if (NULL != (x->bar = cJSON_malloc(sizeof(char)))) {
-                    x->bar[0] = '\0';
-                }
-            }
             if (cJSON_HasObjectItem(j, "foo")) {
                 x->foo = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "foo")));
             }
@@ -38,6 +30,14 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
                     x->foo[0] = '\0';
                 }
             }
+            if (cJSON_HasObjectItem(j, "bar")) {
+                x->bar = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "bar")));
+            }
+            else {
+                if (NULL != (x->bar = cJSON_malloc(sizeof(char)))) {
+                    x->bar[0] = '\0';
+                }
+            }
         }
     }
     return x;
@@ -47,18 +47,18 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            if (NULL != x->bar) {
-                cJSON_AddStringToObject(j, "bar", x->bar);
-            }
-            else {
-                cJSON_AddStringToObject(j, "bar", "");
-            }
             if (NULL != x->foo) {
                 cJSON_AddStringToObject(j, "foo", x->foo);
             }
             else {
                 cJSON_AddStringToObject(j, "foo", "");
             }
+            if (NULL != x->bar) {
+                cJSON_AddStringToObject(j, "bar", x->bar);
+            }
+            else {
+                cJSON_AddStringToObject(j, "bar", "");
+            }
         }
     }
     return j;
@@ -78,12 +78,12 @@ char * cJSON_PrintTopLevel(const struct TopLevel * x) {
 
 void cJSON_DeleteTopLevel(struct TopLevel * x) {
     if (NULL != x) {
-        if (NULL != x->bar) {
-            cJSON_free(x->bar);
-        }
         if (NULL != x->foo) {
             cJSON_free(x->foo);
         }
+        if (NULL != x->bar) {
+            cJSON_free(x->bar);
+        }
         cJSON_free(x);
     }
 }
diff --git a/base/schema-cjson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.h
index 6de1886..591cfed 100644
--- a/base/schema-cjson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.h
@@ -35,8 +35,8 @@ extern "C" {
 #endif
 
 struct TopLevel {
-    char * bar;
     char * foo;
+    char * bar;
 };
 
 struct TopLevel * cJSON_ParseTopLevel(const char * s);
diff --git a/base/schema-cjson/test/inputs/schema/date-time.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/date-time.schema/default/TopLevel.c
index 7f9b054..2ecedfc 100644
--- a/base/schema-cjson/test/inputs/schema/date-time.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/date-time.schema/default/TopLevel.c
@@ -62,20 +62,6 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
-            if (cJSON_HasObjectItem(j, "complex-union-array")) {
-                list_t * x1 = list_create(false, NULL);
-                if (NULL != x1) {
-                    cJSON * e1 = NULL;
-                    cJSON * j1 = cJSON_GetObjectItemCaseSensitive(j, "complex-union-array");
-                    cJSON_ArrayForEach(e1, j1) {
-                        list_add_tail(x1, cJSON_GetComplexUnionArrayValue(e1), sizeof(struct ComplexUnionArray *));
-                    }
-                    x->complex_union_array = x1;
-                }
-            }
-            else {
-                x->complex_union_array = list_create(false, NULL);
-            }
             if (cJSON_HasObjectItem(j, "date")) {
                 x->date = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "date")));
             }
@@ -84,14 +70,6 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
                     x->date[0] = '\0';
                 }
             }
-            if (cJSON_HasObjectItem(j, "date-time")) {
-                x->date_time = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "date-time")));
-            }
-            else {
-                if (NULL != (x->date_time = cJSON_malloc(sizeof(char)))) {
-                    x->date_time[0] = '\0';
-                }
-            }
             if (cJSON_HasObjectItem(j, "time")) {
                 x->time = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "time")));
             }
@@ -100,6 +78,14 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
                     x->time[0] = '\0';
                 }
             }
+            if (cJSON_HasObjectItem(j, "date-time")) {
+                x->date_time = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "date-time")));
+            }
+            else {
+                if (NULL != (x->date_time = cJSON_malloc(sizeof(char)))) {
+                    x->date_time[0] = '\0';
+                }
+            }
             if (cJSON_HasObjectItem(j, "union-array")) {
                 list_t * x1 = list_create(false, NULL);
                 if (NULL != x1) {
@@ -114,6 +100,20 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
             else {
                 x->union_array = list_create(false, NULL);
             }
+            if (cJSON_HasObjectItem(j, "complex-union-array")) {
+                list_t * x1 = list_create(false, NULL);
+                if (NULL != x1) {
+                    cJSON * e1 = NULL;
+                    cJSON * j1 = cJSON_GetObjectItemCaseSensitive(j, "complex-union-array");
+                    cJSON_ArrayForEach(e1, j1) {
+                        list_add_tail(x1, cJSON_GetComplexUnionArrayValue(e1), sizeof(struct ComplexUnionArray *));
+                    }
+                    x->complex_union_array = x1;
+                }
+            }
+            else {
+                x->complex_union_array = list_create(false, NULL);
+            }
         }
     }
     return x;
@@ -123,34 +123,24 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            if (NULL != x->complex_union_array) {
-                cJSON * j1 = cJSON_AddArrayToObject(j, "complex-union-array");
-                if (NULL != j1) {
-                    struct ComplexUnionArray * x1 = list_get_head(x->complex_union_array);
-                    while (NULL != x1) {
-                        cJSON_AddItemToArray(j1, cJSON_CreateComplexUnionArray(x1));
-                        x1 = list_get_next(x->complex_union_array);
-                    }
-                }
-            }
             if (NULL != x->date) {
                 cJSON_AddStringToObject(j, "date", x->date);
             }
             else {
                 cJSON_AddStringToObject(j, "date", "");
             }
-            if (NULL != x->date_time) {
-                cJSON_AddStringToObject(j, "date-time", x->date_time);
-            }
-            else {
-                cJSON_AddStringToObject(j, "date-time", "");
-            }
             if (NULL != x->time) {
                 cJSON_AddStringToObject(j, "time", x->time);
             }
             else {
                 cJSON_AddStringToObject(j, "time", "");
             }
+            if (NULL != x->date_time) {
+                cJSON_AddStringToObject(j, "date-time", x->date_time);
+            }
+            else {
+                cJSON_AddStringToObject(j, "date-time", "");
+            }
             if (NULL != x->union_array) {
                 cJSON * j1 = cJSON_AddArrayToObject(j, "union-array");
                 if (NULL != j1) {
@@ -161,6 +151,16 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
                     }
                 }
             }
+            if (NULL != x->complex_union_array) {
+                cJSON * j1 = cJSON_AddArrayToObject(j, "complex-union-array");
+                if (NULL != j1) {
+                    struct ComplexUnionArray * x1 = list_get_head(x->complex_union_array);
+                    while (NULL != x1) {
+                        cJSON_AddItemToArray(j1, cJSON_CreateComplexUnionArray(x1));
+                        x1 = list_get_next(x->complex_union_array);
+                    }
+                }
+            }
         }
     }
     return j;
@@ -180,23 +180,15 @@ char * cJSON_PrintTopLevel(const struct TopLevel * x) {
 
 void cJSON_DeleteTopLevel(struct TopLevel * x) {
     if (NULL != x) {
-        if (NULL != x->complex_union_array) {
-            struct ComplexUnionArray * x1 = list_get_head(x->complex_union_array);
-            while (NULL != x1) {
-                cJSON_DeleteComplexUnionArray(x1);
-                x1 = list_get_next(x->complex_union_array);
-            }
-            list_release(x->complex_union_array);
-        }
         if (NULL != x->date) {
             cJSON_free(x->date);
         }
-        if (NULL != x->date_time) {
-            cJSON_free(x->date_time);
-        }
         if (NULL != x->time) {
             cJSON_free(x->time);
         }
+        if (NULL != x->date_time) {
+            cJSON_free(x->date_time);
+        }
         if (NULL != x->union_array) {
             char * x1 = list_get_head(x->union_array);
             while (NULL != x1) {
@@ -205,6 +197,14 @@ void cJSON_DeleteTopLevel(struct TopLevel * x) {
             }
             list_release(x->union_array);
         }
+        if (NULL != x->complex_union_array) {
+            struct ComplexUnionArray * x1 = list_get_head(x->complex_union_array);
+            while (NULL != x1) {
+                cJSON_DeleteComplexUnionArray(x1);
+                x1 = list_get_next(x->complex_union_array);
+            }
+            list_release(x->complex_union_array);
+        }
         cJSON_free(x);
     }
 }
diff --git a/base/schema-cjson/test/inputs/schema/date-time.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/date-time.schema/default/TopLevel.h
index d82e3db..8b0f972 100644
--- a/base/schema-cjson/test/inputs/schema/date-time.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/date-time.schema/default/TopLevel.h
@@ -43,11 +43,11 @@ struct ComplexUnionArray {
 };
 
 struct TopLevel {
-    list_t * complex_union_array;
     char * date;
-    char * date_time;
     char * time;
+    char * date_time;
     list_t * union_array;
+    list_t * complex_union_array;
 };
 
 struct ComplexUnionArray * cJSON_GetComplexUnionArrayValue(const cJSON * j);
diff --git a/base/schema-cjson/test/inputs/schema/description.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/description.schema/default/TopLevel.c
index 679c9b1..778b0ef 100644
--- a/base/schema-cjson/test/inputs/schema/description.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/description.schema/default/TopLevel.c
@@ -174,10 +174,8 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
-            if (cJSON_HasObjectItem(j, "bar")) {
-                if (NULL != (x->bar = cJSON_malloc(sizeof(bool)))) {
-                    *x->bar = cJSON_IsTrue(cJSON_GetObjectItemCaseSensitive(j, "bar"));
-                }
+            if (cJSON_HasObjectItem(j, "union")) {
+                x->top_level_union = cJSON_GetUnionValue(cJSON_GetObjectItemCaseSensitive(j, "union"));
             }
             if (cJSON_HasObjectItem(j, "enum")) {
                 x->top_level_enum = cJSON_GetEnumValue(cJSON_GetObjectItemCaseSensitive(j, "enum"));
@@ -187,12 +185,14 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
                     *x->foo = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "foo"));
                 }
             }
+            if (cJSON_HasObjectItem(j, "bar")) {
+                if (NULL != (x->bar = cJSON_malloc(sizeof(bool)))) {
+                    *x->bar = cJSON_IsTrue(cJSON_GetObjectItemCaseSensitive(j, "bar"));
+                }
+            }
             if (cJSON_HasObjectItem(j, "object-or-string")) {
                 x->object_or_string = cJSON_GetObjectOrStringUnionValue(cJSON_GetObjectItemCaseSensitive(j, "object-or-string"));
             }
-            if (cJSON_HasObjectItem(j, "union")) {
-                x->top_level_union = cJSON_GetUnionValue(cJSON_GetObjectItemCaseSensitive(j, "union"));
-            }
         }
     }
     return x;
@@ -202,15 +202,15 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            if (NULL != x->bar) {
-                cJSON_AddBoolToObject(j, "bar", *x->bar);
-            }
+            cJSON_AddItemToObject(j, "union", cJSON_CreateUnion(x->top_level_union));
             cJSON_AddItemToObject(j, "enum", cJSON_CreateEnum(x->top_level_enum));
             if (NULL != x->foo) {
                 cJSON_AddNumberToObject(j, "foo", *x->foo);
             }
+            if (NULL != x->bar) {
+                cJSON_AddBoolToObject(j, "bar", *x->bar);
+            }
             cJSON_AddItemToObject(j, "object-or-string", cJSON_CreateObjectOrStringUnion(x->object_or_string));
-            cJSON_AddItemToObject(j, "union", cJSON_CreateUnion(x->top_level_union));
         }
     }
     return j;
@@ -230,18 +230,18 @@ char * cJSON_PrintTopLevel(const struct TopLevel * x) {
 
 void cJSON_DeleteTopLevel(struct TopLevel * x) {
     if (NULL != x) {
-        if (NULL != x->bar) {
-            cJSON_free(x->bar);
+        if (NULL != x->top_level_union) {
+            cJSON_DeleteUnion(x->top_level_union);
         }
         if (NULL != x->foo) {
             cJSON_free(x->foo);
         }
+        if (NULL != x->bar) {
+            cJSON_free(x->bar);
+        }
         if (NULL != x->object_or_string) {
             cJSON_DeleteObjectOrStringUnion(x->object_or_string);
         }
-        if (NULL != x->top_level_union) {
-            cJSON_DeleteUnion(x->top_level_union);
-        }
         cJSON_free(x);
     }
 }
diff --git a/base/schema-cjson/test/inputs/schema/description.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/description.schema/default/TopLevel.h
index ea5fdea..a4a4dc2 100644
--- a/base/schema-cjson/test/inputs/schema/description.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/description.schema/default/TopLevel.h
@@ -74,19 +74,19 @@ struct Union {
  */
 struct TopLevel {
     /**
-     * A pretty boolean
+     * Either a number or a string
      */
-    bool * bar;
+    struct Union * top_level_union;
     /**
      * An enumeration
      */
     enum Enum top_level_enum;
     double * foo;
-    struct ObjectOrStringUnion * object_or_string;
     /**
-     * Either a number or a string
+     * A pretty boolean
      */
-    struct Union * top_level_union;
+    bool * bar;
+    struct ObjectOrStringUnion * object_or_string;
 };
 
 enum Enum cJSON_GetEnumValue(const cJSON * j);
diff --git a/base/schema-cjson/test/inputs/schema/integer-string.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/integer-string.schema/default/TopLevel.c
index b14e3fa..b698522 100644
--- a/base/schema-cjson/test/inputs/schema/integer-string.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/integer-string.schema/default/TopLevel.c
@@ -62,6 +62,31 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
+            if (cJSON_HasObjectItem(j, "one")) {
+                x->one = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "one")));
+            }
+            else {
+                if (NULL != (x->one = cJSON_malloc(sizeof(char)))) {
+                    x->one[0] = '\0';
+                }
+            }
+            if (cJSON_HasObjectItem(j, "optional")) {
+                x->optional = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional")));
+            }
+            if ((cJSON_HasObjectItem(j, "nullable")) && (!cJSON_IsNull(cJSON_GetObjectItemCaseSensitive(j, "nullable")))) {
+                x->nullable = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "nullable")));
+            }
+            if (cJSON_HasObjectItem(j, "arrOne")) {
+                list_t * x1 = list_create(false, NULL);
+                if (NULL != x1) {
+                    cJSON * e1 = NULL;
+                    cJSON * j1 = cJSON_GetObjectItemCaseSensitive(j, "arrOne");
+                    cJSON_ArrayForEach(e1, j1) {
+                        list_add_tail(x1, strdup(cJSON_GetStringValue(e1)), sizeof(char *));
+                    }
+                    x->arr_one = x1;
+                }
+            }
             if (cJSON_HasObjectItem(j, "arrNullable")) {
                 list_t * x1 = list_create(false, NULL);
                 if (NULL != x1) {
@@ -78,31 +103,6 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
                     x->arr_nullable = x1;
                 }
             }
-            if (cJSON_HasObjectItem(j, "arrOne")) {
-                list_t * x1 = list_create(false, NULL);
-                if (NULL != x1) {
-                    cJSON * e1 = NULL;
-                    cJSON * j1 = cJSON_GetObjectItemCaseSensitive(j, "arrOne");
-                    cJSON_ArrayForEach(e1, j1) {
-                        list_add_tail(x1, strdup(cJSON_GetStringValue(e1)), sizeof(char *));
-                    }
-                    x->arr_one = x1;
-                }
-            }
-            if ((cJSON_HasObjectItem(j, "nullable")) && (!cJSON_IsNull(cJSON_GetObjectItemCaseSensitive(j, "nullable")))) {
-                x->nullable = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "nullable")));
-            }
-            if (cJSON_HasObjectItem(j, "one")) {
-                x->one = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "one")));
-            }
-            else {
-                if (NULL != (x->one = cJSON_malloc(sizeof(char)))) {
-                    x->one[0] = '\0';
-                }
-            }
-            if (cJSON_HasObjectItem(j, "optional")) {
-                x->optional = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional")));
-            }
             if (cJSON_HasObjectItem(j, "unionWithInt")) {
                 x->union_with_int = cJSON_GetUnionWithIntValue(cJSON_GetObjectItemCaseSensitive(j, "unionWithInt"));
             }
@@ -118,6 +118,31 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
+            if (NULL != x->one) {
+                cJSON_AddStringToObject(j, "one", x->one);
+            }
+            else {
+                cJSON_AddStringToObject(j, "one", "");
+            }
+            if (NULL != x->optional) {
+                cJSON_AddStringToObject(j, "optional", x->optional);
+            }
+            if (NULL != x->nullable) {
+                cJSON_AddStringToObject(j, "nullable", x->nullable);
+            }
+            else {
+                cJSON_AddNullToObject(j, "nullable");
+            }
+            if (NULL != x->arr_one) {
+                cJSON * j1 = cJSON_AddArrayToObject(j, "arrOne");
+                if (NULL != j1) {
+                    char * x1 = list_get_head(x->arr_one);
+                    while (NULL != x1) {
+                        cJSON_AddItemToArray(j1, cJSON_CreateString(x1));
+                        x1 = list_get_next(x->arr_one);
+                    }
+                }
+            }
             if (NULL != x->arr_nullable) {
                 cJSON * j1 = cJSON_AddArrayToObject(j, "arrNullable");
                 if (NULL != j1) {
@@ -133,31 +158,6 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
                     }
                 }
             }
-            if (NULL != x->arr_one) {
-                cJSON * j1 = cJSON_AddArrayToObject(j, "arrOne");
-                if (NULL != j1) {
-                    char * x1 = list_get_head(x->arr_one);
-                    while (NULL != x1) {
-                        cJSON_AddItemToArray(j1, cJSON_CreateString(x1));
-                        x1 = list_get_next(x->arr_one);
-                    }
-                }
-            }
-            if (NULL != x->nullable) {
-                cJSON_AddStringToObject(j, "nullable", x->nullable);
-            }
-            else {
-                cJSON_AddNullToObject(j, "nullable");
-            }
-            if (NULL != x->one) {
-                cJSON_AddStringToObject(j, "one", x->one);
-            }
-            else {
-                cJSON_AddStringToObject(j, "one", "");
-            }
-            if (NULL != x->optional) {
-                cJSON_AddStringToObject(j, "optional", x->optional);
-            }
             cJSON_AddItemToObject(j, "unionWithInt", cJSON_CreateUnionWithInt(x->union_with_int));
             cJSON_AddItemToObject(j, "unionWithIntAndEnum", cJSON_CreateUnionWithInt(x->union_with_int_and_enum));
         }
@@ -179,15 +179,14 @@ char * cJSON_PrintTopLevel(const struct TopLevel * x) {
 
 void cJSON_DeleteTopLevel(struct TopLevel * x) {
     if (NULL != x) {
-        if (NULL != x->arr_nullable) {
-            char * x1 = list_get_head(x->arr_nullable);
-            while (NULL != x1) {
-                if ((void *)0xDEADBEEF != x1) {
-                    cJSON_free(x1);
-                }
-                x1 = list_get_next(x->arr_nullable);
-            }
-            list_release(x->arr_nullable);
+        if (NULL != x->one) {
+            cJSON_free(x->one);
+        }
+        if (NULL != x->optional) {
+            cJSON_free(x->optional);
+        }
+        if (NULL != x->nullable) {
+            cJSON_free(x->nullable);
         }
         if (NULL != x->arr_one) {
             char * x1 = list_get_head(x->arr_one);
@@ -197,14 +196,15 @@ void cJSON_DeleteTopLevel(struct TopLevel * x) {
             }
             list_release(x->arr_one);
         }
-        if (NULL != x->nullable) {
-            cJSON_free(x->nullable);
-        }
-        if (NULL != x->one) {
-            cJSON_free(x->one);
-        }
-        if (NULL != x->optional) {
-            cJSON_free(x->optional);
+        if (NULL != x->arr_nullable) {
+            char * x1 = list_get_head(x->arr_nullable);
+            while (NULL != x1) {
+                if ((void *)0xDEADBEEF != x1) {
+                    cJSON_free(x1);
+                }
+                x1 = list_get_next(x->arr_nullable);
+            }
+            list_release(x->arr_nullable);
         }
         if (NULL != x->union_with_int) {
             cJSON_DeleteUnionWithInt(x->union_with_int);
diff --git a/base/schema-cjson/test/inputs/schema/integer-string.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/integer-string.schema/default/TopLevel.h
index 82979ac..75ddf5c 100644
--- a/base/schema-cjson/test/inputs/schema/integer-string.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/integer-string.schema/default/TopLevel.h
@@ -43,11 +43,11 @@ struct UnionWithInt {
 };
 
 struct TopLevel {
-    list_t * arr_nullable;
-    list_t * arr_one;
-    char * nullable;
     char * one;
     char * optional;
+    char * nullable;
+    list_t * arr_one;
+    list_t * arr_nullable;
     struct UnionWithInt * union_with_int;
     struct UnionWithInt * union_with_int_and_enum;
 };
diff --git a/base/schema-cjson/test/inputs/schema/integer-type.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/integer-type.schema/default/TopLevel.c
index 6baca36..9a17d90 100644
--- a/base/schema-cjson/test/inputs/schema/integer-type.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/integer-type.schema/default/TopLevel.c
@@ -22,33 +22,33 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
-            if (cJSON_HasObjectItem(j, "above_i32_max")) {
-                x->above_i32_max = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "above_i32_max"));
+            if (cJSON_HasObjectItem(j, "small_positive")) {
+                x->small_positive = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "small_positive"));
             }
-            if (cJSON_HasObjectItem(j, "below_i32_min")) {
-                x->below_i32_min = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "below_i32_min"));
+            if (cJSON_HasObjectItem(j, "small_negative")) {
+                x->small_negative = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "small_negative"));
             }
             if (cJSON_HasObjectItem(j, "i32_range")) {
                 x->i32_range = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "i32_range"));
             }
-            if (cJSON_HasObjectItem(j, "large_bounds")) {
-                x->large_bounds = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "large_bounds"));
+            if (cJSON_HasObjectItem(j, "above_i32_max")) {
+                x->above_i32_max = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "above_i32_max"));
             }
-            if (cJSON_HasObjectItem(j, "only_maximum")) {
-                x->only_maximum = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "only_maximum"));
+            if (cJSON_HasObjectItem(j, "below_i32_min")) {
+                x->below_i32_min = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "below_i32_min"));
             }
             if (cJSON_HasObjectItem(j, "only_minimum")) {
                 x->only_minimum = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "only_minimum"));
             }
-            if (cJSON_HasObjectItem(j, "small_negative")) {
-                x->small_negative = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "small_negative"));
-            }
-            if (cJSON_HasObjectItem(j, "small_positive")) {
-                x->small_positive = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "small_positive"));
+            if (cJSON_HasObjectItem(j, "only_maximum")) {
+                x->only_maximum = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "only_maximum"));
             }
             if (cJSON_HasObjectItem(j, "unbounded")) {
                 x->unbounded = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "unbounded"));
             }
+            if (cJSON_HasObjectItem(j, "large_bounds")) {
+                x->large_bounds = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "large_bounds"));
+            }
         }
     }
     return x;
@@ -58,15 +58,15 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
+            cJSON_AddNumberToObject(j, "small_positive", x->small_positive);
+            cJSON_AddNumberToObject(j, "small_negative", x->small_negative);
+            cJSON_AddNumberToObject(j, "i32_range", x->i32_range);
             cJSON_AddNumberToObject(j, "above_i32_max", x->above_i32_max);
             cJSON_AddNumberToObject(j, "below_i32_min", x->below_i32_min);
-            cJSON_AddNumberToObject(j, "i32_range", x->i32_range);
-            cJSON_AddNumberToObject(j, "large_bounds", x->large_bounds);
-            cJSON_AddNumberToObject(j, "only_maximum", x->only_maximum);
             cJSON_AddNumberToObject(j, "only_minimum", x->only_minimum);
-            cJSON_AddNumberToObject(j, "small_negative", x->small_negative);
-            cJSON_AddNumberToObject(j, "small_positive", x->small_positive);
+            cJSON_AddNumberToObject(j, "only_maximum", x->only_maximum);
             cJSON_AddNumberToObject(j, "unbounded", x->unbounded);
+            cJSON_AddNumberToObject(j, "large_bounds", x->large_bounds);
         }
     }
     return j;
diff --git a/base/schema-cjson/test/inputs/schema/integer-type.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/integer-type.schema/default/TopLevel.h
index 652e4a4..2dc43da 100644
--- a/base/schema-cjson/test/inputs/schema/integer-type.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/integer-type.schema/default/TopLevel.h
@@ -35,15 +35,15 @@ extern "C" {
 #endif
 
 struct TopLevel {
+    int64_t small_positive;
+    int64_t small_negative;
+    int64_t i32_range;
     int64_t above_i32_max;
     int64_t below_i32_min;
-    int64_t i32_range;
-    int64_t large_bounds;
-    int64_t only_maximum;
     int64_t only_minimum;
-    int64_t small_negative;
-    int64_t small_positive;
+    int64_t only_maximum;
     int64_t unbounded;
+    int64_t large_bounds;
 };
 
 struct TopLevel * cJSON_ParseTopLevel(const char * s);
diff --git a/base/schema-cjson/test/inputs/schema/keyword-unions.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/keyword-unions.schema/default/TopLevel.c
index 06818da..870c89c 100644
--- a/base/schema-cjson/test/inputs/schema/keyword-unions.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/keyword-unions.schema/default/TopLevel.c
@@ -24814,11 +24814,6 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
             if (cJSON_HasObjectItem(j, "double")) {
                 x->top_level_double = cJSON_GetUnionDoubleValue(cJSON_GetObjectItemCaseSensitive(j, "double"));
             }
-            if (cJSON_HasObjectItem(j, "dummy")) {
-                if (NULL != (x->dummy = cJSON_malloc(sizeof(double)))) {
-                    *x->dummy = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "dummy"));
-                }
-            }
             if (cJSON_HasObjectItem(j, "dynamic")) {
                 x->dynamic = cJSON_GetUnionDynamicValue(cJSON_GetObjectItemCaseSensitive(j, "dynamic"));
             }
@@ -24975,12 +24970,12 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
             if (cJSON_HasObjectItem(j, "internal")) {
                 x->internal = cJSON_GetUnionInternalValue(cJSON_GetObjectItemCaseSensitive(j, "internal"));
             }
-            if (cJSON_HasObjectItem(j, "is")) {
-                x->is = cJSON_GetUnionIsValue(cJSON_GetObjectItemCaseSensitive(j, "is"));
-            }
             if (cJSON_HasObjectItem(j, "iterable")) {
                 x->iterable = cJSON_GetUnionIterableValue(cJSON_GetObjectItemCaseSensitive(j, "iterable"));
             }
+            if (cJSON_HasObjectItem(j, "is")) {
+                x->is = cJSON_GetUnionIsValue(cJSON_GetObjectItemCaseSensitive(j, "is"));
+            }
             if (cJSON_HasObjectItem(j, "jdec")) {
                 x->jdec = cJSON_GetUnionJdecValue(cJSON_GetObjectItemCaseSensitive(j, "jdec"));
             }
@@ -25419,6 +25414,11 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
             if (cJSON_HasObjectItem(j, "yield")) {
                 x->yield = cJSON_GetUnionYieldValue(cJSON_GetObjectItemCaseSensitive(j, "yield"));
             }
+            if (cJSON_HasObjectItem(j, "dummy")) {
+                if (NULL != (x->dummy = cJSON_malloc(sizeof(double)))) {
+                    *x->dummy = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "dummy"));
+                }
+            }
         }
     }
     return x;
@@ -25656,9 +25656,6 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
             if (NULL != x->top_level_double) {
                 cJSON_AddItemToObject(j, "double", cJSON_CreateUnionDouble(x->top_level_double));
             }
-            if (NULL != x->dummy) {
-                cJSON_AddNumberToObject(j, "dummy", *x->dummy);
-            }
             if (NULL != x->dynamic) {
                 cJSON_AddItemToObject(j, "dynamic", cJSON_CreateUnionDynamic(x->dynamic));
             }
@@ -25815,12 +25812,12 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
             if (NULL != x->internal) {
                 cJSON_AddItemToObject(j, "internal", cJSON_CreateUnionInternal(x->internal));
             }
-            if (NULL != x->is) {
-                cJSON_AddItemToObject(j, "is", cJSON_CreateUnionIs(x->is));
-            }
             if (NULL != x->iterable) {
                 cJSON_AddItemToObject(j, "iterable", cJSON_CreateUnionIterable(x->iterable));
             }
+            if (NULL != x->is) {
+                cJSON_AddItemToObject(j, "is", cJSON_CreateUnionIs(x->is));
+            }
             if (NULL != x->jdec) {
                 cJSON_AddItemToObject(j, "jdec", cJSON_CreateUnionJdec(x->jdec));
             }
@@ -26259,6 +26256,9 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
             if (NULL != x->yield) {
                 cJSON_AddItemToObject(j, "yield", cJSON_CreateUnionYield(x->yield));
             }
+            if (NULL != x->dummy) {
+                cJSON_AddNumberToObject(j, "dummy", *x->dummy);
+            }
         }
     }
     return j;
@@ -26506,9 +26506,6 @@ void cJSON_DeleteTopLevel(struct TopLevel * x) {
         if (NULL != x->top_level_double) {
             cJSON_DeleteUnionDouble(x->top_level_double);
         }
-        if (NULL != x->dummy) {
-            cJSON_free(x->dummy);
-        }
         if (NULL != x->dynamic) {
             cJSON_DeleteUnionDynamic(x->dynamic);
         }
@@ -26665,12 +26662,12 @@ void cJSON_DeleteTopLevel(struct TopLevel * x) {
         if (NULL != x->internal) {
             cJSON_DeleteUnionInternal(x->internal);
         }
-        if (NULL != x->is) {
-            cJSON_DeleteUnionIs(x->is);
-        }
         if (NULL != x->iterable) {
             cJSON_DeleteUnionIterable(x->iterable);
         }
+        if (NULL != x->is) {
+            cJSON_DeleteUnionIs(x->is);
+        }
         if (NULL != x->jdec) {
             cJSON_DeleteUnionJdec(x->jdec);
         }
@@ -27109,6 +27106,9 @@ void cJSON_DeleteTopLevel(struct TopLevel * x) {
         if (NULL != x->yield) {
             cJSON_DeleteUnionYield(x->yield);
         }
+        if (NULL != x->dummy) {
+            cJSON_free(x->dummy);
+        }
         cJSON_free(x);
     }
 }
diff --git a/base/schema-cjson/test/inputs/schema/keyword-unions.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/keyword-unions.schema/default/TopLevel.h
index 93a78d4..073e46c 100644
--- a/base/schema-cjson/test/inputs/schema/keyword-unions.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/keyword-unions.schema/default/TopLevel.h
@@ -3147,7 +3147,6 @@ struct TopLevel {
     struct UnionDidSet * did_set;
     struct UnionDo * top_level_do;
     struct UnionDouble * top_level_double;
-    double * dummy;
     struct UnionDynamic * dynamic;
     struct UnionDynamicCast * top_level_dynamic_cast;
     struct UnionElif * elif;
@@ -3200,8 +3199,8 @@ struct TopLevel {
     struct UnionInt * top_level_int;
     struct UnionInterface * interface;
     struct UnionInternal * internal;
-    struct UnionIs * is;
     struct UnionIterable * iterable;
+    struct UnionIs * is;
     struct UnionJdec * jdec;
     struct UnionJenc * jenc;
     struct UnionJpipe * jpipe;
@@ -3348,6 +3347,7 @@ struct TopLevel {
     struct UnionXorEq * top_level_xor_eq;
     struct UnionYes * yes;
     struct UnionYield * yield;
+    double * dummy;
 };
 
 struct UnionAbstract * cJSON_GetUnionAbstractValue(const cJSON * j);
diff --git a/base/schema-cjson/test/inputs/schema/light.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/light.schema/default/TopLevel.c
index a784cfc..4926d04 100644
--- a/base/schema-cjson/test/inputs/schema/light.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/light.schema/default/TopLevel.c
@@ -22,14 +22,6 @@ struct LightParams * cJSON_GetLightParamsValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct LightParams)))) {
             memset(x, 0, sizeof(struct LightParams));
-            if (cJSON_HasObjectItem(j, "app_id")) {
-                x->app_id = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "app_id")));
-            }
-            else {
-                if (NULL != (x->app_id = cJSON_malloc(sizeof(char)))) {
-                    x->app_id[0] = '\0';
-                }
-            }
             if (cJSON_HasObjectItem(j, "outlet_id")) {
                 x->outlet_id = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "outlet_id")));
             }
@@ -38,6 +30,14 @@ struct LightParams * cJSON_GetLightParamsValue(const cJSON * j) {
                     x->outlet_id[0] = '\0';
                 }
             }
+            if (cJSON_HasObjectItem(j, "app_id")) {
+                x->app_id = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "app_id")));
+            }
+            else {
+                if (NULL != (x->app_id = cJSON_malloc(sizeof(char)))) {
+                    x->app_id[0] = '\0';
+                }
+            }
             if (cJSON_HasObjectItem(j, "rgba")) {
                 x->rgba = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "rgba")));
             }
@@ -55,18 +55,18 @@ cJSON * cJSON_CreateLightParams(const struct LightParams * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            if (NULL != x->app_id) {
-                cJSON_AddStringToObject(j, "app_id", x->app_id);
-            }
-            else {
-                cJSON_AddStringToObject(j, "app_id", "");
-            }
             if (NULL != x->outlet_id) {
                 cJSON_AddStringToObject(j, "outlet_id", x->outlet_id);
             }
             else {
                 cJSON_AddStringToObject(j, "outlet_id", "");
             }
+            if (NULL != x->app_id) {
+                cJSON_AddStringToObject(j, "app_id", x->app_id);
+            }
+            else {
+                cJSON_AddStringToObject(j, "app_id", "");
+            }
             if (NULL != x->rgba) {
                 cJSON_AddStringToObject(j, "rgba", x->rgba);
             }
@@ -92,12 +92,12 @@ char * cJSON_PrintLightParams(const struct LightParams * x) {
 
 void cJSON_DeleteLightParams(struct LightParams * x) {
     if (NULL != x) {
-        if (NULL != x->app_id) {
-            cJSON_free(x->app_id);
-        }
         if (NULL != x->outlet_id) {
             cJSON_free(x->outlet_id);
         }
+        if (NULL != x->app_id) {
+            cJSON_free(x->app_id);
+        }
         if (NULL != x->rgba) {
             cJSON_free(x->rgba);
         }
diff --git a/base/schema-cjson/test/inputs/schema/light.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/light.schema/default/TopLevel.h
index d02de2f..384458a 100644
--- a/base/schema-cjson/test/inputs/schema/light.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/light.schema/default/TopLevel.h
@@ -35,8 +35,8 @@ extern "C" {
 #endif
 
 struct LightParams {
-    char * app_id;
     char * outlet_id;
+    char * app_id;
     char * rgba;
 };
 
diff --git a/base/schema-cjson/test/inputs/schema/min-max-items.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/min-max-items.schema/default/TopLevel.c
index 329331b..d9555d2 100644
--- a/base/schema-cjson/test/inputs/schema/min-max-items.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/min-max-items.schema/default/TopLevel.c
@@ -62,6 +62,20 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
+            if (cJSON_HasObjectItem(j, "minOnly")) {
+                list_t * x1 = list_create(false, NULL);
+                if (NULL != x1) {
+                    cJSON * e1 = NULL;
+                    cJSON * j1 = cJSON_GetObjectItemCaseSensitive(j, "minOnly");
+                    cJSON_ArrayForEach(e1, j1) {
+                        list_add_tail(x1, strdup(cJSON_GetStringValue(e1)), sizeof(char *));
+                    }
+                    x->min_only = x1;
+                }
+            }
+            else {
+                x->min_only = list_create(false, NULL);
+            }
             if (cJSON_HasObjectItem(j, "maxOnly")) {
                 list_t * x1 = list_create(false, NULL);
                 if (NULL != x1) {
@@ -98,20 +112,6 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
             else {
                 x->min_and_max = list_create(false, NULL);
             }
-            if (cJSON_HasObjectItem(j, "minOnly")) {
-                list_t * x1 = list_create(false, NULL);
-                if (NULL != x1) {
-                    cJSON * e1 = NULL;
-                    cJSON * j1 = cJSON_GetObjectItemCaseSensitive(j, "minOnly");
-                    cJSON_ArrayForEach(e1, j1) {
-                        list_add_tail(x1, strdup(cJSON_GetStringValue(e1)), sizeof(char *));
-                    }
-                    x->min_only = x1;
-                }
-            }
-            else {
-                x->min_only = list_create(false, NULL);
-            }
             if (cJSON_HasObjectItem(j, "plain")) {
                 list_t * x1 = list_create(false, NULL);
                 if (NULL != x1) {
@@ -149,6 +149,16 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
+            if (NULL != x->min_only) {
+                cJSON * j1 = cJSON_AddArrayToObject(j, "minOnly");
+                if (NULL != j1) {
+                    char * x1 = list_get_head(x->min_only);
+                    while (NULL != x1) {
+                        cJSON_AddItemToArray(j1, cJSON_CreateString(x1));
+                        x1 = list_get_next(x->min_only);
+                    }
+                }
+            }
             if (NULL != x->max_only) {
                 cJSON * j1 = cJSON_AddArrayToObject(j, "maxOnly");
                 if (NULL != j1) {
@@ -169,16 +179,6 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
                     }
                 }
             }
-            if (NULL != x->min_only) {
-                cJSON * j1 = cJSON_AddArrayToObject(j, "minOnly");
-                if (NULL != j1) {
-                    char * x1 = list_get_head(x->min_only);
-                    while (NULL != x1) {
-                        cJSON_AddItemToArray(j1, cJSON_CreateString(x1));
-                        x1 = list_get_next(x->min_only);
-                    }
-                }
-            }
             if (NULL != x->plain) {
                 cJSON * j1 = cJSON_AddArrayToObject(j, "plain");
                 if (NULL != j1) {
@@ -218,6 +218,14 @@ char * cJSON_PrintTopLevel(const struct TopLevel * x) {
 
 void cJSON_DeleteTopLevel(struct TopLevel * x) {
     if (NULL != x) {
+        if (NULL != x->min_only) {
+            char * x1 = list_get_head(x->min_only);
+            while (NULL != x1) {
+                cJSON_free(x1);
+                x1 = list_get_next(x->min_only);
+            }
+            list_release(x->min_only);
+        }
         if (NULL != x->max_only) {
             int64_t * x1 = list_get_head(x->max_only);
             while (NULL != x1) {
@@ -234,14 +242,6 @@ void cJSON_DeleteTopLevel(struct TopLevel * x) {
             }
             list_release(x->min_and_max);
         }
-        if (NULL != x->min_only) {
-            char * x1 = list_get_head(x->min_only);
-            while (NULL != x1) {
-                cJSON_free(x1);
-                x1 = list_get_next(x->min_only);
-            }
-            list_release(x->min_only);
-        }
         if (NULL != x->plain) {
             char * x1 = list_get_head(x->plain);
             while (NULL != x1) {
diff --git a/base/schema-cjson/test/inputs/schema/min-max-items.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/min-max-items.schema/default/TopLevel.h
index 5ea2aa2..bf33cdf 100644
--- a/base/schema-cjson/test/inputs/schema/min-max-items.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/min-max-items.schema/default/TopLevel.h
@@ -43,9 +43,9 @@ struct UnionItem {
 };
 
 struct TopLevel {
+    list_t * min_only;
     list_t * max_only;
     list_t * min_and_max;
-    list_t * min_only;
     list_t * plain;
     list_t * union_items;
 };
diff --git a/base/schema-cjson/test/inputs/schema/minmax-integer.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/minmax-integer.schema/default/TopLevel.c
index c5d5e58..a677f34 100644
--- a/base/schema-cjson/test/inputs/schema/minmax-integer.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/minmax-integer.schema/default/TopLevel.c
@@ -25,26 +25,26 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
             if (cJSON_HasObjectItem(j, "free")) {
                 x->free = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "free"));
             }
-            if (cJSON_HasObjectItem(j, "intersection")) {
-                x->intersection = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "intersection"));
+            if (cJSON_HasObjectItem(j, "min")) {
+                x->min = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "min"));
             }
             if (cJSON_HasObjectItem(j, "max")) {
                 x->max = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "max"));
             }
-            if (cJSON_HasObjectItem(j, "min")) {
-                x->min = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "min"));
-            }
             if (cJSON_HasObjectItem(j, "minmax")) {
                 x->minmax = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minmax"));
             }
-            if (cJSON_HasObjectItem(j, "minMaxIntersection")) {
-                x->min_max_intersection = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minMaxIntersection"));
+            if (cJSON_HasObjectItem(j, "union")) {
+                x->top_level_union = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "union"));
             }
             if (cJSON_HasObjectItem(j, "minMaxUnion")) {
                 x->min_max_union = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minMaxUnion"));
             }
-            if (cJSON_HasObjectItem(j, "union")) {
-                x->top_level_union = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "union"));
+            if (cJSON_HasObjectItem(j, "intersection")) {
+                x->intersection = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "intersection"));
+            }
+            if (cJSON_HasObjectItem(j, "minMaxIntersection")) {
+                x->min_max_intersection = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minMaxIntersection"));
             }
         }
     }
@@ -56,13 +56,13 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
             cJSON_AddNumberToObject(j, "free", x->free);
-            cJSON_AddNumberToObject(j, "intersection", x->intersection);
-            cJSON_AddNumberToObject(j, "max", x->max);
             cJSON_AddNumberToObject(j, "min", x->min);
+            cJSON_AddNumberToObject(j, "max", x->max);
             cJSON_AddNumberToObject(j, "minmax", x->minmax);
-            cJSON_AddNumberToObject(j, "minMaxIntersection", x->min_max_intersection);
-            cJSON_AddNumberToObject(j, "minMaxUnion", x->min_max_union);
             cJSON_AddNumberToObject(j, "union", x->top_level_union);
+            cJSON_AddNumberToObject(j, "minMaxUnion", x->min_max_union);
+            cJSON_AddNumberToObject(j, "intersection", x->intersection);
+            cJSON_AddNumberToObject(j, "minMaxIntersection", x->min_max_intersection);
         }
     }
     return j;
diff --git a/base/schema-cjson/test/inputs/schema/minmax-integer.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/minmax-integer.schema/default/TopLevel.h
index 1ca2f94..ea48ae9 100644
--- a/base/schema-cjson/test/inputs/schema/minmax-integer.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/minmax-integer.schema/default/TopLevel.h
@@ -36,13 +36,13 @@ extern "C" {
 
 struct TopLevel {
     int64_t free;
-    int64_t intersection;
-    int64_t max;
     int64_t min;
+    int64_t max;
     int64_t minmax;
-    int64_t min_max_intersection;
-    int64_t min_max_union;
     int64_t top_level_union;
+    int64_t min_max_union;
+    int64_t intersection;
+    int64_t min_max_intersection;
 };
 
 struct TopLevel * cJSON_ParseTopLevel(const char * s);
diff --git a/base/schema-cjson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.c
index b8394ce..876c507 100644
--- a/base/schema-cjson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.c
@@ -22,12 +22,12 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
-            if (cJSON_HasObjectItem(j, "bar")) {
-                x->bar = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "bar"));
-            }
             if (cJSON_HasObjectItem(j, "foo")) {
                 x->foo = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "foo"));
             }
+            if (cJSON_HasObjectItem(j, "bar")) {
+                x->bar = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "bar"));
+            }
             if (cJSON_HasObjectItem(j, "quux")) {
                 x->quux = cJSON_IsTrue(cJSON_GetObjectItemCaseSensitive(j, "quux"));
             }
@@ -40,8 +40,8 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            cJSON_AddNumberToObject(j, "bar", x->bar);
             cJSON_AddNumberToObject(j, "foo", x->foo);
+            cJSON_AddNumberToObject(j, "bar", x->bar);
             cJSON_AddBoolToObject(j, "quux", x->quux);
         }
     }
diff --git a/base/schema-cjson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.h
index f8a6b97..b82053e 100644
--- a/base/schema-cjson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.h
@@ -35,8 +35,8 @@ extern "C" {
 #endif
 
 struct TopLevel {
-    int64_t bar;
     int64_t foo;
+    int64_t bar;
     bool quux;
 };
 
diff --git a/base/schema-cjson/test/inputs/schema/optional-date-time.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/optional-date-time.schema/default/TopLevel.c
index c27bd90..ae6a669 100644
--- a/base/schema-cjson/test/inputs/schema/optional-date-time.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/optional-date-time.schema/default/TopLevel.c
@@ -22,15 +22,6 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
-            if (cJSON_HasObjectItem(j, "optional-date")) {
-                x->optional_date = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional-date")));
-            }
-            if (cJSON_HasObjectItem(j, "optional-date-time")) {
-                x->optional_date_time = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional-date-time")));
-            }
-            if (cJSON_HasObjectItem(j, "optional-time")) {
-                x->optional_time = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional-time")));
-            }
             if (cJSON_HasObjectItem(j, "required-date")) {
                 x->required_date = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "required-date")));
             }
@@ -39,6 +30,14 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
                     x->required_date[0] = '\0';
                 }
             }
+            if (cJSON_HasObjectItem(j, "required-time")) {
+                x->required_time = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "required-time")));
+            }
+            else {
+                if (NULL != (x->required_time = cJSON_malloc(sizeof(char)))) {
+                    x->required_time[0] = '\0';
+                }
+            }
             if (cJSON_HasObjectItem(j, "required-date-time")) {
                 x->required_date_time = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "required-date-time")));
             }
@@ -47,13 +46,14 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
                     x->required_date_time[0] = '\0';
                 }
             }
-            if (cJSON_HasObjectItem(j, "required-time")) {
-                x->required_time = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "required-time")));
+            if (cJSON_HasObjectItem(j, "optional-date")) {
+                x->optional_date = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional-date")));
             }
-            else {
-                if (NULL != (x->required_time = cJSON_malloc(sizeof(char)))) {
-                    x->required_time[0] = '\0';
-                }
+            if (cJSON_HasObjectItem(j, "optional-time")) {
+                x->optional_time = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional-time")));
+            }
+            if (cJSON_HasObjectItem(j, "optional-date-time")) {
+                x->optional_date_time = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional-date-time")));
             }
         }
     }
@@ -64,32 +64,32 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            if (NULL != x->optional_date) {
-                cJSON_AddStringToObject(j, "optional-date", x->optional_date);
-            }
-            if (NULL != x->optional_date_time) {
-                cJSON_AddStringToObject(j, "optional-date-time", x->optional_date_time);
-            }
-            if (NULL != x->optional_time) {
-                cJSON_AddStringToObject(j, "optional-time", x->optional_time);
-            }
             if (NULL != x->required_date) {
                 cJSON_AddStringToObject(j, "required-date", x->required_date);
             }
             else {
                 cJSON_AddStringToObject(j, "required-date", "");
             }
+            if (NULL != x->required_time) {
+                cJSON_AddStringToObject(j, "required-time", x->required_time);
+            }
+            else {
+                cJSON_AddStringToObject(j, "required-time", "");
+            }
             if (NULL != x->required_date_time) {
                 cJSON_AddStringToObject(j, "required-date-time", x->required_date_time);
             }
             else {
                 cJSON_AddStringToObject(j, "required-date-time", "");
             }
-            if (NULL != x->required_time) {
-                cJSON_AddStringToObject(j, "required-time", x->required_time);
+            if (NULL != x->optional_date) {
+                cJSON_AddStringToObject(j, "optional-date", x->optional_date);
             }
-            else {
-                cJSON_AddStringToObject(j, "required-time", "");
+            if (NULL != x->optional_time) {
+                cJSON_AddStringToObject(j, "optional-time", x->optional_time);
+            }
+            if (NULL != x->optional_date_time) {
+                cJSON_AddStringToObject(j, "optional-date-time", x->optional_date_time);
             }
         }
     }
@@ -110,23 +110,23 @@ char * cJSON_PrintTopLevel(const struct TopLevel * x) {
 
 void cJSON_DeleteTopLevel(struct TopLevel * x) {
     if (NULL != x) {
-        if (NULL != x->optional_date) {
-            cJSON_free(x->optional_date);
-        }
-        if (NULL != x->optional_date_time) {
-            cJSON_free(x->optional_date_time);
-        }
-        if (NULL != x->optional_time) {
-            cJSON_free(x->optional_time);
-        }
         if (NULL != x->required_date) {
             cJSON_free(x->required_date);
         }
+        if (NULL != x->required_time) {
+            cJSON_free(x->required_time);
+        }
         if (NULL != x->required_date_time) {
             cJSON_free(x->required_date_time);
         }
-        if (NULL != x->required_time) {
-            cJSON_free(x->required_time);
+        if (NULL != x->optional_date) {
+            cJSON_free(x->optional_date);
+        }
+        if (NULL != x->optional_time) {
+            cJSON_free(x->optional_time);
+        }
+        if (NULL != x->optional_date_time) {
+            cJSON_free(x->optional_date_time);
         }
         cJSON_free(x);
     }
diff --git a/base/schema-cjson/test/inputs/schema/optional-date-time.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/optional-date-time.schema/default/TopLevel.h
index cb8a50a..1ab75e5 100644
--- a/base/schema-cjson/test/inputs/schema/optional-date-time.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/optional-date-time.schema/default/TopLevel.h
@@ -35,12 +35,12 @@ extern "C" {
 #endif
 
 struct TopLevel {
-    char * optional_date;
-    char * optional_date_time;
-    char * optional_time;
     char * required_date;
-    char * required_date_time;
     char * required_time;
+    char * required_date_time;
+    char * optional_date;
+    char * optional_time;
+    char * optional_date_time;
 };
 
 struct TopLevel * cJSON_ParseTopLevel(const char * s);
diff --git a/base/schema-cjson/test/inputs/schema/renaming-bug.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/renaming-bug.schema/default/TopLevel.c
index 1102d93..2a96a85 100644
--- a/base/schema-cjson/test/inputs/schema/renaming-bug.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/renaming-bug.schema/default/TopLevel.c
@@ -198,15 +198,15 @@ struct Part * cJSON_GetPartValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct Part)))) {
             memset(x, 0, sizeof(struct Part));
-            if (cJSON_HasObjectItem(j, "depth")) {
-                x->depth = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "depth")));
-            }
             if (cJSON_HasObjectItem(j, "length")) {
                 x->length = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "length")));
             }
             if (cJSON_HasObjectItem(j, "width")) {
                 x->width = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "width")));
             }
+            if (cJSON_HasObjectItem(j, "depth")) {
+                x->depth = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "depth")));
+            }
         }
     }
     return x;
@@ -216,15 +216,15 @@ cJSON * cJSON_CreatePart(const struct Part * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            if (NULL != x->depth) {
-                cJSON_AddStringToObject(j, "depth", x->depth);
-            }
             if (NULL != x->length) {
                 cJSON_AddStringToObject(j, "length", x->length);
             }
             if (NULL != x->width) {
                 cJSON_AddStringToObject(j, "width", x->width);
             }
+            if (NULL != x->depth) {
+                cJSON_AddStringToObject(j, "depth", x->depth);
+            }
         }
     }
     return j;
@@ -244,15 +244,15 @@ char * cJSON_PrintPart(const struct Part * x) {
 
 void cJSON_DeletePart(struct Part * x) {
     if (NULL != x) {
-        if (NULL != x->depth) {
-            cJSON_free(x->depth);
-        }
         if (NULL != x->length) {
             cJSON_free(x->length);
         }
         if (NULL != x->width) {
             cJSON_free(x->width);
         }
+        if (NULL != x->depth) {
+            cJSON_free(x->depth);
+        }
         cJSON_free(x);
     }
 }
@@ -497,12 +497,12 @@ struct Shape * cJSON_GetShapeValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct Shape)))) {
             memset(x, 0, sizeof(struct Shape));
-            if (cJSON_HasObjectItem(j, "geometry")) {
-                x->geometry = cJSON_GetGeometryValue(cJSON_GetObjectItemCaseSensitive(j, "geometry"));
-            }
             if (cJSON_HasObjectItem(j, "history")) {
                 x->history = cJSON_GetHistoryValue(cJSON_GetObjectItemCaseSensitive(j, "history"));
             }
+            if (cJSON_HasObjectItem(j, "geometry")) {
+                x->geometry = cJSON_GetGeometryValue(cJSON_GetObjectItemCaseSensitive(j, "geometry"));
+            }
         }
     }
     return x;
@@ -512,12 +512,12 @@ cJSON * cJSON_CreateShape(const struct Shape * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            if (NULL != x->geometry) {
-                cJSON_AddItemToObject(j, "geometry", cJSON_CreateGeometry(x->geometry));
-            }
             if (NULL != x->history) {
                 cJSON_AddItemToObject(j, "history", cJSON_CreateHistory(x->history));
             }
+            if (NULL != x->geometry) {
+                cJSON_AddItemToObject(j, "geometry", cJSON_CreateGeometry(x->geometry));
+            }
         }
     }
     return j;
@@ -537,12 +537,12 @@ char * cJSON_PrintShape(const struct Shape * x) {
 
 void cJSON_DeleteShape(struct Shape * x) {
     if (NULL != x) {
-        if (NULL != x->geometry) {
-            cJSON_DeleteGeometry(x->geometry);
-        }
         if (NULL != x->history) {
             cJSON_DeleteHistory(x->history);
         }
+        if (NULL != x->geometry) {
+            cJSON_DeleteGeometry(x->geometry);
+        }
         cJSON_free(x);
     }
 }
@@ -564,12 +564,12 @@ struct Berry * cJSON_GetBerryValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct Berry)))) {
             memset(x, 0, sizeof(struct Berry));
-            if (cJSON_HasObjectItem(j, "color")) {
-                x->color = cJSON_GetColorValue(cJSON_GetObjectItemCaseSensitive(j, "color"));
-            }
             if (cJSON_HasObjectItem(j, "name")) {
                 x->name = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "name")));
             }
+            if (cJSON_HasObjectItem(j, "color")) {
+                x->color = cJSON_GetColorValue(cJSON_GetObjectItemCaseSensitive(j, "color"));
+            }
             if (cJSON_HasObjectItem(j, "shapes")) {
                 list_t * x1 = list_create(false, NULL);
                 if (NULL != x1) {
@@ -590,12 +590,12 @@ cJSON * cJSON_CreateBerry(const struct Berry * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            if (NULL != x->color) {
-                cJSON_AddItemToObject(j, "color", cJSON_CreateColor(x->color));
-            }
             if (NULL != x->name) {
                 cJSON_AddStringToObject(j, "name", x->name);
             }
+            if (NULL != x->color) {
+                cJSON_AddItemToObject(j, "color", cJSON_CreateColor(x->color));
+            }
             if (NULL != x->shapes) {
                 cJSON * j1 = cJSON_AddArrayToObject(j, "shapes");
                 if (NULL != j1) {
@@ -625,12 +625,12 @@ char * cJSON_PrintBerry(const struct Berry * x) {
 
 void cJSON_DeleteBerry(struct Berry * x) {
     if (NULL != x) {
-        if (NULL != x->color) {
-            cJSON_DeleteColor(x->color);
-        }
         if (NULL != x->name) {
             cJSON_free(x->name);
         }
+        if (NULL != x->color) {
+            cJSON_DeleteColor(x->color);
+        }
         if (NULL != x->shapes) {
             struct Shape * x1 = list_get_head(x->shapes);
             while (NULL != x1) {
@@ -665,6 +665,11 @@ struct Fruit * cJSON_GetFruitValue(const cJSON * j) {
                     *x->apple = cJSON_IsTrue(cJSON_GetObjectItemCaseSensitive(j, "apple"));
                 }
             }
+            if (cJSON_HasObjectItem(j, "orange")) {
+                if (NULL != (x->orange = cJSON_malloc(sizeof(bool)))) {
+                    *x->orange = cJSON_IsTrue(cJSON_GetObjectItemCaseSensitive(j, "orange"));
+                }
+            }
             if (cJSON_HasObjectItem(j, "berries")) {
                 list_t * x1 = list_create(false, NULL);
                 if (NULL != x1) {
@@ -676,11 +681,6 @@ struct Fruit * cJSON_GetFruitValue(const cJSON * j) {
                     x->berries = x1;
                 }
             }
-            if (cJSON_HasObjectItem(j, "orange")) {
-                if (NULL != (x->orange = cJSON_malloc(sizeof(bool)))) {
-                    *x->orange = cJSON_IsTrue(cJSON_GetObjectItemCaseSensitive(j, "orange"));
-                }
-            }
         }
     }
     return x;
@@ -693,6 +693,9 @@ cJSON * cJSON_CreateFruit(const struct Fruit * x) {
             if (NULL != x->apple) {
                 cJSON_AddBoolToObject(j, "apple", *x->apple);
             }
+            if (NULL != x->orange) {
+                cJSON_AddBoolToObject(j, "orange", *x->orange);
+            }
             if (NULL != x->berries) {
                 cJSON * j1 = cJSON_AddArrayToObject(j, "berries");
                 if (NULL != j1) {
@@ -703,9 +706,6 @@ cJSON * cJSON_CreateFruit(const struct Fruit * x) {
                     }
                 }
             }
-            if (NULL != x->orange) {
-                cJSON_AddBoolToObject(j, "orange", *x->orange);
-            }
         }
     }
     return j;
@@ -728,6 +728,9 @@ void cJSON_DeleteFruit(struct Fruit * x) {
         if (NULL != x->apple) {
             cJSON_free(x->apple);
         }
+        if (NULL != x->orange) {
+            cJSON_free(x->orange);
+        }
         if (NULL != x->berries) {
             struct Berry * x1 = list_get_head(x->berries);
             while (NULL != x1) {
@@ -736,9 +739,6 @@ void cJSON_DeleteFruit(struct Fruit * x) {
             }
             list_release(x->berries);
         }
-        if (NULL != x->orange) {
-            cJSON_free(x->orange);
-        }
         cJSON_free(x);
     }
 }
@@ -760,16 +760,16 @@ struct Limit * cJSON_GetLimitValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct Limit)))) {
             memset(x, 0, sizeof(struct Limit));
-            if (cJSON_HasObjectItem(j, "maximum")) {
-                if (NULL != (x->maximum = cJSON_malloc(sizeof(double)))) {
-                    *x->maximum = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "maximum"));
-                }
-            }
             if (cJSON_HasObjectItem(j, "minimum")) {
                 if (NULL != (x->minimum = cJSON_malloc(sizeof(double)))) {
                     *x->minimum = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minimum"));
                 }
             }
+            if (cJSON_HasObjectItem(j, "maximum")) {
+                if (NULL != (x->maximum = cJSON_malloc(sizeof(double)))) {
+                    *x->maximum = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "maximum"));
+                }
+            }
         }
     }
     return x;
@@ -779,12 +779,12 @@ cJSON * cJSON_CreateLimit(const struct Limit * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            if (NULL != x->maximum) {
-                cJSON_AddNumberToObject(j, "maximum", *x->maximum);
-            }
             if (NULL != x->minimum) {
                 cJSON_AddNumberToObject(j, "minimum", *x->minimum);
             }
+            if (NULL != x->maximum) {
+                cJSON_AddNumberToObject(j, "maximum", *x->maximum);
+            }
         }
     }
     return j;
@@ -804,12 +804,12 @@ char * cJSON_PrintLimit(const struct Limit * x) {
 
 void cJSON_DeleteLimit(struct Limit * x) {
     if (NULL != x) {
-        if (NULL != x->maximum) {
-            cJSON_free(x->maximum);
-        }
         if (NULL != x->minimum) {
             cJSON_free(x->minimum);
         }
+        if (NULL != x->maximum) {
+            cJSON_free(x->maximum);
+        }
         cJSON_free(x);
     }
 }
@@ -971,26 +971,26 @@ struct Vehicle * cJSON_GetVehicleValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct Vehicle)))) {
             memset(x, 0, sizeof(struct Vehicle));
-            if (cJSON_HasObjectItem(j, "brand")) {
-                x->brand = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "brand")));
-            }
             if (cJSON_HasObjectItem(j, "id")) {
                 x->id = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "id")));
             }
+            if (cJSON_HasObjectItem(j, "type")) {
+                x->type = cJSON_GetVehicleTypeValue(cJSON_GetObjectItemCaseSensitive(j, "type"));
+            }
             if (cJSON_HasObjectItem(j, "speed")) {
                 x->speed = cJSON_GetSpeedValue(cJSON_GetObjectItemCaseSensitive(j, "speed"));
             }
+            if (cJSON_HasObjectItem(j, "year")) {
+                x->year = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "year")));
+            }
+            if (cJSON_HasObjectItem(j, "brand")) {
+                x->brand = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "brand")));
+            }
             if (cJSON_HasObjectItem(j, "subModule")) {
                 if (NULL != (x->sub_module = cJSON_malloc(sizeof(bool)))) {
                     *x->sub_module = cJSON_IsTrue(cJSON_GetObjectItemCaseSensitive(j, "subModule"));
                 }
             }
-            if (cJSON_HasObjectItem(j, "type")) {
-                x->type = cJSON_GetVehicleTypeValue(cJSON_GetObjectItemCaseSensitive(j, "type"));
-            }
-            if (cJSON_HasObjectItem(j, "year")) {
-                x->year = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "year")));
-            }
         }
     }
     return x;
@@ -1000,24 +1000,24 @@ cJSON * cJSON_CreateVehicle(const struct Vehicle * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
-            if (NULL != x->brand) {
-                cJSON_AddStringToObject(j, "brand", x->brand);
-            }
             if (NULL != x->id) {
                 cJSON_AddStringToObject(j, "id", x->id);
             }
-            if (NULL != x->speed) {
-                cJSON_AddItemToObject(j, "speed", cJSON_CreateSpeed(x->speed));
-            }
-            if (NULL != x->sub_module) {
-                cJSON_AddBoolToObject(j, "subModule", *x->sub_module);
-            }
             if (NULL != x->type) {
                 cJSON_AddItemToObject(j, "type", cJSON_CreateVehicleType(x->type));
             }
+            if (NULL != x->speed) {
+                cJSON_AddItemToObject(j, "speed", cJSON_CreateSpeed(x->speed));
+            }
             if (NULL != x->year) {
                 cJSON_AddStringToObject(j, "year", x->year);
             }
+            if (NULL != x->brand) {
+                cJSON_AddStringToObject(j, "brand", x->brand);
+            }
+            if (NULL != x->sub_module) {
+                cJSON_AddBoolToObject(j, "subModule", *x->sub_module);
+            }
         }
     }
     return j;
@@ -1037,24 +1037,24 @@ char * cJSON_PrintVehicle(const struct Vehicle * x) {
 
 void cJSON_DeleteVehicle(struct Vehicle * x) {
     if (NULL != x) {
-        if (NULL != x->brand) {
-            cJSON_free(x->brand);
-        }
         if (NULL != x->id) {
             cJSON_free(x->id);
         }
-        if (NULL != x->speed) {
-            cJSON_DeleteSpeed(x->speed);
-        }
-        if (NULL != x->sub_module) {
-            cJSON_free(x->sub_module);
-        }
         if (NULL != x->type) {
             cJSON_DeleteVehicleType(x->type);
         }
+        if (NULL != x->speed) {
+            cJSON_DeleteSpeed(x->speed);
+        }
         if (NULL != x->year) {
             cJSON_free(x->year);
         }
+        if (NULL != x->brand) {
+            cJSON_free(x->brand);
+        }
+        if (NULL != x->sub_module) {
+            cJSON_free(x->sub_module);
+        }
         cJSON_free(x);
     }
 }
diff --git a/base/schema-cjson/test/inputs/schema/renaming-bug.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/renaming-bug.schema/default/TopLevel.h
index fc6e313..0ce74f1 100644
--- a/base/schema-cjson/test/inputs/schema/renaming-bug.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/renaming-bug.schema/default/TopLevel.h
@@ -43,9 +43,9 @@ struct CircularShape {
 };
 
 struct Part {
-    char * depth;
     char * length;
     char * width;
+    char * depth;
 };
 
 struct RectShape {
@@ -62,25 +62,25 @@ struct History {
 };
 
 struct Shape {
-    struct Geometry * geometry;
     struct History * history;
+    struct Geometry * geometry;
 };
 
 struct Berry {
-    struct Color * color;
     char * name;
+    struct Color * color;
     list_t * shapes;
 };
 
 struct Fruit {
     bool * apple;
-    list_t * berries;
     bool * orange;
+    list_t * berries;
 };
 
 struct Limit {
-    double * maximum;
     double * minimum;
+    double * maximum;
 };
 
 struct Speed {
@@ -115,12 +115,12 @@ struct VehicleType {
 };
 
 struct Vehicle {
-    char * brand;
     char * id;
-    struct Speed * speed;
-    bool * sub_module;
     struct VehicleType * type;
+    struct Speed * speed;
     char * year;
+    char * brand;
+    bool * sub_module;
 };
 
 struct TopLevel {
diff --git a/base/schema-cjson/test/inputs/schema/uuid.schema/default/TopLevel.c b/head/schema-cjson/test/inputs/schema/uuid.schema/default/TopLevel.c
index 40f238f..c06a68f 100644
--- a/base/schema-cjson/test/inputs/schema/uuid.schema/default/TopLevel.c
+++ b/head/schema-cjson/test/inputs/schema/uuid.schema/default/TopLevel.c
@@ -22,6 +22,31 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
     if (NULL != j) {
         if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
             memset(x, 0, sizeof(struct TopLevel));
+            if (cJSON_HasObjectItem(j, "one")) {
+                x->one = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "one")));
+            }
+            else {
+                if (NULL != (x->one = cJSON_malloc(sizeof(char)))) {
+                    x->one[0] = '\0';
+                }
+            }
+            if (cJSON_HasObjectItem(j, "optional")) {
+                x->optional = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional")));
+            }
+            if ((cJSON_HasObjectItem(j, "nullable")) && (!cJSON_IsNull(cJSON_GetObjectItemCaseSensitive(j, "nullable")))) {
+                x->nullable = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "nullable")));
+            }
+            if (cJSON_HasObjectItem(j, "arrOne")) {
+                list_t * x1 = list_create(false, NULL);
+                if (NULL != x1) {
+                    cJSON * e1 = NULL;
+                    cJSON * j1 = cJSON_GetObjectItemCaseSensitive(j, "arrOne");
+                    cJSON_ArrayForEach(e1, j1) {
+                        list_add_tail(x1, strdup(cJSON_GetStringValue(e1)), sizeof(char *));
+                    }
+                    x->arr_one = x1;
+                }
+            }
             if (cJSON_HasObjectItem(j, "arrNullable")) {
                 list_t * x1 = list_create(false, NULL);
                 if (NULL != x1) {
@@ -38,31 +63,6 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
                     x->arr_nullable = x1;
                 }
             }
-            if (cJSON_HasObjectItem(j, "arrOne")) {
-                list_t * x1 = list_create(false, NULL);
-                if (NULL != x1) {
-                    cJSON * e1 = NULL;
-                    cJSON * j1 = cJSON_GetObjectItemCaseSensitive(j, "arrOne");
-                    cJSON_ArrayForEach(e1, j1) {
-                        list_add_tail(x1, strdup(cJSON_GetStringValue(e1)), sizeof(char *));
-                    }
-                    x->arr_one = x1;
-                }
-            }
-            if ((cJSON_HasObjectItem(j, "nullable")) && (!cJSON_IsNull(cJSON_GetObjectItemCaseSensitive(j, "nullable")))) {
-                x->nullable = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "nullable")));
-            }
-            if (cJSON_HasObjectItem(j, "one")) {
-                x->one = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "one")));
-            }
-            else {
-                if (NULL != (x->one = cJSON_malloc(sizeof(char)))) {
-                    x->one[0] = '\0';
-                }
-            }
-            if (cJSON_HasObjectItem(j, "optional")) {
-                x->optional = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "optional")));
-            }
             if (cJSON_HasObjectItem(j, "unionWithEnum")) {
                 x->union_with_enum = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "unionWithEnum")));
             }
@@ -80,6 +80,31 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
     cJSON * j = NULL;
     if (NULL != x) {
         if (NULL != (j = cJSON_CreateObject())) {
+            if (NULL != x->one) {
+                cJSON_AddStringToObject(j, "one", x->one);
+            }
+            else {
+                cJSON_AddStringToObject(j, "one", "");
+            }
+            if (NULL != x->optional) {
+                cJSON_AddStringToObject(j, "optional", x->optional);
+            }
+            if (NULL != x->nullable) {
+                cJSON_AddStringToObject(j, "nullable", x->nullable);
+            }
+            else {
+                cJSON_AddNullToObject(j, "nullable");
+            }
+            if (NULL != x->arr_one) {
+                cJSON * j1 = cJSON_AddArrayToObject(j, "arrOne");
+                if (NULL != j1) {
+                    char * x1 = list_get_head(x->arr_one);
+                    while (NULL != x1) {
+                        cJSON_AddItemToArray(j1, cJSON_CreateString(x1));
+                        x1 = list_get_next(x->arr_one);
+                    }
+                }
+            }
             if (NULL != x->arr_nullable) {
                 cJSON * j1 = cJSON_AddArrayToObject(j, "arrNullable");
                 if (NULL != j1) {
@@ -95,31 +120,6 @@ cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
                     }
                 }
             }
-            if (NULL != x->arr_one) {
-                cJSON * j1 = cJSON_AddArrayToObject(j, "arrOne");
-                if (NULL != j1) {
-                    char * x1 = list_get_head(x->arr_one);
-                    while (NULL != x1) {
-                        cJSON_AddItemToArray(j1, cJSON_CreateString(x1));
-                        x1 = list_get_next(x->arr_one);
-                    }
-                }
-            }
-            if (NULL != x->nullable) {
-                cJSON_AddStringToObject(j, "nullable", x->nullable);
-            }
-            else {
-                cJSON_AddNullToObject(j, "nullable");
-            }
-            if (NULL != x->one) {
-                cJSON_AddStringToObject(j, "one", x->one);
-            }
-            else {
-                cJSON_AddStringToObject(j, "one", "");
-            }
-            if (NULL != x->optional) {
-                cJSON_AddStringToObject(j, "optional", x->optional);
-            }
             if (NULL != x->union_with_enum) {
                 cJSON_AddStringToObject(j, "unionWithEnum", x->union_with_enum);
             }
@@ -145,15 +145,14 @@ char * cJSON_PrintTopLevel(const struct TopLevel * x) {
 
 void cJSON_DeleteTopLevel(struct TopLevel * x) {
     if (NULL != x) {
-        if (NULL != x->arr_nullable) {
-            char * x1 = list_get_head(x->arr_nullable);
-            while (NULL != x1) {
-                if ((void *)0xDEADBEEF != x1) {
-                    cJSON_free(x1);
-                }
-                x1 = list_get_next(x->arr_nullable);
-            }
-            list_release(x->arr_nullable);
+        if (NULL != x->one) {
+            cJSON_free(x->one);
+        }
+        if (NULL != x->optional) {
+            cJSON_free(x->optional);
+        }
+        if (NULL != x->nullable) {
+            cJSON_free(x->nullable);
         }
         if (NULL != x->arr_one) {
             char * x1 = list_get_head(x->arr_one);
@@ -163,14 +162,15 @@ void cJSON_DeleteTopLevel(struct TopLevel * x) {
             }
             list_release(x->arr_one);
         }
-        if (NULL != x->nullable) {
-            cJSON_free(x->nullable);
-        }
-        if (NULL != x->one) {
-            cJSON_free(x->one);
-        }
-        if (NULL != x->optional) {
-            cJSON_free(x->optional);
+        if (NULL != x->arr_nullable) {
+            char * x1 = list_get_head(x->arr_nullable);
+            while (NULL != x1) {
+                if ((void *)0xDEADBEEF != x1) {
+                    cJSON_free(x1);
+                }
+                x1 = list_get_next(x->arr_nullable);
+            }
+            list_release(x->arr_nullable);
         }
         if (NULL != x->union_with_enum) {
             cJSON_free(x->union_with_enum);
diff --git a/base/schema-cjson/test/inputs/schema/uuid.schema/default/TopLevel.h b/head/schema-cjson/test/inputs/schema/uuid.schema/default/TopLevel.h
index c15ac0b..c8637c0 100644
--- a/base/schema-cjson/test/inputs/schema/uuid.schema/default/TopLevel.h
+++ b/head/schema-cjson/test/inputs/schema/uuid.schema/default/TopLevel.h
@@ -35,11 +35,11 @@ extern "C" {
 #endif
 
 struct TopLevel {
-    list_t * arr_nullable;
-    list_t * arr_one;
-    char * nullable;
     char * one;
     char * optional;
+    char * nullable;
+    list_t * arr_one;
+    list_t * arr_nullable;
     char * union_with_enum;
 };
 
diff --git a/base/schema-cplusplus/test/inputs/schema/accessors.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/accessors.schema/default/quicktype.hpp
index 41f1aef..7827755 100644
--- a/base/schema-cplusplus/test/inputs/schema/accessors.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/accessors.schema/default/quicktype.hpp
@@ -98,15 +98,15 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        std::string barre;
+        Union unionization;
         Enum enumerification;
         std::string foo;
-        Union unionization;
+        std::string barre;
 
         public:
-        const std::string & get_barre() const { return barre; }
-        std::string & get_mutable_barre() { return barre; }
-        void set_barre(const std::string & value) { this->barre = value; }
+        const Union & get_unionization() const { return unionization; }
+        Union & get_mutable_unionization() { return unionization; }
+        void set_unionization(const Union & value) { this->unionization = value; }
 
         const Enum & get_enumerification() const { return enumerification; }
         Enum & get_mutable_enumerification() { return enumerification; }
@@ -116,9 +116,9 @@ namespace quicktype {
         std::string & get_mutable_foo() { return foo; }
         void set_foo(const std::string & value) { this->foo = value; }
 
-        const Union & get_unionization() const { return unionization; }
-        Union & get_mutable_unionization() { return unionization; }
-        void set_unionization(const Union & value) { this->unionization = value; }
+        const std::string & get_barre() const { return barre; }
+        std::string & get_mutable_barre() { return barre; }
+        void set_barre(const std::string & value) { this->barre = value; }
     };
 }
 
@@ -138,18 +138,18 @@ struct adl_serializer<std::variant<bool, double>> {
 }
 namespace quicktype {
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_barre(j.at("bar").get<std::string>());
+        x.set_unionization(j.at("union").get<Union>());
         x.set_enumerification(j.at("enum").get<Enum>());
         x.set_foo(j.at("foo").get<std::string>());
-        x.set_unionization(j.at("union").get<Union>());
+        x.set_barre(j.at("bar").get<std::string>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["bar"] = x.get_barre();
+        j["union"] = x.get_unionization();
         j["enum"] = x.get_enumerification();
         j["foo"] = x.get_foo();
-        j["union"] = x.get_unionization();
+        j["bar"] = x.get_barre();
     }
 
     inline void from_json(const json & j, Enum & x) {
diff --git a/base/schema-cplusplus/test/inputs/schema/all-of-additional-properties-false.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/all-of-additional-properties-false.schema/default/quicktype.hpp
index 80f52f3..42ea5b3 100644
--- a/base/schema-cplusplus/test/inputs/schema/all-of-additional-properties-false.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/all-of-additional-properties-false.schema/default/quicktype.hpp
@@ -100,8 +100,8 @@ namespace quicktype {
         private:
         double amount;
         Frequency frequency;
-        std::optional<std::string> description;
         Type type;
+        std::optional<std::string> description;
 
         public:
         const double & get_amount() const { return amount; }
@@ -112,13 +112,13 @@ namespace quicktype {
         Frequency & get_mutable_frequency() { return frequency; }
         void set_frequency(const Frequency & value) { this->frequency = value; }
 
-        const std::optional<std::string> & get_description() const { return description; }
-        std::optional<std::string> & get_mutable_description() { return description; }
-        void set_description(const std::optional<std::string> & value) { this->description = value; }
-
         const Type & get_type() const { return type; }
         Type & get_mutable_type() { return type; }
         void set_type(const Type & value) { this->type = value; }
+
+        const std::optional<std::string> & get_description() const { return description; }
+        std::optional<std::string> & get_mutable_description() { return description; }
+        void set_description(const std::optional<std::string> & value) { this->description = value; }
     };
 }
 
@@ -135,16 +135,16 @@ namespace quicktype {
     inline void from_json(const json & j, TopLevel& x) {
         x.set_amount(j.at("amount").get<double>());
         x.set_frequency(j.at("frequency").get<Frequency>());
-        x.set_description(get_stack_optional<std::string>(j, "description"));
         x.set_type(j.at("type").get<Type>());
+        x.set_description(get_stack_optional<std::string>(j, "description"));
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
         j["amount"] = x.get_amount();
         j["frequency"] = x.get_frequency();
-        j["description"] = x.get_description();
         j["type"] = x.get_type();
+        j["description"] = x.get_description();
     }
 
     inline void from_json(const json & j, Frequency & x) {
diff --git a/base/schema-cplusplus/test/inputs/schema/bool-string.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/bool-string.schema/default/quicktype.hpp
index ea0e5df..c6e1fa8 100644
--- a/base/schema-cplusplus/test/inputs/schema/bool-string.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/bool-string.schema/default/quicktype.hpp
@@ -97,26 +97,15 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        std::optional<std::vector<std::optional<std::string>>> arr_nullable;
-        std::optional<std::vector<std::string>> arr_one;
-        std::optional<std::string> nullable;
         std::string one;
         std::optional<std::string> optional;
+        std::optional<std::string> nullable;
+        std::optional<std::vector<std::string>> arr_one;
+        std::optional<std::vector<std::optional<std::string>>> arr_nullable;
         UnionWithBool union_with_bool;
         UnionWithBool union_with_bool_and_enum;
 
         public:
-        const std::optional<std::vector<std::optional<std::string>>> & get_arr_nullable() const { return arr_nullable; }
-        std::optional<std::vector<std::optional<std::string>>> & get_mutable_arr_nullable() { return arr_nullable; }
-        void set_arr_nullable(const std::optional<std::vector<std::optional<std::string>>> & value) { this->arr_nullable = value; }
-
-        const std::optional<std::vector<std::string>> & get_arr_one() const { return arr_one; }
-        std::optional<std::vector<std::string>> & get_mutable_arr_one() { return arr_one; }
-        void set_arr_one(const std::optional<std::vector<std::string>> & value) { this->arr_one = value; }
-
-        std::optional<std::string> get_nullable() const { return nullable; }
-        void set_nullable(std::optional<std::string> value) { this->nullable = value; }
-
         const std::string & get_one() const { return one; }
         std::string & get_mutable_one() { return one; }
         void set_one(const std::string & value) { this->one = value; }
@@ -125,6 +114,17 @@ namespace quicktype {
         std::optional<std::string> & get_mutable_optional() { return optional; }
         void set_optional(const std::optional<std::string> & value) { this->optional = value; }
 
+        std::optional<std::string> get_nullable() const { return nullable; }
+        void set_nullable(std::optional<std::string> value) { this->nullable = value; }
+
+        const std::optional<std::vector<std::string>> & get_arr_one() const { return arr_one; }
+        std::optional<std::vector<std::string>> & get_mutable_arr_one() { return arr_one; }
+        void set_arr_one(const std::optional<std::vector<std::string>> & value) { this->arr_one = value; }
+
+        const std::optional<std::vector<std::optional<std::string>>> & get_arr_nullable() const { return arr_nullable; }
+        std::optional<std::vector<std::optional<std::string>>> & get_mutable_arr_nullable() { return arr_nullable; }
+        void set_arr_nullable(const std::optional<std::vector<std::optional<std::string>>> & value) { this->arr_nullable = value; }
+
         const UnionWithBool & get_union_with_bool() const { return union_with_bool; }
         UnionWithBool & get_mutable_union_with_bool() { return union_with_bool; }
         void set_union_with_bool(const UnionWithBool & value) { this->union_with_bool = value; }
@@ -148,22 +148,22 @@ struct adl_serializer<std::variant<bool, std::string>> {
 }
 namespace quicktype {
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_arr_nullable(get_stack_optional<std::vector<std::optional<std::string>>>(j, "arrNullable"));
-        x.set_arr_one(get_stack_optional<std::vector<std::string>>(j, "arrOne"));
-        x.set_nullable(get_stack_optional<std::string>(j, "nullable"));
         x.set_one(j.at("one").get<std::string>());
         x.set_optional(get_stack_optional<std::string>(j, "optional"));
+        x.set_nullable(get_stack_optional<std::string>(j, "nullable"));
+        x.set_arr_one(get_stack_optional<std::vector<std::string>>(j, "arrOne"));
+        x.set_arr_nullable(get_stack_optional<std::vector<std::optional<std::string>>>(j, "arrNullable"));
         x.set_union_with_bool(j.at("unionWithBool").get<UnionWithBool>());
         x.set_union_with_bool_and_enum(j.at("unionWithBoolAndEnum").get<UnionWithBool>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["arrNullable"] = x.get_arr_nullable();
-        j["arrOne"] = x.get_arr_one();
-        j["nullable"] = x.get_nullable();
         j["one"] = x.get_one();
         j["optional"] = x.get_optional();
+        j["nullable"] = x.get_nullable();
+        j["arrOne"] = x.get_arr_one();
+        j["arrNullable"] = x.get_arr_nullable();
         j["unionWithBool"] = x.get_union_with_bool();
         j["unionWithBoolAndEnum"] = x.get_union_with_bool_and_enum();
     }
diff --git a/base/schema-cplusplus/test/inputs/schema/boolean-subschema.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/boolean-subschema.schema/default/quicktype.hpp
index b9a039c..cb79d6a 100644
--- a/base/schema-cplusplus/test/inputs/schema/boolean-subschema.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/boolean-subschema.schema/default/quicktype.hpp
@@ -94,12 +94,16 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
+        std::string foo;
         nlohmann::json disallowed;
         std::vector<nlohmann::json> empty;
-        std::string foo;
         nlohmann::json impossible;
 
         public:
+        const std::string & get_foo() const { return foo; }
+        std::string & get_mutable_foo() { return foo; }
+        void set_foo(const std::string & value) { this->foo = value; }
+
         const nlohmann::json & get_disallowed() const { return disallowed; }
         nlohmann::json & get_mutable_disallowed() { return disallowed; }
         void set_disallowed(const nlohmann::json & value) { this->disallowed = value; }
@@ -108,10 +112,6 @@ namespace quicktype {
         std::vector<nlohmann::json> & get_mutable_empty() { return empty; }
         void set_empty(const std::vector<nlohmann::json> & value) { this->empty = value; }
 
-        const std::string & get_foo() const { return foo; }
-        std::string & get_mutable_foo() { return foo; }
-        void set_foo(const std::string & value) { this->foo = value; }
-
         const nlohmann::json & get_impossible() const { return impossible; }
         nlohmann::json & get_mutable_impossible() { return impossible; }
         void set_impossible(const nlohmann::json & value) { this->impossible = value; }
@@ -123,17 +123,17 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, TopLevel& x) {
+        x.set_foo(j.at("foo").get<std::string>());
         x.set_disallowed(get_untyped(j, "disallowed"));
         x.set_empty(j.at("empty").get<std::vector<nlohmann::json>>());
-        x.set_foo(j.at("foo").get<std::string>());
         x.set_impossible(get_untyped(j, "impossible"));
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
+        j["foo"] = x.get_foo();
         j["disallowed"] = x.get_disallowed();
         j["empty"] = x.get_empty();
-        j["foo"] = x.get_foo();
         j["impossible"] = x.get_impossible();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/comment-injection.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/comment-injection.schema/default/quicktype.hpp
index 4e971d8..0c3c988 100644
--- a/base/schema-cplusplus/test/inputs/schema/comment-injection.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/comment-injection.schema/default/quicktype.hpp
@@ -108,12 +108,30 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
+        std::string value;
         std::optional<std::string> trailing_backslash;
         std::optional<std::string> trailing_quote;
         std::optional<std::string> trailing_triple_quote;
-        std::string value;
 
         public:
+        /**
+         * Property delimiters:
+         * * /
+         * / *
+         * {-
+         * -}
+         * """
+         * </summary> & <br>
+         * }
+         * }
+         * }
+         * }
+         * }
+         */
+        const std::string & get_value() const { return value; }
+        std::string & get_mutable_value() { return value; }
+        void set_value(const std::string & value) { this->value = value; }
+
         /**
          * Ends with a backslash \.
          */
@@ -134,24 +152,6 @@ namespace quicktype {
         const std::optional<std::string> & get_trailing_triple_quote() const { return trailing_triple_quote; }
         std::optional<std::string> & get_mutable_trailing_triple_quote() { return trailing_triple_quote; }
         void set_trailing_triple_quote(const std::optional<std::string> & value) { this->trailing_triple_quote = value; }
-
-        /**
-         * Property delimiters:
-         * * /
-         * / *
-         * {-
-         * -}
-         * """
-         * </summary> & <br>
-         * }
-         * }
-         * }
-         * }
-         * }
-         */
-        const std::string & get_value() const { return value; }
-        std::string & get_mutable_value() { return value; }
-        void set_value(const std::string & value) { this->value = value; }
     };
 }
 
@@ -160,17 +160,17 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, TopLevel& x) {
+        x.set_value(j.at("value").get<std::string>());
         x.set_trailing_backslash(get_stack_optional<std::string>(j, "trailingBackslash"));
         x.set_trailing_quote(get_stack_optional<std::string>(j, "trailingQuote"));
         x.set_trailing_triple_quote(get_stack_optional<std::string>(j, "trailingTripleQuote"));
-        x.set_value(j.at("value").get<std::string>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
+        j["value"] = x.get_value();
         j["trailingBackslash"] = x.get_trailing_backslash();
         j["trailingQuote"] = x.get_trailing_quote();
         j["trailingTripleQuote"] = x.get_trailing_triple_quote();
-        j["value"] = x.get_value();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/const-non-string.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/const-non-string.schema/default/quicktype.hpp
index c07f15d..fb23e2c 100644
--- a/base/schema-cplusplus/test/inputs/schema/const-non-string.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/const-non-string.schema/default/quicktype.hpp
@@ -39,17 +39,25 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
+        double version;
         int64_t amount;
+        double ratio;
         bool enabled;
         Kind kind;
-        double ratio;
-        double version;
 
         public:
+        const double & get_version() const { return version; }
+        double & get_mutable_version() { return version; }
+        void set_version(const double & value) { this->version = value; }
+
         const int64_t & get_amount() const { return amount; }
         int64_t & get_mutable_amount() { return amount; }
         void set_amount(const int64_t & value) { this->amount = value; }
 
+        const double & get_ratio() const { return ratio; }
+        double & get_mutable_ratio() { return ratio; }
+        void set_ratio(const double & value) { this->ratio = value; }
+
         const bool & get_enabled() const { return enabled; }
         bool & get_mutable_enabled() { return enabled; }
         void set_enabled(const bool & value) { this->enabled = value; }
@@ -57,14 +65,6 @@ namespace quicktype {
         const Kind & get_kind() const { return kind; }
         Kind & get_mutable_kind() { return kind; }
         void set_kind(const Kind & value) { this->kind = value; }
-
-        const double & get_ratio() const { return ratio; }
-        double & get_mutable_ratio() { return ratio; }
-        void set_ratio(const double & value) { this->ratio = value; }
-
-        const double & get_version() const { return version; }
-        double & get_mutable_version() { return version; }
-        void set_version(const double & value) { this->version = value; }
     };
 }
 
@@ -76,20 +76,20 @@ namespace quicktype {
     void to_json(json & j, const Kind & x);
 
     inline void from_json(const json & j, TopLevel& x) {
+        x.set_version(j.at("version").get<double>());
         x.set_amount(j.at("amount").get<int64_t>());
+        x.set_ratio(j.at("ratio").get<double>());
         x.set_enabled(j.at("enabled").get<bool>());
         x.set_kind(j.at("kind").get<Kind>());
-        x.set_ratio(j.at("ratio").get<double>());
-        x.set_version(j.at("version").get<double>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
+        j["version"] = x.get_version();
         j["amount"] = x.get_amount();
+        j["ratio"] = x.get_ratio();
         j["enabled"] = x.get_enabled();
         j["kind"] = x.get_kind();
-        j["ratio"] = x.get_ratio();
-        j["version"] = x.get_version();
     }
 
     inline void from_json(const json & j, Kind & x) {
diff --git a/base/schema-cplusplus/test/inputs/schema/date-time-or-string.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/date-time-or-string.schema/default/quicktype.hpp
index d105d51..c66517a 100644
--- a/base/schema-cplusplus/test/inputs/schema/date-time-or-string.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/date-time-or-string.schema/default/quicktype.hpp
@@ -37,17 +37,17 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        std::string bar;
         std::string foo;
+        std::string bar;
 
         public:
-        const std::string & get_bar() const { return bar; }
-        std::string & get_mutable_bar() { return bar; }
-        void set_bar(const std::string & value) { this->bar = value; }
-
         const std::string & get_foo() const { return foo; }
         std::string & get_mutable_foo() { return foo; }
         void set_foo(const std::string & value) { this->foo = value; }
+
+        const std::string & get_bar() const { return bar; }
+        std::string & get_mutable_bar() { return bar; }
+        void set_bar(const std::string & value) { this->bar = value; }
     };
 }
 
@@ -56,13 +56,13 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_bar(j.at("bar").get<std::string>());
         x.set_foo(j.at("foo").get<std::string>());
+        x.set_bar(j.at("bar").get<std::string>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["bar"] = x.get_bar();
         j["foo"] = x.get_foo();
+        j["bar"] = x.get_bar();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/date-time.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/date-time.schema/default/quicktype.hpp
index d4ed121..d2f9f12 100644
--- a/base/schema-cplusplus/test/inputs/schema/date-time.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/date-time.schema/default/quicktype.hpp
@@ -96,32 +96,32 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        std::vector<ComplexUnionArray> complex_union_array;
         std::string date;
-        std::string date_time;
         std::string time;
+        std::string date_time;
         std::vector<std::string> union_array;
+        std::vector<ComplexUnionArray> complex_union_array;
 
         public:
-        const std::vector<ComplexUnionArray> & get_complex_union_array() const { return complex_union_array; }
-        std::vector<ComplexUnionArray> & get_mutable_complex_union_array() { return complex_union_array; }
-        void set_complex_union_array(const std::vector<ComplexUnionArray> & value) { this->complex_union_array = value; }
-
         const std::string & get_date() const { return date; }
         std::string & get_mutable_date() { return date; }
         void set_date(const std::string & value) { this->date = value; }
 
-        const std::string & get_date_time() const { return date_time; }
-        std::string & get_mutable_date_time() { return date_time; }
-        void set_date_time(const std::string & value) { this->date_time = value; }
-
         const std::string & get_time() const { return time; }
         std::string & get_mutable_time() { return time; }
         void set_time(const std::string & value) { this->time = value; }
 
+        const std::string & get_date_time() const { return date_time; }
+        std::string & get_mutable_date_time() { return date_time; }
+        void set_date_time(const std::string & value) { this->date_time = value; }
+
         const std::vector<std::string> & get_union_array() const { return union_array; }
         std::vector<std::string> & get_mutable_union_array() { return union_array; }
         void set_union_array(const std::vector<std::string> & value) { this->union_array = value; }
+
+        const std::vector<ComplexUnionArray> & get_complex_union_array() const { return complex_union_array; }
+        std::vector<ComplexUnionArray> & get_mutable_complex_union_array() { return complex_union_array; }
+        void set_complex_union_array(const std::vector<ComplexUnionArray> & value) { this->complex_union_array = value; }
     };
 }
 
@@ -138,20 +138,20 @@ struct adl_serializer<std::variant<int64_t, std::string>> {
 }
 namespace quicktype {
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_complex_union_array(j.at("complex-union-array").get<std::vector<ComplexUnionArray>>());
         x.set_date(j.at("date").get<std::string>());
-        x.set_date_time(j.at("date-time").get<std::string>());
         x.set_time(j.at("time").get<std::string>());
+        x.set_date_time(j.at("date-time").get<std::string>());
         x.set_union_array(j.at("union-array").get<std::vector<std::string>>());
+        x.set_complex_union_array(j.at("complex-union-array").get<std::vector<ComplexUnionArray>>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["complex-union-array"] = x.get_complex_union_array();
         j["date"] = x.get_date();
-        j["date-time"] = x.get_date_time();
         j["time"] = x.get_time();
+        j["date-time"] = x.get_date_time();
         j["union-array"] = x.get_union_array();
+        j["complex-union-array"] = x.get_complex_union_array();
     }
 }
 namespace nlohmann {
diff --git a/base/schema-cplusplus/test/inputs/schema/description.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/description.schema/default/quicktype.hpp
index 50bb3be..9f8b754 100644
--- a/base/schema-cplusplus/test/inputs/schema/description.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/description.schema/default/quicktype.hpp
@@ -125,19 +125,19 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        std::optional<bool> bar;
+        Union top_level_union;
         Enum top_level_enum;
         std::optional<double> foo;
+        std::optional<bool> bar;
         ObjectOrStringUnion object_or_string;
-        Union top_level_union;
 
         public:
         /**
-         * A pretty boolean
+         * Either a number or a string
          */
-        const std::optional<bool> & get_bar() const { return bar; }
-        std::optional<bool> & get_mutable_bar() { return bar; }
-        void set_bar(const std::optional<bool> & value) { this->bar = value; }
+        const Union & get_top_level_union() const { return top_level_union; }
+        Union & get_mutable_top_level_union() { return top_level_union; }
+        void set_top_level_union(const Union & value) { this->top_level_union = value; }
 
         /**
          * An enumeration
@@ -150,16 +150,16 @@ namespace quicktype {
         std::optional<double> & get_mutable_foo() { return foo; }
         void set_foo(const std::optional<double> & value) { this->foo = value; }
 
+        /**
+         * A pretty boolean
+         */
+        const std::optional<bool> & get_bar() const { return bar; }
+        std::optional<bool> & get_mutable_bar() { return bar; }
+        void set_bar(const std::optional<bool> & value) { this->bar = value; }
+
         const ObjectOrStringUnion & get_object_or_string() const { return object_or_string; }
         ObjectOrStringUnion & get_mutable_object_or_string() { return object_or_string; }
         void set_object_or_string(const ObjectOrStringUnion & value) { this->object_or_string = value; }
-
-        /**
-         * Either a number or a string
-         */
-        const Union & get_top_level_union() const { return top_level_union; }
-        Union & get_mutable_top_level_union() { return top_level_union; }
-        void set_top_level_union(const Union & value) { this->top_level_union = value; }
     };
 }
 
@@ -197,20 +197,20 @@ namespace quicktype {
     }
 
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_bar(get_stack_optional<bool>(j, "bar"));
+        x.set_top_level_union(j.at("union").get<Union>());
         x.set_top_level_enum(j.at("enum").get<Enum>());
         x.set_foo(get_stack_optional<double>(j, "foo"));
+        x.set_bar(get_stack_optional<bool>(j, "bar"));
         x.set_object_or_string(j.at("object-or-string").get<ObjectOrStringUnion>());
-        x.set_top_level_union(j.at("union").get<Union>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["bar"] = x.get_bar();
+        j["union"] = x.get_top_level_union();
         j["enum"] = x.get_top_level_enum();
         j["foo"] = x.get_foo();
+        j["bar"] = x.get_bar();
         j["object-or-string"] = x.get_object_or_string();
-        j["union"] = x.get_top_level_union();
     }
 
     inline void from_json(const json & j, Enum & x) {
diff --git a/base/schema-cplusplus/test/inputs/schema/direct-union.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/direct-union.schema/default/quicktype.hpp
index c0a42bc..8abf260 100644
--- a/base/schema-cplusplus/test/inputs/schema/direct-union.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/direct-union.schema/default/quicktype.hpp
@@ -97,15 +97,15 @@ namespace quicktype {
         virtual ~Thing() = default;
 
         private:
-        Anything optional;
         Anything required;
+        Anything optional;
 
         public:
-        Anything get_optional() const { return optional; }
-        void set_optional(Anything value) { this->optional = value; }
-
         Anything get_required() const { return required; }
         void set_required(Anything value) { this->required = value; }
+
+        Anything get_optional() const { return optional; }
+        void set_optional(Anything value) { this->optional = value; }
     };
 
     class TopLevel {
@@ -139,14 +139,14 @@ struct adl_serializer<std::variant<std::vector<json>, bool, double, int64_t, std
 }
 namespace quicktype {
     inline void from_json(const json & j, Thing& x) {
-        x.set_optional(get_stack_optional<std::variant<std::vector<nlohmann::json>, bool, double, int64_t, std::map<std::string, nlohmann::json>, std::string>>(j, "optional"));
         x.set_required(get_stack_optional<std::variant<std::vector<nlohmann::json>, bool, double, int64_t, std::map<std::string, nlohmann::json>, std::string>>(j, "required"));
+        x.set_optional(get_stack_optional<std::variant<std::vector<nlohmann::json>, bool, double, int64_t, std::map<std::string, nlohmann::json>, std::string>>(j, "optional"));
     }
 
     inline void to_json(json & j, const Thing & x) {
         j = json::object();
-        j["optional"] = x.get_optional();
         j["required"] = x.get_required();
+        j["optional"] = x.get_optional();
     }
 
     inline void from_json(const json & j, TopLevel& x) {
diff --git a/base/schema-cplusplus/test/inputs/schema/enum.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/enum.schema/default/quicktype.hpp
index 12cdfe6..bf2d23e 100644
--- a/base/schema-cplusplus/test/inputs/schema/enum.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/enum.schema/default/quicktype.hpp
@@ -103,32 +103,32 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        std::optional<std::vector<Arr>> arr;
-        std::optional<std::string> top_level_for;
-        Gve gve;
         std::optional<Lvc> lvc;
+        Gve gve;
+        std::optional<std::vector<Arr>> arr;
         std::optional<std::vector<OtherArr>> other_arr;
+        std::optional<std::string> top_level_for;
 
         public:
-        const std::optional<std::vector<Arr>> & get_arr() const { return arr; }
-        std::optional<std::vector<Arr>> & get_mutable_arr() { return arr; }
-        void set_arr(const std::optional<std::vector<Arr>> & value) { this->arr = value; }
-
-        const std::optional<std::string> & get_top_level_for() const { return top_level_for; }
-        std::optional<std::string> & get_mutable_top_level_for() { return top_level_for; }
-        void set_top_level_for(const std::optional<std::string> & value) { this->top_level_for = value; }
+        const std::optional<Lvc> & get_lvc() const { return lvc; }
+        std::optional<Lvc> & get_mutable_lvc() { return lvc; }
+        void set_lvc(const std::optional<Lvc> & value) { this->lvc = value; }
 
         const Gve & get_gve() const { return gve; }
         Gve & get_mutable_gve() { return gve; }
         void set_gve(const Gve & value) { this->gve = value; }
 
-        const std::optional<Lvc> & get_lvc() const { return lvc; }
-        std::optional<Lvc> & get_mutable_lvc() { return lvc; }
-        void set_lvc(const std::optional<Lvc> & value) { this->lvc = value; }
+        const std::optional<std::vector<Arr>> & get_arr() const { return arr; }
+        std::optional<std::vector<Arr>> & get_mutable_arr() { return arr; }
+        void set_arr(const std::optional<std::vector<Arr>> & value) { this->arr = value; }
 
         const std::optional<std::vector<OtherArr>> & get_other_arr() const { return other_arr; }
         std::optional<std::vector<OtherArr>> & get_mutable_other_arr() { return other_arr; }
         void set_other_arr(const std::optional<std::vector<OtherArr>> & value) { this->other_arr = value; }
+
+        const std::optional<std::string> & get_top_level_for() const { return top_level_for; }
+        std::optional<std::string> & get_mutable_top_level_for() { return top_level_for; }
+        void set_top_level_for(const std::optional<std::string> & value) { this->top_level_for = value; }
     };
 }
 
@@ -154,20 +154,20 @@ struct adl_serializer<std::variant<quicktype::OtherArr, int64_t>> {
 }
 namespace quicktype {
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_arr(get_stack_optional<std::vector<Arr>>(j, "arr"));
-        x.set_top_level_for(get_stack_optional<std::string>(j, "for"));
-        x.set_gve(j.at("gve").get<Gve>());
         x.set_lvc(get_stack_optional<Lvc>(j, "lvc"));
+        x.set_gve(j.at("gve").get<Gve>());
+        x.set_arr(get_stack_optional<std::vector<Arr>>(j, "arr"));
         x.set_other_arr(get_stack_optional<std::vector<OtherArr>>(j, "otherArr"));
+        x.set_top_level_for(get_stack_optional<std::string>(j, "for"));
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["arr"] = x.get_arr();
-        j["for"] = x.get_top_level_for();
-        j["gve"] = x.get_gve();
         j["lvc"] = x.get_lvc();
+        j["gve"] = x.get_gve();
+        j["arr"] = x.get_arr();
         j["otherArr"] = x.get_other_arr();
+        j["for"] = x.get_top_level_for();
     }
 
     inline void from_json(const json & j, OtherArr & x) {
diff --git a/base/schema-cplusplus/test/inputs/schema/integer-string.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/integer-string.schema/default/quicktype.hpp
index 9996e5e..19cc844 100644
--- a/base/schema-cplusplus/test/inputs/schema/integer-string.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/integer-string.schema/default/quicktype.hpp
@@ -97,26 +97,15 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        std::optional<std::vector<std::optional<std::string>>> arr_nullable;
-        std::optional<std::vector<std::string>> arr_one;
-        std::optional<std::string> nullable;
         std::string one;
         std::optional<std::string> optional;
+        std::optional<std::string> nullable;
+        std::optional<std::vector<std::string>> arr_one;
+        std::optional<std::vector<std::optional<std::string>>> arr_nullable;
         UnionWithInt union_with_int;
         UnionWithInt union_with_int_and_enum;
 
         public:
-        const std::optional<std::vector<std::optional<std::string>>> & get_arr_nullable() const { return arr_nullable; }
-        std::optional<std::vector<std::optional<std::string>>> & get_mutable_arr_nullable() { return arr_nullable; }
-        void set_arr_nullable(const std::optional<std::vector<std::optional<std::string>>> & value) { this->arr_nullable = value; }
-
-        const std::optional<std::vector<std::string>> & get_arr_one() const { return arr_one; }
-        std::optional<std::vector<std::string>> & get_mutable_arr_one() { return arr_one; }
-        void set_arr_one(const std::optional<std::vector<std::string>> & value) { this->arr_one = value; }
-
-        std::optional<std::string> get_nullable() const { return nullable; }
-        void set_nullable(std::optional<std::string> value) { this->nullable = value; }
-
         const std::string & get_one() const { return one; }
         std::string & get_mutable_one() { return one; }
         void set_one(const std::string & value) { this->one = value; }
@@ -125,6 +114,17 @@ namespace quicktype {
         std::optional<std::string> & get_mutable_optional() { return optional; }
         void set_optional(const std::optional<std::string> & value) { this->optional = value; }
 
+        std::optional<std::string> get_nullable() const { return nullable; }
+        void set_nullable(std::optional<std::string> value) { this->nullable = value; }
+
+        const std::optional<std::vector<std::string>> & get_arr_one() const { return arr_one; }
+        std::optional<std::vector<std::string>> & get_mutable_arr_one() { return arr_one; }
+        void set_arr_one(const std::optional<std::vector<std::string>> & value) { this->arr_one = value; }
+
+        const std::optional<std::vector<std::optional<std::string>>> & get_arr_nullable() const { return arr_nullable; }
+        std::optional<std::vector<std::optional<std::string>>> & get_mutable_arr_nullable() { return arr_nullable; }
+        void set_arr_nullable(const std::optional<std::vector<std::optional<std::string>>> & value) { this->arr_nullable = value; }
+
         const UnionWithInt & get_union_with_int() const { return union_with_int; }
         UnionWithInt & get_mutable_union_with_int() { return union_with_int; }
         void set_union_with_int(const UnionWithInt & value) { this->union_with_int = value; }
@@ -148,22 +148,22 @@ struct adl_serializer<std::variant<int64_t, std::string>> {
 }
 namespace quicktype {
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_arr_nullable(get_stack_optional<std::vector<std::optional<std::string>>>(j, "arrNullable"));
-        x.set_arr_one(get_stack_optional<std::vector<std::string>>(j, "arrOne"));
-        x.set_nullable(get_stack_optional<std::string>(j, "nullable"));
         x.set_one(j.at("one").get<std::string>());
         x.set_optional(get_stack_optional<std::string>(j, "optional"));
+        x.set_nullable(get_stack_optional<std::string>(j, "nullable"));
+        x.set_arr_one(get_stack_optional<std::vector<std::string>>(j, "arrOne"));
+        x.set_arr_nullable(get_stack_optional<std::vector<std::optional<std::string>>>(j, "arrNullable"));
         x.set_union_with_int(j.at("unionWithInt").get<UnionWithInt>());
         x.set_union_with_int_and_enum(j.at("unionWithIntAndEnum").get<UnionWithInt>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["arrNullable"] = x.get_arr_nullable();
-        j["arrOne"] = x.get_arr_one();
-        j["nullable"] = x.get_nullable();
         j["one"] = x.get_one();
         j["optional"] = x.get_optional();
+        j["nullable"] = x.get_nullable();
+        j["arrOne"] = x.get_arr_one();
+        j["arrNullable"] = x.get_arr_nullable();
         j["unionWithInt"] = x.get_union_with_int();
         j["unionWithIntAndEnum"] = x.get_union_with_int_and_enum();
     }
diff --git a/base/schema-cplusplus/test/inputs/schema/integer-type.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/integer-type.schema/default/quicktype.hpp
index 05876bf..41661ed 100644
--- a/base/schema-cplusplus/test/inputs/schema/integer-type.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/integer-type.schema/default/quicktype.hpp
@@ -165,72 +165,72 @@ namespace quicktype {
     class TopLevel {
         public:
         TopLevel() :
+            small_positive_constraint(0, 100, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
+            small_negative_constraint(-100, 0, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
+            i32_range_constraint(-2147483648, 2147483647, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
             above_i32_max_constraint(0, 2147483648, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
             below_i32_min_constraint(-2147483649, 0, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
-            i32_range_constraint(-2147483648, 2147483647, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
-            large_bounds_constraint(-9007199254740991, 9007199254740991, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
-            only_maximum_constraint(std::nullopt, 0, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
             only_minimum_constraint(0, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
-            small_negative_constraint(-100, 0, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
-            small_positive_constraint(0, 100, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt)
+            only_maximum_constraint(std::nullopt, 0, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
+            large_bounds_constraint(-9007199254740991, 9007199254740991, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt)
         {}
         virtual ~TopLevel() = default;
 
         private:
+        int64_t small_positive;
+        ClassMemberConstraints small_positive_constraint;
+        int64_t small_negative;
+        ClassMemberConstraints small_negative_constraint;
+        int64_t i32_range;
+        ClassMemberConstraints i32_range_constraint;
         int64_t above_i32_max;
         ClassMemberConstraints above_i32_max_constraint;
         int64_t below_i32_min;
         ClassMemberConstraints below_i32_min_constraint;
-        int64_t i32_range;
-        ClassMemberConstraints i32_range_constraint;
-        int64_t large_bounds;
-        ClassMemberConstraints large_bounds_constraint;
-        int64_t only_maximum;
-        ClassMemberConstraints only_maximum_constraint;
         int64_t only_minimum;
         ClassMemberConstraints only_minimum_constraint;
-        int64_t small_negative;
-        ClassMemberConstraints small_negative_constraint;
-        int64_t small_positive;
-        ClassMemberConstraints small_positive_constraint;
+        int64_t only_maximum;
+        ClassMemberConstraints only_maximum_constraint;
         int64_t unbounded;
+        int64_t large_bounds;
+        ClassMemberConstraints large_bounds_constraint;
 
         public:
-        const int64_t & get_above_i32_max() const { return above_i32_max; }
-        int64_t & get_mutable_above_i32_max() { return above_i32_max; }
-        void set_above_i32_max(const int64_t & value) { CheckConstraint("above_i32_max", above_i32_max_constraint, value); this->above_i32_max = value; }
+        const int64_t & get_small_positive() const { return small_positive; }
+        int64_t & get_mutable_small_positive() { return small_positive; }
+        void set_small_positive(const int64_t & value) { CheckConstraint("small_positive", small_positive_constraint, value); this->small_positive = value; }
 
-        const int64_t & get_below_i32_min() const { return below_i32_min; }
-        int64_t & get_mutable_below_i32_min() { return below_i32_min; }
-        void set_below_i32_min(const int64_t & value) { CheckConstraint("below_i32_min", below_i32_min_constraint, value); this->below_i32_min = value; }
+        const int64_t & get_small_negative() const { return small_negative; }
+        int64_t & get_mutable_small_negative() { return small_negative; }
+        void set_small_negative(const int64_t & value) { CheckConstraint("small_negative", small_negative_constraint, value); this->small_negative = value; }
 
         const int64_t & get_i32_range() const { return i32_range; }
         int64_t & get_mutable_i32_range() { return i32_range; }
         void set_i32_range(const int64_t & value) { CheckConstraint("i32_range", i32_range_constraint, value); this->i32_range = value; }
 
-        const int64_t & get_large_bounds() const { return large_bounds; }
-        int64_t & get_mutable_large_bounds() { return large_bounds; }
-        void set_large_bounds(const int64_t & value) { CheckConstraint("large_bounds", large_bounds_constraint, value); this->large_bounds = value; }
+        const int64_t & get_above_i32_max() const { return above_i32_max; }
+        int64_t & get_mutable_above_i32_max() { return above_i32_max; }
+        void set_above_i32_max(const int64_t & value) { CheckConstraint("above_i32_max", above_i32_max_constraint, value); this->above_i32_max = value; }
 
-        const int64_t & get_only_maximum() const { return only_maximum; }
-        int64_t & get_mutable_only_maximum() { return only_maximum; }
-        void set_only_maximum(const int64_t & value) { CheckConstraint("only_maximum", only_maximum_constraint, value); this->only_maximum = value; }
+        const int64_t & get_below_i32_min() const { return below_i32_min; }
+        int64_t & get_mutable_below_i32_min() { return below_i32_min; }
+        void set_below_i32_min(const int64_t & value) { CheckConstraint("below_i32_min", below_i32_min_constraint, value); this->below_i32_min = value; }
 
         const int64_t & get_only_minimum() const { return only_minimum; }
         int64_t & get_mutable_only_minimum() { return only_minimum; }
         void set_only_minimum(const int64_t & value) { CheckConstraint("only_minimum", only_minimum_constraint, value); this->only_minimum = value; }
 
-        const int64_t & get_small_negative() const { return small_negative; }
-        int64_t & get_mutable_small_negative() { return small_negative; }
-        void set_small_negative(const int64_t & value) { CheckConstraint("small_negative", small_negative_constraint, value); this->small_negative = value; }
-
-        const int64_t & get_small_positive() const { return small_positive; }
-        int64_t & get_mutable_small_positive() { return small_positive; }
-        void set_small_positive(const int64_t & value) { CheckConstraint("small_positive", small_positive_constraint, value); this->small_positive = value; }
+        const int64_t & get_only_maximum() const { return only_maximum; }
+        int64_t & get_mutable_only_maximum() { return only_maximum; }
+        void set_only_maximum(const int64_t & value) { CheckConstraint("only_maximum", only_maximum_constraint, value); this->only_maximum = value; }
 
         const int64_t & get_unbounded() const { return unbounded; }
         int64_t & get_mutable_unbounded() { return unbounded; }
         void set_unbounded(const int64_t & value) { this->unbounded = value; }
+
+        const int64_t & get_large_bounds() const { return large_bounds; }
+        int64_t & get_mutable_large_bounds() { return large_bounds; }
+        void set_large_bounds(const int64_t & value) { CheckConstraint("large_bounds", large_bounds_constraint, value); this->large_bounds = value; }
     };
 }
 
@@ -239,27 +239,27 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, TopLevel& x) {
+        x.set_small_positive(j.at("small_positive").get<int64_t>());
+        x.set_small_negative(j.at("small_negative").get<int64_t>());
+        x.set_i32_range(j.at("i32_range").get<int64_t>());
         x.set_above_i32_max(j.at("above_i32_max").get<int64_t>());
         x.set_below_i32_min(j.at("below_i32_min").get<int64_t>());
-        x.set_i32_range(j.at("i32_range").get<int64_t>());
-        x.set_large_bounds(j.at("large_bounds").get<int64_t>());
-        x.set_only_maximum(j.at("only_maximum").get<int64_t>());
         x.set_only_minimum(j.at("only_minimum").get<int64_t>());
-        x.set_small_negative(j.at("small_negative").get<int64_t>());
-        x.set_small_positive(j.at("small_positive").get<int64_t>());
+        x.set_only_maximum(j.at("only_maximum").get<int64_t>());
         x.set_unbounded(j.at("unbounded").get<int64_t>());
+        x.set_large_bounds(j.at("large_bounds").get<int64_t>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
+        j["small_positive"] = x.get_small_positive();
+        j["small_negative"] = x.get_small_negative();
+        j["i32_range"] = x.get_i32_range();
         j["above_i32_max"] = x.get_above_i32_max();
         j["below_i32_min"] = x.get_below_i32_min();
-        j["i32_range"] = x.get_i32_range();
-        j["large_bounds"] = x.get_large_bounds();
-        j["only_maximum"] = x.get_only_maximum();
         j["only_minimum"] = x.get_only_minimum();
-        j["small_negative"] = x.get_small_negative();
-        j["small_positive"] = x.get_small_positive();
+        j["only_maximum"] = x.get_only_maximum();
         j["unbounded"] = x.get_unbounded();
+        j["large_bounds"] = x.get_large_bounds();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/light.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/light.schema/default/quicktype.hpp
index df07a06..e08894c 100644
--- a/base/schema-cplusplus/test/inputs/schema/light.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/light.schema/default/quicktype.hpp
@@ -37,19 +37,19 @@ namespace quicktype {
         virtual ~LightParams() = default;
 
         private:
-        std::string app_id;
         std::string outlet_id;
+        std::string app_id;
         std::string rgba;
 
         public:
-        const std::string & get_app_id() const { return app_id; }
-        std::string & get_mutable_app_id() { return app_id; }
-        void set_app_id(const std::string & value) { this->app_id = value; }
-
         const std::string & get_outlet_id() const { return outlet_id; }
         std::string & get_mutable_outlet_id() { return outlet_id; }
         void set_outlet_id(const std::string & value) { this->outlet_id = value; }
 
+        const std::string & get_app_id() const { return app_id; }
+        std::string & get_mutable_app_id() { return app_id; }
+        void set_app_id(const std::string & value) { this->app_id = value; }
+
         const std::string & get_rgba() const { return rgba; }
         std::string & get_mutable_rgba() { return rgba; }
         void set_rgba(const std::string & value) { this->rgba = value; }
@@ -78,15 +78,15 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, LightParams& x) {
-        x.set_app_id(j.at("app_id").get<std::string>());
         x.set_outlet_id(j.at("outlet_id").get<std::string>());
+        x.set_app_id(j.at("app_id").get<std::string>());
         x.set_rgba(j.at("rgba").get<std::string>());
     }
 
     inline void to_json(json & j, const LightParams & x) {
         j = json::object();
-        j["app_id"] = x.get_app_id();
         j["outlet_id"] = x.get_outlet_id();
+        j["app_id"] = x.get_app_id();
         j["rgba"] = x.get_rgba();
     }
 
diff --git a/base/schema-cplusplus/test/inputs/schema/min-max-items.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/min-max-items.schema/default/quicktype.hpp
index fafdd80..3da90e1 100644
--- a/base/schema-cplusplus/test/inputs/schema/min-max-items.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/min-max-items.schema/default/quicktype.hpp
@@ -96,13 +96,17 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
+        std::vector<std::string> min_only;
         std::vector<int64_t> max_only;
         std::vector<double> min_and_max;
-        std::vector<std::string> min_only;
         std::vector<std::string> plain;
         std::vector<UnionItem> union_items;
 
         public:
+        const std::vector<std::string> & get_min_only() const { return min_only; }
+        std::vector<std::string> & get_mutable_min_only() { return min_only; }
+        void set_min_only(const std::vector<std::string> & value) { this->min_only = value; }
+
         const std::vector<int64_t> & get_max_only() const { return max_only; }
         std::vector<int64_t> & get_mutable_max_only() { return max_only; }
         void set_max_only(const std::vector<int64_t> & value) { this->max_only = value; }
@@ -111,10 +115,6 @@ namespace quicktype {
         std::vector<double> & get_mutable_min_and_max() { return min_and_max; }
         void set_min_and_max(const std::vector<double> & value) { this->min_and_max = value; }
 
-        const std::vector<std::string> & get_min_only() const { return min_only; }
-        std::vector<std::string> & get_mutable_min_only() { return min_only; }
-        void set_min_only(const std::vector<std::string> & value) { this->min_only = value; }
-
         const std::vector<std::string> & get_plain() const { return plain; }
         std::vector<std::string> & get_mutable_plain() { return plain; }
         void set_plain(const std::vector<std::string> & value) { this->plain = value; }
@@ -138,18 +138,18 @@ struct adl_serializer<std::variant<int64_t, std::string>> {
 }
 namespace quicktype {
     inline void from_json(const json & j, TopLevel& x) {
+        x.set_min_only(j.at("minOnly").get<std::vector<std::string>>());
         x.set_max_only(j.at("maxOnly").get<std::vector<int64_t>>());
         x.set_min_and_max(j.at("minAndMax").get<std::vector<double>>());
-        x.set_min_only(j.at("minOnly").get<std::vector<std::string>>());
         x.set_plain(j.at("plain").get<std::vector<std::string>>());
         x.set_union_items(j.at("unionItems").get<std::vector<UnionItem>>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
+        j["minOnly"] = x.get_min_only();
         j["maxOnly"] = x.get_max_only();
         j["minAndMax"] = x.get_min_and_max();
-        j["minOnly"] = x.get_min_only();
         j["plain"] = x.get_plain();
         j["unionItems"] = x.get_union_items();
     }
diff --git a/base/schema-cplusplus/test/inputs/schema/minmax-integer.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/minmax-integer.schema/default/quicktype.hpp
index 61a0149..5337422 100644
--- a/base/schema-cplusplus/test/inputs/schema/minmax-integer.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/minmax-integer.schema/default/quicktype.hpp
@@ -165,63 +165,63 @@ namespace quicktype {
     class TopLevel {
         public:
         TopLevel() :
-            intersection_constraint(4, 5, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
-            max_constraint(std::nullopt, 5, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
             min_constraint(3, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
+            max_constraint(std::nullopt, 5, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
             minmax_constraint(3, 5, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
-            min_max_intersection_constraint(3, 5, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
-            union_constraint(3, 6, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt)
+            union_constraint(3, 6, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
+            intersection_constraint(4, 5, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
+            min_max_intersection_constraint(3, 5, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt)
         {}
         virtual ~TopLevel() = default;
 
         private:
         int64_t free;
-        int64_t intersection;
-        ClassMemberConstraints intersection_constraint;
-        int64_t max;
-        ClassMemberConstraints max_constraint;
         int64_t min;
         ClassMemberConstraints min_constraint;
+        int64_t max;
+        ClassMemberConstraints max_constraint;
         int64_t minmax;
         ClassMemberConstraints minmax_constraint;
-        int64_t min_max_intersection;
-        ClassMemberConstraints min_max_intersection_constraint;
-        int64_t min_max_union;
         int64_t top_level_union;
         ClassMemberConstraints union_constraint;
+        int64_t min_max_union;
+        int64_t intersection;
+        ClassMemberConstraints intersection_constraint;
+        int64_t min_max_intersection;
+        ClassMemberConstraints min_max_intersection_constraint;
 
         public:
         const int64_t & get_free() const { return free; }
         int64_t & get_mutable_free() { return free; }
         void set_free(const int64_t & value) { this->free = value; }
 
-        const int64_t & get_intersection() const { return intersection; }
-        int64_t & get_mutable_intersection() { return intersection; }
-        void set_intersection(const int64_t & value) { CheckConstraint("intersection", intersection_constraint, value); this->intersection = value; }
+        const int64_t & get_min() const { return min; }
+        int64_t & get_mutable_min() { return min; }
+        void set_min(const int64_t & value) { CheckConstraint("min", min_constraint, value); this->min = value; }
 
         const int64_t & get_max() const { return max; }
         int64_t & get_mutable_max() { return max; }
         void set_max(const int64_t & value) { CheckConstraint("max", max_constraint, value); this->max = value; }
 
-        const int64_t & get_min() const { return min; }
-        int64_t & get_mutable_min() { return min; }
-        void set_min(const int64_t & value) { CheckConstraint("min", min_constraint, value); this->min = value; }
-
         const int64_t & get_minmax() const { return minmax; }
         int64_t & get_mutable_minmax() { return minmax; }
         void set_minmax(const int64_t & value) { CheckConstraint("minmax", minmax_constraint, value); this->minmax = value; }
 
-        const int64_t & get_min_max_intersection() const { return min_max_intersection; }
-        int64_t & get_mutable_min_max_intersection() { return min_max_intersection; }
-        void set_min_max_intersection(const int64_t & value) { CheckConstraint("min_max_intersection", min_max_intersection_constraint, value); this->min_max_intersection = value; }
+        const int64_t & get_top_level_union() const { return top_level_union; }
+        int64_t & get_mutable_top_level_union() { return top_level_union; }
+        void set_top_level_union(const int64_t & value) { CheckConstraint("top_level_union", union_constraint, value); this->top_level_union = value; }
 
         const int64_t & get_min_max_union() const { return min_max_union; }
         int64_t & get_mutable_min_max_union() { return min_max_union; }
         void set_min_max_union(const int64_t & value) { this->min_max_union = value; }
 
-        const int64_t & get_top_level_union() const { return top_level_union; }
-        int64_t & get_mutable_top_level_union() { return top_level_union; }
-        void set_top_level_union(const int64_t & value) { CheckConstraint("top_level_union", union_constraint, value); this->top_level_union = value; }
+        const int64_t & get_intersection() const { return intersection; }
+        int64_t & get_mutable_intersection() { return intersection; }
+        void set_intersection(const int64_t & value) { CheckConstraint("intersection", intersection_constraint, value); this->intersection = value; }
+
+        const int64_t & get_min_max_intersection() const { return min_max_intersection; }
+        int64_t & get_mutable_min_max_intersection() { return min_max_intersection; }
+        void set_min_max_intersection(const int64_t & value) { CheckConstraint("min_max_intersection", min_max_intersection_constraint, value); this->min_max_intersection = value; }
     };
 }
 
@@ -231,24 +231,24 @@ namespace quicktype {
 
     inline void from_json(const json & j, TopLevel& x) {
         x.set_free(j.at("free").get<int64_t>());
-        x.set_intersection(j.at("intersection").get<int64_t>());
-        x.set_max(j.at("max").get<int64_t>());
         x.set_min(j.at("min").get<int64_t>());
+        x.set_max(j.at("max").get<int64_t>());
         x.set_minmax(j.at("minmax").get<int64_t>());
-        x.set_min_max_intersection(j.at("minMaxIntersection").get<int64_t>());
-        x.set_min_max_union(j.at("minMaxUnion").get<int64_t>());
         x.set_top_level_union(j.at("union").get<int64_t>());
+        x.set_min_max_union(j.at("minMaxUnion").get<int64_t>());
+        x.set_intersection(j.at("intersection").get<int64_t>());
+        x.set_min_max_intersection(j.at("minMaxIntersection").get<int64_t>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
         j["free"] = x.get_free();
-        j["intersection"] = x.get_intersection();
-        j["max"] = x.get_max();
         j["min"] = x.get_min();
+        j["max"] = x.get_max();
         j["minmax"] = x.get_minmax();
-        j["minMaxIntersection"] = x.get_min_max_intersection();
-        j["minMaxUnion"] = x.get_min_max_union();
         j["union"] = x.get_top_level_union();
+        j["minMaxUnion"] = x.get_min_max_union();
+        j["intersection"] = x.get_intersection();
+        j["minMaxIntersection"] = x.get_min_max_intersection();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/minmax.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/minmax.schema/default/quicktype.hpp
index 5c746da..7661251 100644
--- a/base/schema-cplusplus/test/inputs/schema/minmax.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/minmax.schema/default/quicktype.hpp
@@ -165,63 +165,63 @@ namespace quicktype {
     class TopLevel {
         public:
         TopLevel() :
-            intersection_constraint(std::nullopt, std::nullopt, 4, 5, std::nullopt, std::nullopt, std::nullopt),
-            max_constraint(std::nullopt, std::nullopt, std::nullopt, 5, std::nullopt, std::nullopt, std::nullopt),
             min_constraint(std::nullopt, std::nullopt, 3, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
+            max_constraint(std::nullopt, std::nullopt, std::nullopt, 5, std::nullopt, std::nullopt, std::nullopt),
             minmax_constraint(std::nullopt, std::nullopt, 3, 5, std::nullopt, std::nullopt, std::nullopt),
-            min_max_intersection_constraint(std::nullopt, std::nullopt, 3, 5, std::nullopt, std::nullopt, std::nullopt),
-            union_constraint(std::nullopt, std::nullopt, 3, 6, std::nullopt, std::nullopt, std::nullopt)
+            union_constraint(std::nullopt, std::nullopt, 3, 6, std::nullopt, std::nullopt, std::nullopt),
+            intersection_constraint(std::nullopt, std::nullopt, 4, 5, std::nullopt, std::nullopt, std::nullopt),
+            min_max_intersection_constraint(std::nullopt, std::nullopt, 3, 5, std::nullopt, std::nullopt, std::nullopt)
         {}
         virtual ~TopLevel() = default;
 
         private:
         double free;
-        double intersection;
-        ClassMemberConstraints intersection_constraint;
-        double max;
-        ClassMemberConstraints max_constraint;
         double min;
         ClassMemberConstraints min_constraint;
+        double max;
+        ClassMemberConstraints max_constraint;
         double minmax;
         ClassMemberConstraints minmax_constraint;
-        double min_max_intersection;
-        ClassMemberConstraints min_max_intersection_constraint;
-        double min_max_union;
         double top_level_union;
         ClassMemberConstraints union_constraint;
+        double min_max_union;
+        double intersection;
+        ClassMemberConstraints intersection_constraint;
+        double min_max_intersection;
+        ClassMemberConstraints min_max_intersection_constraint;
 
         public:
         const double & get_free() const { return free; }
         double & get_mutable_free() { return free; }
         void set_free(const double & value) { this->free = value; }
 
-        const double & get_intersection() const { return intersection; }
-        double & get_mutable_intersection() { return intersection; }
-        void set_intersection(const double & value) { CheckConstraint("intersection", intersection_constraint, value); this->intersection = value; }
+        const double & get_min() const { return min; }
+        double & get_mutable_min() { return min; }
+        void set_min(const double & value) { CheckConstraint("min", min_constraint, value); this->min = value; }
 
         const double & get_max() const { return max; }
         double & get_mutable_max() { return max; }
         void set_max(const double & value) { CheckConstraint("max", max_constraint, value); this->max = value; }
 
-        const double & get_min() const { return min; }
-        double & get_mutable_min() { return min; }
-        void set_min(const double & value) { CheckConstraint("min", min_constraint, value); this->min = value; }
-
         const double & get_minmax() const { return minmax; }
         double & get_mutable_minmax() { return minmax; }
         void set_minmax(const double & value) { CheckConstraint("minmax", minmax_constraint, value); this->minmax = value; }
 
-        const double & get_min_max_intersection() const { return min_max_intersection; }
-        double & get_mutable_min_max_intersection() { return min_max_intersection; }
-        void set_min_max_intersection(const double & value) { CheckConstraint("min_max_intersection", min_max_intersection_constraint, value); this->min_max_intersection = value; }
+        const double & get_top_level_union() const { return top_level_union; }
+        double & get_mutable_top_level_union() { return top_level_union; }
+        void set_top_level_union(const double & value) { CheckConstraint("top_level_union", union_constraint, value); this->top_level_union = value; }
 
         const double & get_min_max_union() const { return min_max_union; }
         double & get_mutable_min_max_union() { return min_max_union; }
         void set_min_max_union(const double & value) { this->min_max_union = value; }
 
-        const double & get_top_level_union() const { return top_level_union; }
-        double & get_mutable_top_level_union() { return top_level_union; }
-        void set_top_level_union(const double & value) { CheckConstraint("top_level_union", union_constraint, value); this->top_level_union = value; }
+        const double & get_intersection() const { return intersection; }
+        double & get_mutable_intersection() { return intersection; }
+        void set_intersection(const double & value) { CheckConstraint("intersection", intersection_constraint, value); this->intersection = value; }
+
+        const double & get_min_max_intersection() const { return min_max_intersection; }
+        double & get_mutable_min_max_intersection() { return min_max_intersection; }
+        void set_min_max_intersection(const double & value) { CheckConstraint("min_max_intersection", min_max_intersection_constraint, value); this->min_max_intersection = value; }
     };
 }
 
@@ -231,24 +231,24 @@ namespace quicktype {
 
     inline void from_json(const json & j, TopLevel& x) {
         x.set_free(j.at("free").get<double>());
-        x.set_intersection(j.at("intersection").get<double>());
-        x.set_max(j.at("max").get<double>());
         x.set_min(j.at("min").get<double>());
+        x.set_max(j.at("max").get<double>());
         x.set_minmax(j.at("minmax").get<double>());
-        x.set_min_max_intersection(j.at("minMaxIntersection").get<double>());
-        x.set_min_max_union(j.at("minMaxUnion").get<double>());
         x.set_top_level_union(j.at("union").get<double>());
+        x.set_min_max_union(j.at("minMaxUnion").get<double>());
+        x.set_intersection(j.at("intersection").get<double>());
+        x.set_min_max_intersection(j.at("minMaxIntersection").get<double>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
         j["free"] = x.get_free();
-        j["intersection"] = x.get_intersection();
-        j["max"] = x.get_max();
         j["min"] = x.get_min();
+        j["max"] = x.get_max();
         j["minmax"] = x.get_minmax();
-        j["minMaxIntersection"] = x.get_min_max_intersection();
-        j["minMaxUnion"] = x.get_min_max_union();
         j["union"] = x.get_top_level_union();
+        j["minMaxUnion"] = x.get_min_max_union();
+        j["intersection"] = x.get_intersection();
+        j["minMaxIntersection"] = x.get_min_max_intersection();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/minmaxlength.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/minmaxlength.schema/default/quicktype.hpp
index e4968d5..73c2edd 100644
--- a/base/schema-cplusplus/test/inputs/schema/minmaxlength.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/minmaxlength.schema/default/quicktype.hpp
@@ -224,63 +224,63 @@ namespace quicktype {
     class TopLevel {
         public:
         TopLevel() :
-            intersection_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 4, 5, std::nullopt),
-            maxlength_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, 5, std::nullopt),
             minlength_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, std::nullopt, std::nullopt),
-            min_max_intersection_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, 5, std::nullopt),
+            maxlength_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, 5, std::nullopt),
             minmaxlength_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, 5, std::nullopt),
-            union_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, 6, std::nullopt)
+            union_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, 6, std::nullopt),
+            intersection_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 4, 5, std::nullopt),
+            min_max_intersection_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, 5, std::nullopt)
         {}
         virtual ~TopLevel() = default;
 
         private:
-        std::string intersection;
-        ClassMemberConstraints intersection_constraint;
-        InUnion in_union;
-        std::string maxlength;
-        ClassMemberConstraints maxlength_constraint;
         std::string minlength;
         ClassMemberConstraints minlength_constraint;
-        std::string min_max_intersection;
-        ClassMemberConstraints min_max_intersection_constraint;
+        std::string maxlength;
+        ClassMemberConstraints maxlength_constraint;
         std::string minmaxlength;
         ClassMemberConstraints minmaxlength_constraint;
-        std::string min_max_union;
         std::string top_level_union;
         ClassMemberConstraints union_constraint;
+        InUnion in_union;
+        std::string min_max_union;
+        std::string intersection;
+        ClassMemberConstraints intersection_constraint;
+        std::string min_max_intersection;
+        ClassMemberConstraints min_max_intersection_constraint;
 
         public:
-        const std::string & get_intersection() const { return intersection; }
-        std::string & get_mutable_intersection() { return intersection; }
-        void set_intersection(const std::string & value) { CheckConstraint("intersection", intersection_constraint, value); this->intersection = value; }
-
-        const InUnion & get_in_union() const { return in_union; }
-        InUnion & get_mutable_in_union() { return in_union; }
-        void set_in_union(const InUnion & value) { this->in_union = value; }
-
-        const std::string & get_maxlength() const { return maxlength; }
-        std::string & get_mutable_maxlength() { return maxlength; }
-        void set_maxlength(const std::string & value) { CheckConstraint("maxlength", maxlength_constraint, value); this->maxlength = value; }
-
         const std::string & get_minlength() const { return minlength; }
         std::string & get_mutable_minlength() { return minlength; }
         void set_minlength(const std::string & value) { CheckConstraint("minlength", minlength_constraint, value); this->minlength = value; }
 
-        const std::string & get_min_max_intersection() const { return min_max_intersection; }
-        std::string & get_mutable_min_max_intersection() { return min_max_intersection; }
-        void set_min_max_intersection(const std::string & value) { CheckConstraint("min_max_intersection", min_max_intersection_constraint, value); this->min_max_intersection = value; }
+        const std::string & get_maxlength() const { return maxlength; }
+        std::string & get_mutable_maxlength() { return maxlength; }
+        void set_maxlength(const std::string & value) { CheckConstraint("maxlength", maxlength_constraint, value); this->maxlength = value; }
 
         const std::string & get_minmaxlength() const { return minmaxlength; }
         std::string & get_mutable_minmaxlength() { return minmaxlength; }
         void set_minmaxlength(const std::string & value) { CheckConstraint("minmaxlength", minmaxlength_constraint, value); this->minmaxlength = value; }
 
+        const std::string & get_top_level_union() const { return top_level_union; }
+        std::string & get_mutable_top_level_union() { return top_level_union; }
+        void set_top_level_union(const std::string & value) { CheckConstraint("top_level_union", union_constraint, value); this->top_level_union = value; }
+
+        const InUnion & get_in_union() const { return in_union; }
+        InUnion & get_mutable_in_union() { return in_union; }
+        void set_in_union(const InUnion & value) { this->in_union = value; }
+
         const std::string & get_min_max_union() const { return min_max_union; }
         std::string & get_mutable_min_max_union() { return min_max_union; }
         void set_min_max_union(const std::string & value) { this->min_max_union = value; }
 
-        const std::string & get_top_level_union() const { return top_level_union; }
-        std::string & get_mutable_top_level_union() { return top_level_union; }
-        void set_top_level_union(const std::string & value) { CheckConstraint("top_level_union", union_constraint, value); this->top_level_union = value; }
+        const std::string & get_intersection() const { return intersection; }
+        std::string & get_mutable_intersection() { return intersection; }
+        void set_intersection(const std::string & value) { CheckConstraint("intersection", intersection_constraint, value); this->intersection = value; }
+
+        const std::string & get_min_max_intersection() const { return min_max_intersection; }
+        std::string & get_mutable_min_max_intersection() { return min_max_intersection; }
+        void set_min_max_intersection(const std::string & value) { CheckConstraint("min_max_intersection", min_max_intersection_constraint, value); this->min_max_intersection = value; }
     };
 }
 
@@ -297,26 +297,26 @@ struct adl_serializer<std::variant<double, std::string>> {
 }
 namespace quicktype {
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_intersection(j.at("intersection").get<std::string>());
-        x.set_in_union(j.at("inUnion").get<InUnion>());
-        x.set_maxlength(j.at("maxlength").get<std::string>());
         x.set_minlength(j.at("minlength").get<std::string>());
-        x.set_min_max_intersection(j.at("minMaxIntersection").get<std::string>());
+        x.set_maxlength(j.at("maxlength").get<std::string>());
         x.set_minmaxlength(j.at("minmaxlength").get<std::string>());
-        x.set_min_max_union(j.at("minMaxUnion").get<std::string>());
         x.set_top_level_union(j.at("union").get<std::string>());
+        x.set_in_union(j.at("inUnion").get<InUnion>());
+        x.set_min_max_union(j.at("minMaxUnion").get<std::string>());
+        x.set_intersection(j.at("intersection").get<std::string>());
+        x.set_min_max_intersection(j.at("minMaxIntersection").get<std::string>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["intersection"] = x.get_intersection();
-        j["inUnion"] = x.get_in_union();
-        j["maxlength"] = x.get_maxlength();
         j["minlength"] = x.get_minlength();
-        j["minMaxIntersection"] = x.get_min_max_intersection();
+        j["maxlength"] = x.get_maxlength();
         j["minmaxlength"] = x.get_minmaxlength();
-        j["minMaxUnion"] = x.get_min_max_union();
         j["union"] = x.get_top_level_union();
+        j["inUnion"] = x.get_in_union();
+        j["minMaxUnion"] = x.get_min_max_union();
+        j["intersection"] = x.get_intersection();
+        j["minMaxIntersection"] = x.get_min_max_intersection();
     }
 }
 namespace nlohmann {
diff --git a/base/schema-cplusplus/test/inputs/schema/non-standard-ref.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/non-standard-ref.schema/default/quicktype.hpp
index 3bc7d8e..3215967 100644
--- a/base/schema-cplusplus/test/inputs/schema/non-standard-ref.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/non-standard-ref.schema/default/quicktype.hpp
@@ -37,19 +37,19 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        int64_t bar;
         int64_t foo;
+        int64_t bar;
         bool quux;
 
         public:
-        const int64_t & get_bar() const { return bar; }
-        int64_t & get_mutable_bar() { return bar; }
-        void set_bar(const int64_t & value) { this->bar = value; }
-
         const int64_t & get_foo() const { return foo; }
         int64_t & get_mutable_foo() { return foo; }
         void set_foo(const int64_t & value) { this->foo = value; }
 
+        const int64_t & get_bar() const { return bar; }
+        int64_t & get_mutable_bar() { return bar; }
+        void set_bar(const int64_t & value) { this->bar = value; }
+
         const bool & get_quux() const { return quux; }
         bool & get_mutable_quux() { return quux; }
         void set_quux(const bool & value) { this->quux = value; }
@@ -61,15 +61,15 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_bar(j.at("bar").get<int64_t>());
         x.set_foo(j.at("foo").get<int64_t>());
+        x.set_bar(j.at("bar").get<int64_t>());
         x.set_quux(j.at("quux").get<bool>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["bar"] = x.get_bar();
         j["foo"] = x.get_foo();
+        j["bar"] = x.get_bar();
         j["quux"] = x.get_quux();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/nullable-optional-one-of.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/nullable-optional-one-of.schema/default/quicktype.hpp
index d979673..0c8f70b 100644
--- a/base/schema-cplusplus/test/inputs/schema/nullable-optional-one-of.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/nullable-optional-one-of.schema/default/quicktype.hpp
@@ -96,16 +96,16 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        std::optional<std::string> b;
         Kind kind;
+        std::optional<std::string> b;
 
         public:
-        std::optional<std::string> get_b() const { return b; }
-        void set_b(std::optional<std::string> value) { this->b = value; }
-
         const Kind & get_kind() const { return kind; }
         Kind & get_mutable_kind() { return kind; }
         void set_kind(const Kind & value) { this->kind = value; }
+
+        std::optional<std::string> get_b() const { return b; }
+        void set_b(std::optional<std::string> value) { this->b = value; }
     };
 }
 
@@ -117,14 +117,14 @@ namespace quicktype {
     void to_json(json & j, const Kind & x);
 
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_b(get_stack_optional<std::string>(j, "b"));
         x.set_kind(j.at("kind").get<Kind>());
+        x.set_b(get_stack_optional<std::string>(j, "b"));
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["b"] = x.get_b();
         j["kind"] = x.get_kind();
+        j["b"] = x.get_b();
     }
 
     inline void from_json(const json & j, Kind & x) {
diff --git a/base/schema-cplusplus/test/inputs/schema/optional-any.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/optional-any.schema/default/quicktype.hpp
index f87427a..90cd2df 100644
--- a/base/schema-cplusplus/test/inputs/schema/optional-any.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/optional-any.schema/default/quicktype.hpp
@@ -94,17 +94,17 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        bool bar;
         nlohmann::json foo;
+        bool bar;
 
         public:
-        const bool & get_bar() const { return bar; }
-        bool & get_mutable_bar() { return bar; }
-        void set_bar(const bool & value) { this->bar = value; }
-
         const nlohmann::json & get_foo() const { return foo; }
         nlohmann::json & get_mutable_foo() { return foo; }
         void set_foo(const nlohmann::json & value) { this->foo = value; }
+
+        const bool & get_bar() const { return bar; }
+        bool & get_mutable_bar() { return bar; }
+        void set_bar(const bool & value) { this->bar = value; }
     };
 }
 
@@ -113,13 +113,13 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_bar(j.at("bar").get<bool>());
         x.set_foo(get_untyped(j, "foo"));
+        x.set_bar(j.at("bar").get<bool>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["bar"] = x.get_bar();
         j["foo"] = x.get_foo();
+        j["bar"] = x.get_bar();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/optional-any.schema/hide-null-optional-true--b100cdb5877d/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/optional-any.schema/hide-null-optional-true--b100cdb5877d/quicktype.hpp
index 5da02c5..3724caf 100644
--- a/base/schema-cplusplus/test/inputs/schema/optional-any.schema/hide-null-optional-true--b100cdb5877d/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/optional-any.schema/hide-null-optional-true--b100cdb5877d/quicktype.hpp
@@ -94,17 +94,17 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        bool bar;
         nlohmann::json foo;
+        bool bar;
 
         public:
-        const bool & get_bar() const { return bar; }
-        bool & get_mutable_bar() { return bar; }
-        void set_bar(const bool & value) { this->bar = value; }
-
         const nlohmann::json & get_foo() const { return foo; }
         nlohmann::json & get_mutable_foo() { return foo; }
         void set_foo(const nlohmann::json & value) { this->foo = value; }
+
+        const bool & get_bar() const { return bar; }
+        bool & get_mutable_bar() { return bar; }
+        void set_bar(const bool & value) { this->bar = value; }
     };
 }
 
@@ -113,15 +113,15 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_bar(j.at("bar").get<bool>());
         x.set_foo(get_untyped(j, "foo"));
+        x.set_bar(j.at("bar").get<bool>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["bar"] = x.get_bar();
         if (!x.get_foo().is_null()) {
             j["foo"] = x.get_foo();
         }
+        j["bar"] = x.get_bar();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/optional-const-ref.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/optional-const-ref.schema/default/quicktype.hpp
index a751766..ad1949a 100644
--- a/base/schema-cplusplus/test/inputs/schema/optional-const-ref.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/optional-const-ref.schema/default/quicktype.hpp
@@ -242,55 +242,55 @@ namespace quicktype {
         public:
         TopLevel() :
             count_constraint(1, 100, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
-            label_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 2, 16, std::nullopt),
             required_count_constraint(1, 100, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
-            required_label_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 2, 16, std::nullopt),
-            weight_constraint(std::nullopt, std::nullopt, 0.5, 99.5, std::nullopt, std::nullopt, std::nullopt)
+            weight_constraint(std::nullopt, std::nullopt, 0.5, 99.5, std::nullopt, std::nullopt, std::nullopt),
+            label_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 2, 16, std::nullopt),
+            required_label_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 2, 16, std::nullopt)
         {}
         virtual ~TopLevel() = default;
 
         private:
         std::optional<std::vector<Coordinate>> coordinates;
+        std::vector<Coordinate> required_coordinates;
         std::optional<int64_t> count;
         ClassMemberConstraints count_constraint;
-        std::optional<std::string> label;
-        ClassMemberConstraints label_constraint;
-        std::vector<Coordinate> required_coordinates;
         int64_t required_count;
         ClassMemberConstraints required_count_constraint;
-        std::string required_label;
-        ClassMemberConstraints required_label_constraint;
         std::optional<double> weight;
         ClassMemberConstraints weight_constraint;
+        std::optional<std::string> label;
+        ClassMemberConstraints label_constraint;
+        std::string required_label;
+        ClassMemberConstraints required_label_constraint;
 
         public:
         const std::optional<std::vector<Coordinate>> & get_coordinates() const { return coordinates; }
         std::optional<std::vector<Coordinate>> & get_mutable_coordinates() { return coordinates; }
         void set_coordinates(const std::optional<std::vector<Coordinate>> & value) { this->coordinates = value; }
 
-        const std::optional<int64_t> & get_count() const { return count; }
-        std::optional<int64_t> & get_mutable_count() { return count; }
-        void set_count(const std::optional<int64_t> & value) { CheckConstraint("count", count_constraint, value); this->count = value; }
-
-        const std::optional<std::string> & get_label() const { return label; }
-        std::optional<std::string> & get_mutable_label() { return label; }
-        void set_label(const std::optional<std::string> & value) { CheckConstraint("label", label_constraint, value); this->label = value; }
-
         const std::vector<Coordinate> & get_required_coordinates() const { return required_coordinates; }
         std::vector<Coordinate> & get_mutable_required_coordinates() { return required_coordinates; }
         void set_required_coordinates(const std::vector<Coordinate> & value) { this->required_coordinates = value; }
 
+        const std::optional<int64_t> & get_count() const { return count; }
+        std::optional<int64_t> & get_mutable_count() { return count; }
+        void set_count(const std::optional<int64_t> & value) { CheckConstraint("count", count_constraint, value); this->count = value; }
+
         const int64_t & get_required_count() const { return required_count; }
         int64_t & get_mutable_required_count() { return required_count; }
         void set_required_count(const int64_t & value) { CheckConstraint("required_count", required_count_constraint, value); this->required_count = value; }
 
-        const std::string & get_required_label() const { return required_label; }
-        std::string & get_mutable_required_label() { return required_label; }
-        void set_required_label(const std::string & value) { CheckConstraint("required_label", required_label_constraint, value); this->required_label = value; }
-
         const std::optional<double> & get_weight() const { return weight; }
         std::optional<double> & get_mutable_weight() { return weight; }
         void set_weight(const std::optional<double> & value) { CheckConstraint("weight", weight_constraint, value); this->weight = value; }
+
+        const std::optional<std::string> & get_label() const { return label; }
+        std::optional<std::string> & get_mutable_label() { return label; }
+        void set_label(const std::optional<std::string> & value) { CheckConstraint("label", label_constraint, value); this->label = value; }
+
+        const std::string & get_required_label() const { return required_label; }
+        std::string & get_mutable_required_label() { return required_label; }
+        void set_required_label(const std::string & value) { CheckConstraint("required_label", required_label_constraint, value); this->required_label = value; }
     };
 }
 
@@ -314,22 +314,22 @@ namespace quicktype {
 
     inline void from_json(const json & j, TopLevel& x) {
         x.set_coordinates(get_stack_optional<std::vector<Coordinate>>(j, "coordinates"));
-        x.set_count(get_stack_optional<int64_t>(j, "count"));
-        x.set_label(get_stack_optional<std::string>(j, "label"));
         x.set_required_coordinates(j.at("requiredCoordinates").get<std::vector<Coordinate>>());
+        x.set_count(get_stack_optional<int64_t>(j, "count"));
         x.set_required_count(j.at("requiredCount").get<int64_t>());
-        x.set_required_label(j.at("requiredLabel").get<std::string>());
         x.set_weight(get_stack_optional<double>(j, "weight"));
+        x.set_label(get_stack_optional<std::string>(j, "label"));
+        x.set_required_label(j.at("requiredLabel").get<std::string>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
         j["coordinates"] = x.get_coordinates();
-        j["count"] = x.get_count();
-        j["label"] = x.get_label();
         j["requiredCoordinates"] = x.get_required_coordinates();
+        j["count"] = x.get_count();
         j["requiredCount"] = x.get_required_count();
-        j["requiredLabel"] = x.get_required_label();
         j["weight"] = x.get_weight();
+        j["label"] = x.get_label();
+        j["requiredLabel"] = x.get_required_label();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/optional-constraints.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/optional-constraints.schema/default/quicktype.hpp
index 8c1a679..b47656e 100644
--- a/base/schema-cplusplus/test/inputs/schema/optional-constraints.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/optional-constraints.schema/default/quicktype.hpp
@@ -222,46 +222,46 @@ namespace quicktype {
     class TopLevel {
         public:
         TopLevel() :
-            opt_double_constraint(std::nullopt, std::nullopt, 0.5, 99.5, std::nullopt, std::nullopt, std::nullopt),
+            req_zero_min_constraint(0, 100, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
             opt_int_constraint(0, 100, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt),
-            opt_pattern_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::string("^[a-z]+$")),
+            opt_double_constraint(std::nullopt, std::nullopt, 0.5, 99.5, std::nullopt, std::nullopt, std::nullopt),
             opt_string_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, 10, std::nullopt),
-            req_zero_min_constraint(0, 100, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt)
+            opt_pattern_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::string("^[a-z]+$"))
         {}
         virtual ~TopLevel() = default;
 
         private:
-        std::optional<double> opt_double;
-        ClassMemberConstraints opt_double_constraint;
+        int64_t req_zero_min;
+        ClassMemberConstraints req_zero_min_constraint;
         std::optional<int64_t> opt_int;
         ClassMemberConstraints opt_int_constraint;
-        std::optional<std::string> opt_pattern;
-        ClassMemberConstraints opt_pattern_constraint;
+        std::optional<double> opt_double;
+        ClassMemberConstraints opt_double_constraint;
         std::optional<std::string> opt_string;
         ClassMemberConstraints opt_string_constraint;
-        int64_t req_zero_min;
-        ClassMemberConstraints req_zero_min_constraint;
+        std::optional<std::string> opt_pattern;
+        ClassMemberConstraints opt_pattern_constraint;
 
         public:
-        const std::optional<double> & get_opt_double() const { return opt_double; }
-        std::optional<double> & get_mutable_opt_double() { return opt_double; }
-        void set_opt_double(const std::optional<double> & value) { CheckConstraint("opt_double", opt_double_constraint, value); this->opt_double = value; }
+        const int64_t & get_req_zero_min() const { return req_zero_min; }
+        int64_t & get_mutable_req_zero_min() { return req_zero_min; }
+        void set_req_zero_min(const int64_t & value) { CheckConstraint("req_zero_min", req_zero_min_constraint, value); this->req_zero_min = value; }
 
         const std::optional<int64_t> & get_opt_int() const { return opt_int; }
         std::optional<int64_t> & get_mutable_opt_int() { return opt_int; }
         void set_opt_int(const std::optional<int64_t> & value) { CheckConstraint("opt_int", opt_int_constraint, value); this->opt_int = value; }
 
-        const std::optional<std::string> & get_opt_pattern() const { return opt_pattern; }
-        std::optional<std::string> & get_mutable_opt_pattern() { return opt_pattern; }
-        void set_opt_pattern(const std::optional<std::string> & value) { CheckConstraint("opt_pattern", opt_pattern_constraint, value); this->opt_pattern = value; }
+        const std::optional<double> & get_opt_double() const { return opt_double; }
+        std::optional<double> & get_mutable_opt_double() { return opt_double; }
+        void set_opt_double(const std::optional<double> & value) { CheckConstraint("opt_double", opt_double_constraint, value); this->opt_double = value; }
 
         const std::optional<std::string> & get_opt_string() const { return opt_string; }
         std::optional<std::string> & get_mutable_opt_string() { return opt_string; }
         void set_opt_string(const std::optional<std::string> & value) { CheckConstraint("opt_string", opt_string_constraint, value); this->opt_string = value; }
 
-        const int64_t & get_req_zero_min() const { return req_zero_min; }
-        int64_t & get_mutable_req_zero_min() { return req_zero_min; }
-        void set_req_zero_min(const int64_t & value) { CheckConstraint("req_zero_min", req_zero_min_constraint, value); this->req_zero_min = value; }
+        const std::optional<std::string> & get_opt_pattern() const { return opt_pattern; }
+        std::optional<std::string> & get_mutable_opt_pattern() { return opt_pattern; }
+        void set_opt_pattern(const std::optional<std::string> & value) { CheckConstraint("opt_pattern", opt_pattern_constraint, value); this->opt_pattern = value; }
     };
 }
 
@@ -270,19 +270,19 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_opt_double(get_stack_optional<double>(j, "optDouble"));
+        x.set_req_zero_min(j.at("reqZeroMin").get<int64_t>());
         x.set_opt_int(get_stack_optional<int64_t>(j, "optInt"));
-        x.set_opt_pattern(get_stack_optional<std::string>(j, "optPattern"));
+        x.set_opt_double(get_stack_optional<double>(j, "optDouble"));
         x.set_opt_string(get_stack_optional<std::string>(j, "optString"));
-        x.set_req_zero_min(j.at("reqZeroMin").get<int64_t>());
+        x.set_opt_pattern(get_stack_optional<std::string>(j, "optPattern"));
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["optDouble"] = x.get_opt_double();
+        j["reqZeroMin"] = x.get_req_zero_min();
         j["optInt"] = x.get_opt_int();
-        j["optPattern"] = x.get_opt_pattern();
+        j["optDouble"] = x.get_opt_double();
         j["optString"] = x.get_opt_string();
-        j["reqZeroMin"] = x.get_req_zero_min();
+        j["optPattern"] = x.get_opt_pattern();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/optional-date-time.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/optional-date-time.schema/default/quicktype.hpp
index 80c49e4..a45f59b 100644
--- a/base/schema-cplusplus/test/inputs/schema/optional-date-time.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/optional-date-time.schema/default/quicktype.hpp
@@ -94,37 +94,37 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        std::optional<std::string> optional_date;
-        std::optional<std::string> optional_date_time;
-        std::optional<std::string> optional_time;
         std::string required_date;
-        std::string required_date_time;
         std::string required_time;
+        std::string required_date_time;
+        std::optional<std::string> optional_date;
+        std::optional<std::string> optional_time;
+        std::optional<std::string> optional_date_time;
 
         public:
-        const std::optional<std::string> & get_optional_date() const { return optional_date; }
-        std::optional<std::string> & get_mutable_optional_date() { return optional_date; }
-        void set_optional_date(const std::optional<std::string> & value) { this->optional_date = value; }
-
-        const std::optional<std::string> & get_optional_date_time() const { return optional_date_time; }
-        std::optional<std::string> & get_mutable_optional_date_time() { return optional_date_time; }
-        void set_optional_date_time(const std::optional<std::string> & value) { this->optional_date_time = value; }
-
-        const std::optional<std::string> & get_optional_time() const { return optional_time; }
-        std::optional<std::string> & get_mutable_optional_time() { return optional_time; }
-        void set_optional_time(const std::optional<std::string> & value) { this->optional_time = value; }
-
         const std::string & get_required_date() const { return required_date; }
         std::string & get_mutable_required_date() { return required_date; }
         void set_required_date(const std::string & value) { this->required_date = value; }
 
+        const std::string & get_required_time() const { return required_time; }
+        std::string & get_mutable_required_time() { return required_time; }
+        void set_required_time(const std::string & value) { this->required_time = value; }
+
         const std::string & get_required_date_time() const { return required_date_time; }
         std::string & get_mutable_required_date_time() { return required_date_time; }
         void set_required_date_time(const std::string & value) { this->required_date_time = value; }
 
-        const std::string & get_required_time() const { return required_time; }
-        std::string & get_mutable_required_time() { return required_time; }
-        void set_required_time(const std::string & value) { this->required_time = value; }
+        const std::optional<std::string> & get_optional_date() const { return optional_date; }
+        std::optional<std::string> & get_mutable_optional_date() { return optional_date; }
+        void set_optional_date(const std::optional<std::string> & value) { this->optional_date = value; }
+
+        const std::optional<std::string> & get_optional_time() const { return optional_time; }
+        std::optional<std::string> & get_mutable_optional_time() { return optional_time; }
+        void set_optional_time(const std::optional<std::string> & value) { this->optional_time = value; }
+
+        const std::optional<std::string> & get_optional_date_time() const { return optional_date_time; }
+        std::optional<std::string> & get_mutable_optional_date_time() { return optional_date_time; }
+        void set_optional_date_time(const std::optional<std::string> & value) { this->optional_date_time = value; }
     };
 }
 
@@ -133,21 +133,21 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_optional_date(get_stack_optional<std::string>(j, "optional-date"));
-        x.set_optional_date_time(get_stack_optional<std::string>(j, "optional-date-time"));
-        x.set_optional_time(get_stack_optional<std::string>(j, "optional-time"));
         x.set_required_date(j.at("required-date").get<std::string>());
-        x.set_required_date_time(j.at("required-date-time").get<std::string>());
         x.set_required_time(j.at("required-time").get<std::string>());
+        x.set_required_date_time(j.at("required-date-time").get<std::string>());
+        x.set_optional_date(get_stack_optional<std::string>(j, "optional-date"));
+        x.set_optional_time(get_stack_optional<std::string>(j, "optional-time"));
+        x.set_optional_date_time(get_stack_optional<std::string>(j, "optional-date-time"));
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["optional-date"] = x.get_optional_date();
-        j["optional-date-time"] = x.get_optional_date_time();
-        j["optional-time"] = x.get_optional_time();
         j["required-date"] = x.get_required_date();
-        j["required-date-time"] = x.get_required_date_time();
         j["required-time"] = x.get_required_time();
+        j["required-date-time"] = x.get_required_date_time();
+        j["optional-date"] = x.get_optional_date();
+        j["optional-time"] = x.get_optional_time();
+        j["optional-date-time"] = x.get_optional_date_time();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/prefix-items.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/prefix-items.schema/default/quicktype.hpp
index 58b6971..5dcd83c 100644
--- a/base/schema-cplusplus/test/inputs/schema/prefix-items.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/prefix-items.schema/default/quicktype.hpp
@@ -96,17 +96,17 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        std::vector<Open> open;
         std::vector<Open> tuple;
+        std::vector<Open> open;
 
         public:
-        const std::vector<Open> & get_open() const { return open; }
-        std::vector<Open> & get_mutable_open() { return open; }
-        void set_open(const std::vector<Open> & value) { this->open = value; }
-
         const std::vector<Open> & get_tuple() const { return tuple; }
         std::vector<Open> & get_mutable_tuple() { return tuple; }
         void set_tuple(const std::vector<Open> & value) { this->tuple = value; }
+
+        const std::vector<Open> & get_open() const { return open; }
+        std::vector<Open> & get_mutable_open() { return open; }
+        void set_open(const std::vector<Open> & value) { this->open = value; }
     };
 }
 
@@ -123,14 +123,14 @@ struct adl_serializer<std::variant<bool, int64_t>> {
 }
 namespace quicktype {
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_open(j.at("open").get<std::vector<Open>>());
         x.set_tuple(j.at("tuple").get<std::vector<Open>>());
+        x.set_open(j.at("open").get<std::vector<Open>>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["open"] = x.get_open();
         j["tuple"] = x.get_tuple();
+        j["open"] = x.get_open();
     }
 }
 namespace nlohmann {
diff --git a/head/schema-cplusplus/test/inputs/schema/property-order.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/property-order.schema/default/quicktype.hpp
new file mode 100644
index 0000000..15f1979
--- /dev/null
+++ b/head/schema-cplusplus/test/inputs/schema/property-order.schema/default/quicktype.hpp
@@ -0,0 +1,136 @@
+//  To parse this JSON data, first install
+//
+//      json.hpp  https://github.com/nlohmann/json
+//
+//  Then include this file, and then do
+//
+//     TopLevel data = nlohmann::json::parse(jsonString);
+
+#pragma once
+
+#include "json.hpp"
+
+#include <optional>
+#include <stdexcept>
+#include <regex>
+
+namespace quicktype {
+    using nlohmann::json;
+
+    #ifndef NLOHMANN_UNTYPED_quicktype_HELPER
+    #define NLOHMANN_UNTYPED_quicktype_HELPER
+    inline json get_untyped(const json & j, const char * property) {
+        if (j.find(property) != j.end()) {
+            return j.at(property).get<json>();
+        }
+        return json();
+    }
+
+    inline json get_untyped(const json & j, std::string property) {
+        return get_untyped(j, property.data());
+    }
+    #endif
+
+    class Ordered {
+        public:
+        Ordered() = default;
+        virtual ~Ordered() = default;
+
+        private:
+        double mango;
+        std::string zebra;
+        bool apple;
+
+        public:
+        const double & get_mango() const { return mango; }
+        double & get_mutable_mango() { return mango; }
+        void set_mango(const double & value) { this->mango = value; }
+
+        const std::string & get_zebra() const { return zebra; }
+        std::string & get_mutable_zebra() { return zebra; }
+        void set_zebra(const std::string & value) { this->zebra = value; }
+
+        const bool & get_apple() const { return apple; }
+        bool & get_mutable_apple() { return apple; }
+        void set_apple(const bool & value) { this->apple = value; }
+    };
+
+    class TopLevel {
+        public:
+        TopLevel() = default;
+        virtual ~TopLevel() = default;
+
+        private:
+        std::string zebra;
+        double mango;
+        bool apple;
+        std::string delta;
+        int64_t banana;
+        Ordered ordered;
+
+        public:
+        const std::string & get_zebra() const { return zebra; }
+        std::string & get_mutable_zebra() { return zebra; }
+        void set_zebra(const std::string & value) { this->zebra = value; }
+
+        const double & get_mango() const { return mango; }
+        double & get_mutable_mango() { return mango; }
+        void set_mango(const double & value) { this->mango = value; }
+
+        const bool & get_apple() const { return apple; }
+        bool & get_mutable_apple() { return apple; }
+        void set_apple(const bool & value) { this->apple = value; }
+
+        const std::string & get_delta() const { return delta; }
+        std::string & get_mutable_delta() { return delta; }
+        void set_delta(const std::string & value) { this->delta = value; }
+
+        const int64_t & get_banana() const { return banana; }
+        int64_t & get_mutable_banana() { return banana; }
+        void set_banana(const int64_t & value) { this->banana = value; }
+
+        const Ordered & get_ordered() const { return ordered; }
+        Ordered & get_mutable_ordered() { return ordered; }
+        void set_ordered(const Ordered & value) { this->ordered = value; }
+    };
+}
+
+namespace quicktype {
+    void from_json(const json & j, Ordered & x);
+    void to_json(json & j, const Ordered & x);
+
+    void from_json(const json & j, TopLevel & x);
+    void to_json(json & j, const TopLevel & x);
+
+    inline void from_json(const json & j, Ordered& x) {
+        x.set_mango(j.at("mango").get<double>());
+        x.set_zebra(j.at("zebra").get<std::string>());
+        x.set_apple(j.at("apple").get<bool>());
+    }
+
+    inline void to_json(json & j, const Ordered & x) {
+        j = json::object();
+        j["mango"] = x.get_mango();
+        j["zebra"] = x.get_zebra();
+        j["apple"] = x.get_apple();
+    }
+
+    inline void from_json(const json & j, TopLevel& x) {
+        x.set_zebra(j.at("zebra").get<std::string>());
+        x.set_mango(j.at("mango").get<double>());
+        x.set_apple(j.at("apple").get<bool>());
+        x.set_delta(j.at("delta").get<std::string>());
+        x.set_banana(j.at("banana").get<int64_t>());
+        x.set_ordered(j.at("ordered").get<Ordered>());
+    }
+
+    inline void to_json(json & j, const TopLevel & x) {
+        j = json::object();
+        j["zebra"] = x.get_zebra();
+        j["mango"] = x.get_mango();
+        j["apple"] = x.get_apple();
+        j["delta"] = x.get_delta();
+        j["banana"] = x.get_banana();
+        j["ordered"] = x.get_ordered();
+    }
+}
diff --git a/base/schema-cplusplus/test/inputs/schema/renaming-bug.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/renaming-bug.schema/default/quicktype.hpp
index 0eaeadc..bb10910 100644
--- a/base/schema-cplusplus/test/inputs/schema/renaming-bug.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/renaming-bug.schema/default/quicktype.hpp
@@ -253,15 +253,11 @@ namespace quicktype {
         virtual ~Part() = default;
 
         private:
-        std::optional<std::string> depth;
         std::optional<std::string> length;
         std::optional<std::string> width;
+        std::optional<std::string> depth;
 
         public:
-        const std::optional<std::string> & get_depth() const { return depth; }
-        std::optional<std::string> & get_mutable_depth() { return depth; }
-        void set_depth(const std::optional<std::string> & value) { this->depth = value; }
-
         const std::optional<std::string> & get_length() const { return length; }
         std::optional<std::string> & get_mutable_length() { return length; }
         void set_length(const std::optional<std::string> & value) { this->length = value; }
@@ -269,6 +265,10 @@ namespace quicktype {
         const std::optional<std::string> & get_width() const { return width; }
         std::optional<std::string> & get_mutable_width() { return width; }
         void set_width(const std::optional<std::string> & value) { this->width = value; }
+
+        const std::optional<std::string> & get_depth() const { return depth; }
+        std::optional<std::string> & get_mutable_depth() { return depth; }
+        void set_depth(const std::optional<std::string> & value) { this->depth = value; }
     };
 
     class RectShape {
@@ -324,17 +324,17 @@ namespace quicktype {
         virtual ~Shape() = default;
 
         private:
-        std::optional<Geometry> geometry;
         std::optional<History> history;
+        std::optional<Geometry> geometry;
 
         public:
-        const std::optional<Geometry> & get_geometry() const { return geometry; }
-        std::optional<Geometry> & get_mutable_geometry() { return geometry; }
-        void set_geometry(const std::optional<Geometry> & value) { this->geometry = value; }
-
         const std::optional<History> & get_history() const { return history; }
         std::optional<History> & get_mutable_history() { return history; }
         void set_history(const std::optional<History> & value) { this->history = value; }
+
+        const std::optional<Geometry> & get_geometry() const { return geometry; }
+        std::optional<Geometry> & get_mutable_geometry() { return geometry; }
+        void set_geometry(const std::optional<Geometry> & value) { this->geometry = value; }
     };
 
     class Berry {
@@ -345,20 +345,20 @@ namespace quicktype {
         virtual ~Berry() = default;
 
         private:
-        std::optional<Color> color;
         std::optional<std::string> name;
         ClassMemberConstraints name_constraint;
+        std::optional<Color> color;
         std::optional<std::vector<Shape>> shapes;
 
         public:
-        const std::optional<Color> & get_color() const { return color; }
-        std::optional<Color> & get_mutable_color() { return color; }
-        void set_color(const std::optional<Color> & value) { this->color = value; }
-
         const std::optional<std::string> & get_name() const { return name; }
         std::optional<std::string> & get_mutable_name() { return name; }
         void set_name(const std::optional<std::string> & value) { CheckConstraint("name", name_constraint, value); this->name = value; }
 
+        const std::optional<Color> & get_color() const { return color; }
+        std::optional<Color> & get_mutable_color() { return color; }
+        void set_color(const std::optional<Color> & value) { this->color = value; }
+
         const std::optional<std::vector<Shape>> & get_shapes() const { return shapes; }
         std::optional<std::vector<Shape>> & get_mutable_shapes() { return shapes; }
         void set_shapes(const std::optional<std::vector<Shape>> & value) { this->shapes = value; }
@@ -371,21 +371,21 @@ namespace quicktype {
 
         private:
         std::optional<bool> apple;
-        std::optional<std::vector<Berry>> berries;
         std::optional<bool> orange;
+        std::optional<std::vector<Berry>> berries;
 
         public:
         const std::optional<bool> & get_apple() const { return apple; }
         std::optional<bool> & get_mutable_apple() { return apple; }
         void set_apple(const std::optional<bool> & value) { this->apple = value; }
 
-        const std::optional<std::vector<Berry>> & get_berries() const { return berries; }
-        std::optional<std::vector<Berry>> & get_mutable_berries() { return berries; }
-        void set_berries(const std::optional<std::vector<Berry>> & value) { this->berries = value; }
-
         const std::optional<bool> & get_orange() const { return orange; }
         std::optional<bool> & get_mutable_orange() { return orange; }
         void set_orange(const std::optional<bool> & value) { this->orange = value; }
+
+        const std::optional<std::vector<Berry>> & get_berries() const { return berries; }
+        std::optional<std::vector<Berry>> & get_mutable_berries() { return berries; }
+        void set_berries(const std::optional<std::vector<Berry>> & value) { this->berries = value; }
     };
 
     class Limit {
@@ -394,17 +394,17 @@ namespace quicktype {
         virtual ~Limit() = default;
 
         private:
-        std::optional<double> maximum;
         std::optional<double> minimum;
+        std::optional<double> maximum;
 
         public:
-        const std::optional<double> & get_maximum() const { return maximum; }
-        std::optional<double> & get_mutable_maximum() { return maximum; }
-        void set_maximum(const std::optional<double> & value) { this->maximum = value; }
-
         const std::optional<double> & get_minimum() const { return minimum; }
         std::optional<double> & get_mutable_minimum() { return minimum; }
         void set_minimum(const std::optional<double> & value) { this->minimum = value; }
+
+        const std::optional<double> & get_maximum() const { return maximum; }
+        std::optional<double> & get_mutable_maximum() { return maximum; }
+        void set_maximum(const std::optional<double> & value) { this->maximum = value; }
     };
 
     class Speed {
@@ -457,38 +457,38 @@ namespace quicktype {
         virtual ~Vehicle() = default;
 
         private:
-        std::optional<std::string> brand;
         std::optional<std::string> id;
         ClassMemberConstraints id_constraint;
-        std::optional<Speed> speed;
-        std::optional<bool> sub_module;
         std::optional<VehicleType> type;
+        std::optional<Speed> speed;
         std::optional<std::string> year;
+        std::optional<std::string> brand;
+        std::optional<bool> sub_module;
 
         public:
-        const std::optional<std::string> & get_brand() const { return brand; }
-        std::optional<std::string> & get_mutable_brand() { return brand; }
-        void set_brand(const std::optional<std::string> & value) { this->brand = value; }
-
         const std::optional<std::string> & get_id() const { return id; }
         std::optional<std::string> & get_mutable_id() { return id; }
         void set_id(const std::optional<std::string> & value) { CheckConstraint("id", id_constraint, value); this->id = value; }
 
-        const std::optional<Speed> & get_speed() const { return speed; }
-        std::optional<Speed> & get_mutable_speed() { return speed; }
-        void set_speed(const std::optional<Speed> & value) { this->speed = value; }
-
-        const std::optional<bool> & get_sub_module() const { return sub_module; }
-        std::optional<bool> & get_mutable_sub_module() { return sub_module; }
-        void set_sub_module(const std::optional<bool> & value) { this->sub_module = value; }
-
         const std::optional<VehicleType> & get_type() const { return type; }
         std::optional<VehicleType> & get_mutable_type() { return type; }
         void set_type(const std::optional<VehicleType> & value) { this->type = value; }
 
+        const std::optional<Speed> & get_speed() const { return speed; }
+        std::optional<Speed> & get_mutable_speed() { return speed; }
+        void set_speed(const std::optional<Speed> & value) { this->speed = value; }
+
         const std::optional<std::string> & get_year() const { return year; }
         std::optional<std::string> & get_mutable_year() { return year; }
         void set_year(const std::optional<std::string> & value) { this->year = value; }
+
+        const std::optional<std::string> & get_brand() const { return brand; }
+        std::optional<std::string> & get_mutable_brand() { return brand; }
+        void set_brand(const std::optional<std::string> & value) { this->brand = value; }
+
+        const std::optional<bool> & get_sub_module() const { return sub_module; }
+        std::optional<bool> & get_mutable_sub_module() { return sub_module; }
+        void set_sub_module(const std::optional<bool> & value) { this->sub_module = value; }
     };
 
     class TopLevel {
@@ -587,16 +587,16 @@ namespace quicktype {
     }
 
     inline void from_json(const json & j, Part& x) {
-        x.set_depth(get_stack_optional<std::string>(j, "depth"));
         x.set_length(get_stack_optional<std::string>(j, "length"));
         x.set_width(get_stack_optional<std::string>(j, "width"));
+        x.set_depth(get_stack_optional<std::string>(j, "depth"));
     }
 
     inline void to_json(json & j, const Part & x) {
         j = json::object();
-        j["depth"] = x.get_depth();
         j["length"] = x.get_length();
         j["width"] = x.get_width();
+        j["depth"] = x.get_depth();
     }
 
     inline void from_json(const json & j, RectShape& x) {
@@ -629,51 +629,51 @@ namespace quicktype {
     }
 
     inline void from_json(const json & j, Shape& x) {
-        x.set_geometry(get_stack_optional<Geometry>(j, "geometry"));
         x.set_history(get_stack_optional<History>(j, "history"));
+        x.set_geometry(get_stack_optional<Geometry>(j, "geometry"));
     }
 
     inline void to_json(json & j, const Shape & x) {
         j = json::object();
-        j["geometry"] = x.get_geometry();
         j["history"] = x.get_history();
+        j["geometry"] = x.get_geometry();
     }
 
     inline void from_json(const json & j, Berry& x) {
-        x.set_color(get_stack_optional<Color>(j, "color"));
         x.set_name(get_stack_optional<std::string>(j, "name"));
+        x.set_color(get_stack_optional<Color>(j, "color"));
         x.set_shapes(get_stack_optional<std::vector<Shape>>(j, "shapes"));
     }
 
     inline void to_json(json & j, const Berry & x) {
         j = json::object();
-        j["color"] = x.get_color();
         j["name"] = x.get_name();
+        j["color"] = x.get_color();
         j["shapes"] = x.get_shapes();
     }
 
     inline void from_json(const json & j, Fruit& x) {
         x.set_apple(get_stack_optional<bool>(j, "apple"));
-        x.set_berries(get_stack_optional<std::vector<Berry>>(j, "berries"));
         x.set_orange(get_stack_optional<bool>(j, "orange"));
+        x.set_berries(get_stack_optional<std::vector<Berry>>(j, "berries"));
     }
 
     inline void to_json(json & j, const Fruit & x) {
         j = json::object();
         j["apple"] = x.get_apple();
-        j["berries"] = x.get_berries();
         j["orange"] = x.get_orange();
+        j["berries"] = x.get_berries();
     }
 
     inline void from_json(const json & j, Limit& x) {
-        x.set_maximum(get_stack_optional<double>(j, "maximum"));
         x.set_minimum(get_stack_optional<double>(j, "minimum"));
+        x.set_maximum(get_stack_optional<double>(j, "maximum"));
     }
 
     inline void to_json(json & j, const Limit & x) {
         j = json::object();
-        j["maximum"] = x.get_maximum();
         j["minimum"] = x.get_minimum();
+        j["maximum"] = x.get_maximum();
     }
 
     inline void from_json(const json & j, Speed& x) {
@@ -699,22 +699,22 @@ namespace quicktype {
     }
 
     inline void from_json(const json & j, Vehicle& x) {
-        x.set_brand(get_stack_optional<std::string>(j, "brand"));
         x.set_id(get_stack_optional<std::string>(j, "id"));
-        x.set_speed(get_stack_optional<Speed>(j, "speed"));
-        x.set_sub_module(get_stack_optional<bool>(j, "subModule"));
         x.set_type(get_stack_optional<VehicleType>(j, "type"));
+        x.set_speed(get_stack_optional<Speed>(j, "speed"));
         x.set_year(get_stack_optional<std::string>(j, "year"));
+        x.set_brand(get_stack_optional<std::string>(j, "brand"));
+        x.set_sub_module(get_stack_optional<bool>(j, "subModule"));
     }
 
     inline void to_json(json & j, const Vehicle & x) {
         j = json::object();
-        j["brand"] = x.get_brand();
         j["id"] = x.get_id();
-        j["speed"] = x.get_speed();
-        j["subModule"] = x.get_sub_module();
         j["type"] = x.get_type();
+        j["speed"] = x.get_speed();
         j["year"] = x.get_year();
+        j["brand"] = x.get_brand();
+        j["subModule"] = x.get_sub_module();
     }
 
     inline void from_json(const json & j, TopLevel& x) {
diff --git a/base/schema-cplusplus/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.hpp
index 01ae820..30ce546 100644
--- a/base/schema-cplusplus/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.hpp
@@ -99,16 +99,16 @@ namespace quicktype {
         virtual ~Node() = default;
 
         private:
-        Next next;
         std::string value;
+        Next next;
 
         public:
-        Next get_next() const { return next; }
-        void set_next(Next value) { this->next = value; }
-
         const std::string & get_value() const { return value; }
         std::string & get_mutable_value() { return value; }
         void set_value(const std::string & value) { this->value = value; }
+
+        Next get_next() const { return next; }
+        void set_next(Next value) { this->next = value; }
     };
 
     class TopLevel {
@@ -117,16 +117,16 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        Next next;
         std::string value;
+        Next next;
 
         public:
-        Next get_next() const { return next; }
-        void set_next(Next value) { this->next = value; }
-
         const std::string & get_value() const { return value; }
         std::string & get_mutable_value() { return value; }
         void set_value(const std::string & value) { this->value = value; }
+
+        Next get_next() const { return next; }
+        void set_next(Next value) { this->next = value; }
     };
 }
 
@@ -146,25 +146,25 @@ struct adl_serializer<std::variant<std::shared_ptr<quicktype::Node>, std::string
 }
 namespace quicktype {
     inline void from_json(const json & j, Node& x) {
-        x.set_next(get_heap_optional<std::variant<std::shared_ptr<Node>, std::string>>(j, "next"));
         x.set_value(j.at("value").get<std::string>());
+        x.set_next(get_heap_optional<std::variant<std::shared_ptr<Node>, std::string>>(j, "next"));
     }
 
     inline void to_json(json & j, const Node & x) {
         j = json::object();
-        j["next"] = x.get_next();
         j["value"] = x.get_value();
+        j["next"] = x.get_next();
     }
 
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_next(get_heap_optional<std::variant<std::shared_ptr<Node>, std::string>>(j, "next"));
         x.set_value(j.at("value").get<std::string>());
+        x.set_next(get_heap_optional<std::variant<std::shared_ptr<Node>, std::string>>(j, "next"));
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["next"] = x.get_next();
         j["value"] = x.get_value();
+        j["next"] = x.get_next();
     }
 }
 namespace nlohmann {
diff --git a/base/schema-cplusplus/test/inputs/schema/uuid.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/uuid.schema/default/quicktype.hpp
index 866342b..acbb30e 100644
--- a/base/schema-cplusplus/test/inputs/schema/uuid.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/uuid.schema/default/quicktype.hpp
@@ -94,25 +94,14 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
-        std::optional<std::vector<std::optional<std::string>>> arr_nullable;
-        std::optional<std::vector<std::string>> arr_one;
-        std::optional<std::string> nullable;
         std::string one;
         std::optional<std::string> optional;
+        std::optional<std::string> nullable;
+        std::optional<std::vector<std::string>> arr_one;
+        std::optional<std::vector<std::optional<std::string>>> arr_nullable;
         std::string union_with_enum;
 
         public:
-        const std::optional<std::vector<std::optional<std::string>>> & get_arr_nullable() const { return arr_nullable; }
-        std::optional<std::vector<std::optional<std::string>>> & get_mutable_arr_nullable() { return arr_nullable; }
-        void set_arr_nullable(const std::optional<std::vector<std::optional<std::string>>> & value) { this->arr_nullable = value; }
-
-        const std::optional<std::vector<std::string>> & get_arr_one() const { return arr_one; }
-        std::optional<std::vector<std::string>> & get_mutable_arr_one() { return arr_one; }
-        void set_arr_one(const std::optional<std::vector<std::string>> & value) { this->arr_one = value; }
-
-        std::optional<std::string> get_nullable() const { return nullable; }
-        void set_nullable(std::optional<std::string> value) { this->nullable = value; }
-
         const std::string & get_one() const { return one; }
         std::string & get_mutable_one() { return one; }
         void set_one(const std::string & value) { this->one = value; }
@@ -121,6 +110,17 @@ namespace quicktype {
         std::optional<std::string> & get_mutable_optional() { return optional; }
         void set_optional(const std::optional<std::string> & value) { this->optional = value; }
 
+        std::optional<std::string> get_nullable() const { return nullable; }
+        void set_nullable(std::optional<std::string> value) { this->nullable = value; }
+
+        const std::optional<std::vector<std::string>> & get_arr_one() const { return arr_one; }
+        std::optional<std::vector<std::string>> & get_mutable_arr_one() { return arr_one; }
+        void set_arr_one(const std::optional<std::vector<std::string>> & value) { this->arr_one = value; }
+
+        const std::optional<std::vector<std::optional<std::string>>> & get_arr_nullable() const { return arr_nullable; }
+        std::optional<std::vector<std::optional<std::string>>> & get_mutable_arr_nullable() { return arr_nullable; }
+        void set_arr_nullable(const std::optional<std::vector<std::optional<std::string>>> & value) { this->arr_nullable = value; }
+
         const std::string & get_union_with_enum() const { return union_with_enum; }
         std::string & get_mutable_union_with_enum() { return union_with_enum; }
         void set_union_with_enum(const std::string & value) { this->union_with_enum = value; }
@@ -132,21 +132,21 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, TopLevel& x) {
-        x.set_arr_nullable(get_stack_optional<std::vector<std::optional<std::string>>>(j, "arrNullable"));
-        x.set_arr_one(get_stack_optional<std::vector<std::string>>(j, "arrOne"));
-        x.set_nullable(get_stack_optional<std::string>(j, "nullable"));
         x.set_one(j.at("one").get<std::string>());
         x.set_optional(get_stack_optional<std::string>(j, "optional"));
+        x.set_nullable(get_stack_optional<std::string>(j, "nullable"));
+        x.set_arr_one(get_stack_optional<std::vector<std::string>>(j, "arrOne"));
+        x.set_arr_nullable(get_stack_optional<std::vector<std::optional<std::string>>>(j, "arrNullable"));
         x.set_union_with_enum(j.at("unionWithEnum").get<std::string>());
     }
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
-        j["arrNullable"] = x.get_arr_nullable();
-        j["arrOne"] = x.get_arr_one();
-        j["nullable"] = x.get_nullable();
         j["one"] = x.get_one();
         j["optional"] = x.get_optional();
+        j["nullable"] = x.get_nullable();
+        j["arrOne"] = x.get_arr_one();
+        j["arrNullable"] = x.get_arr_nullable();
         j["unionWithEnum"] = x.get_union_with_enum();
     }
 }
diff --git a/base/schema-cplusplus/test/inputs/schema/vega-lite.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/vega-lite.schema/default/quicktype.hpp
index 8b7e3c8..897756e 100644
--- a/base/schema-cplusplus/test/inputs/schema/vega-lite.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/vega-lite.schema/default/quicktype.hpp
@@ -397,9 +397,9 @@ namespace quicktype {
         std::optional<double> dx;
         std::optional<double> dy;
         std::optional<std::string> fill;
-        std::optional<bool> filled;
         std::optional<double> fill_opacity;
         ClassMemberConstraints fill_opacity_constraint;
+        std::optional<bool> filled;
         std::optional<std::string> font;
         std::optional<double> font_size;
         ClassMemberConstraints font_size_constraint;
@@ -497,6 +497,15 @@ namespace quicktype {
         std::optional<std::string> & get_mutable_fill() { return fill; }
         void set_fill(const std::optional<std::string> & value) { this->fill = value; }
 
+        /**
+         * The fill opacity (value between [0,1]).
+         *
+         * __Default value:__ `1`
+         */
+        const std::optional<double> & get_fill_opacity() const { return fill_opacity; }
+        std::optional<double> & get_mutable_fill_opacity() { return fill_opacity; }
+        void set_fill_opacity(const std::optional<double> & value) { CheckConstraint("fill_opacity", fill_opacity_constraint, value); this->fill_opacity = value; }
+
         /**
          * Whether the mark's color should be used as fill color instead of stroke color.
          *
@@ -510,15 +519,6 @@ namespace quicktype {
         std::optional<bool> & get_mutable_filled() { return filled; }
         void set_filled(const std::optional<bool> & value) { this->filled = value; }
 
-        /**
-         * The fill opacity (value between [0,1]).
-         *
-         * __Default value:__ `1`
-         */
-        const std::optional<double> & get_fill_opacity() const { return fill_opacity; }
-        std::optional<double> & get_mutable_fill_opacity() { return fill_opacity; }
-        void set_fill_opacity(const std::optional<double> & value) { CheckConstraint("fill_opacity", fill_opacity_constraint, value); this->fill_opacity = value; }
-
         /**
          * The typeface to set the text in (e.g., `"Helvetica Neue"`).
          */
@@ -759,11 +759,11 @@ namespace quicktype {
         std::optional<bool> short_time_labels;
         std::optional<std::string> tick_color;
         std::optional<bool> tick_round;
-        std::optional<bool> ticks;
         std::optional<double> tick_size;
         ClassMemberConstraints tick_size_constraint;
         std::optional<double> tick_width;
         ClassMemberConstraints tick_width_constraint;
+        std::optional<bool> ticks;
         std::optional<std::string> title_align;
         std::optional<double> title_angle;
         std::optional<std::string> title_baseline;
@@ -994,13 +994,6 @@ namespace quicktype {
         std::optional<bool> & get_mutable_tick_round() { return tick_round; }
         void set_tick_round(const std::optional<bool> & value) { this->tick_round = value; }
 
-        /**
-         * Boolean value that determines whether the axis should include ticks.
-         */
-        const std::optional<bool> & get_ticks() const { return ticks; }
-        std::optional<bool> & get_mutable_ticks() { return ticks; }
-        void set_ticks(const std::optional<bool> & value) { this->ticks = value; }
-
         /**
          * The size in pixels of axis ticks.
          */
@@ -1015,6 +1008,13 @@ namespace quicktype {
         std::optional<double> & get_mutable_tick_width() { return tick_width; }
         void set_tick_width(const std::optional<double> & value) { CheckConstraint("tick_width", tick_width_constraint, value); this->tick_width = value; }
 
+        /**
+         * Boolean value that determines whether the axis should include ticks.
+         */
+        const std::optional<bool> & get_ticks() const { return ticks; }
+        std::optional<bool> & get_mutable_ticks() { return ticks; }
+        void set_ticks(const std::optional<bool> & value) { this->ticks = value; }
+
         /**
          * Horizontal text alignment of axis titles.
          */
@@ -1157,11 +1157,11 @@ namespace quicktype {
         std::optional<double> min_extent;
         std::optional<std::string> tick_color;
         std::optional<bool> tick_round;
-        std::optional<bool> ticks;
         std::optional<double> tick_size;
         ClassMemberConstraints tick_size_constraint;
         std::optional<double> tick_width;
         ClassMemberConstraints tick_width_constraint;
+        std::optional<bool> ticks;
         std::optional<std::string> title_align;
         std::optional<double> title_angle;
         std::optional<std::string> title_baseline;
@@ -1383,13 +1383,6 @@ namespace quicktype {
         std::optional<bool> & get_mutable_tick_round() { return tick_round; }
         void set_tick_round(const std::optional<bool> & value) { this->tick_round = value; }
 
-        /**
-         * Boolean value that determines whether the axis should include ticks.
-         */
-        const std::optional<bool> & get_ticks() const { return ticks; }
-        std::optional<bool> & get_mutable_ticks() { return ticks; }
-        void set_ticks(const std::optional<bool> & value) { this->ticks = value; }
-
         /**
          * The size in pixels of axis ticks.
          */
@@ -1404,6 +1397,13 @@ namespace quicktype {
         std::optional<double> & get_mutable_tick_width() { return tick_width; }
         void set_tick_width(const std::optional<double> & value) { CheckConstraint("tick_width", tick_width_constraint, value); this->tick_width = value; }
 
+        /**
+         * Boolean value that determines whether the axis should include ticks.
+         */
+        const std::optional<bool> & get_ticks() const { return ticks; }
+        std::optional<bool> & get_mutable_ticks() { return ticks; }
+        void set_ticks(const std::optional<bool> & value) { this->ticks = value; }
+
         /**
          * Horizontal text alignment of axis titles.
          */
@@ -1527,9 +1527,9 @@ namespace quicktype {
         std::optional<double> dx;
         std::optional<double> dy;
         std::optional<std::string> fill;
-        std::optional<bool> filled;
         std::optional<double> fill_opacity;
         ClassMemberConstraints fill_opacity_constraint;
+        std::optional<bool> filled;
         std::optional<std::string> font;
         std::optional<double> font_size;
         ClassMemberConstraints font_size_constraint;
@@ -1654,6 +1654,15 @@ namespace quicktype {
         std::optional<std::string> & get_mutable_fill() { return fill; }
         void set_fill(const std::optional<std::string> & value) { this->fill = value; }
 
+        /**
+         * The fill opacity (value between [0,1]).
+         *
+         * __Default value:__ `1`
+         */
+        const std::optional<double> & get_fill_opacity() const { return fill_opacity; }
+        std::optional<double> & get_mutable_fill_opacity() { return fill_opacity; }
+        void set_fill_opacity(const std::optional<double> & value) { CheckConstraint("fill_opacity", fill_opacity_constraint, value); this->fill_opacity = value; }
+
         /**
          * Whether the mark's color should be used as fill color instead of stroke color.
          *
@@ -1667,15 +1676,6 @@ namespace quicktype {
         std::optional<bool> & get_mutable_filled() { return filled; }
         void set_filled(const std::optional<bool> & value) { this->filled = value; }
 
-        /**
-         * The fill opacity (value between [0,1]).
-         *
-         * __Default value:__ `1`
-         */
-        const std::optional<double> & get_fill_opacity() const { return fill_opacity; }
-        std::optional<double> & get_mutable_fill_opacity() { return fill_opacity; }
-        void set_fill_opacity(const std::optional<double> & value) { CheckConstraint("fill_opacity", fill_opacity_constraint, value); this->fill_opacity = value; }
-
         /**
          * The typeface to set the text in (e.g., `"Helvetica Neue"`).
          */
@@ -3488,9 +3488,9 @@ namespace quicktype {
         std::optional<double> dx;
         std::optional<double> dy;
         std::optional<std::string> fill;
-        std::optional<bool> filled;
         std::optional<double> fill_opacity;
         ClassMemberConstraints fill_opacity_constraint;
+        std::optional<bool> filled;
         std::optional<std::string> font;
         std::optional<double> font_size;
         ClassMemberConstraints font_size_constraint;
@@ -3589,6 +3589,15 @@ namespace quicktype {
         std::optional<std::string> & get_mutable_fill() { return fill; }
         void set_fill(const std::optional<std::string> & value) { this->fill = value; }
 
+        /**
+         * The fill opacity (value between [0,1]).
+         *
+         * __Default value:__ `1`
+         */
+        const std::optional<double> & get_fill_opacity() const { return fill_opacity; }
+        std::optional<double> & get_mutable_fill_opacity() { return fill_opacity; }
+        void set_fill_opacity(const std::optional<double> & value) { CheckConstraint("fill_opacity", fill_opacity_constraint, value); this->fill_opacity = value; }
+
         /**
          * Whether the mark's color should be used as fill color instead of stroke color.
          *
@@ -3602,15 +3611,6 @@ namespace quicktype {
         std::optional<bool> & get_mutable_filled() { return filled; }
         void set_filled(const std::optional<bool> & value) { this->filled = value; }
 
-        /**
-         * The fill opacity (value between [0,1]).
-         *
-         * __Default value:__ `1`
-         */
-        const std::optional<double> & get_fill_opacity() const { return fill_opacity; }
-        std::optional<double> & get_mutable_fill_opacity() { return fill_opacity; }
-        void set_fill_opacity(const std::optional<double> & value) { CheckConstraint("fill_opacity", fill_opacity_constraint, value); this->fill_opacity = value; }
-
         /**
          * The typeface to set the text in (e.g., `"Helvetica Neue"`).
          */
@@ -3835,9 +3835,9 @@ namespace quicktype {
         std::optional<double> dx;
         std::optional<double> dy;
         std::optional<std::string> fill;
-        std::optional<bool> filled;
         std::optional<double> fill_opacity;
         ClassMemberConstraints fill_opacity_constraint;
+        std::optional<bool> filled;
         std::optional<std::string> font;
         std::optional<double> font_size;
         ClassMemberConstraints font_size_constraint;
@@ -3946,6 +3946,15 @@ namespace quicktype {
         std::optional<std::string> & get_mutable_fill() { return fill; }
         void set_fill(const std::optional<std::string> & value) { this->fill = value; }
 
+        /**
+         * The fill opacity (value between [0,1]).
+         *
+         * __Default value:__ `1`
+         */
+        const std::optional<double> & get_fill_opacity() const { return fill_opacity; }
+        std::optional<double> & get_mutable_fill_opacity() { return fill_opacity; }
+        void set_fill_opacity(const std::optional<double> & value) { CheckConstraint("fill_opacity", fill_opacity_constraint, value); this->fill_opacity = value; }
+
         /**
          * Whether the mark's color should be used as fill color instead of stroke color.
          *
@@ -3959,15 +3968,6 @@ namespace quicktype {
         std::optional<bool> & get_mutable_filled() { return filled; }
         void set_filled(const std::optional<bool> & value) { this->filled = value; }
 
-        /**
-         * The fill opacity (value between [0,1]).
-         *
-         * __Default value:__ `1`
-         */
-        const std::optional<double> & get_fill_opacity() const { return fill_opacity; }
-        std::optional<double> & get_mutable_fill_opacity() { return fill_opacity; }
-        void set_fill_opacity(const std::optional<double> & value) { CheckConstraint("fill_opacity", fill_opacity_constraint, value); this->fill_opacity = value; }
-
         /**
          * The typeface to set the text in (e.g., `"Helvetica Neue"`).
          */
@@ -7021,9 +7021,9 @@ namespace quicktype {
         std::optional<TitleOrient> orient;
         std::optional<double> position;
         std::optional<double> tick_count;
-        std::optional<bool> ticks;
         std::optional<double> tick_size;
         ClassMemberConstraints tick_size_constraint;
+        std::optional<bool> ticks;
         std::optional<std::string> title;
         std::optional<double> title_max_length;
         std::optional<double> title_padding;
@@ -7196,13 +7196,6 @@ namespace quicktype {
         std::optional<double> & get_mutable_tick_count() { return tick_count; }
         void set_tick_count(const std::optional<double> & value) { this->tick_count = value; }
 
-        /**
-         * Boolean value that determines whether the axis should include ticks.
-         */
-        const std::optional<bool> & get_ticks() const { return ticks; }
-        std::optional<bool> & get_mutable_ticks() { return ticks; }
-        void set_ticks(const std::optional<bool> & value) { this->ticks = value; }
-
         /**
          * The size in pixels of axis ticks.
          */
@@ -7210,6 +7203,13 @@ namespace quicktype {
         std::optional<double> & get_mutable_tick_size() { return tick_size; }
         void set_tick_size(const std::optional<double> & value) { CheckConstraint("tick_size", tick_size_constraint, value); this->tick_size = value; }
 
+        /**
+         * Boolean value that determines whether the axis should include ticks.
+         */
+        const std::optional<bool> & get_ticks() const { return ticks; }
+        std::optional<bool> & get_mutable_ticks() { return ticks; }
+        void set_ticks(const std::optional<bool> & value) { this->ticks = value; }
+
         /**
          * A title for the field. If `null`, the title will be removed.
          *
@@ -7864,9 +7864,9 @@ namespace quicktype {
         std::optional<double> dx;
         std::optional<double> dy;
         std::optional<std::string> fill;
-        std::optional<bool> filled;
         std::optional<double> fill_opacity;
         ClassMemberConstraints fill_opacity_constraint;
+        std::optional<bool> filled;
         std::optional<std::string> font;
         std::optional<double> font_size;
         ClassMemberConstraints font_size_constraint;
@@ -7973,6 +7973,15 @@ namespace quicktype {
         std::optional<std::string> & get_mutable_fill() { return fill; }
         void set_fill(const std::optional<std::string> & value) { this->fill = value; }
 
+        /**
+         * The fill opacity (value between [0,1]).
+         *
+         * __Default value:__ `1`
+         */
+        const std::optional<double> & get_fill_opacity() const { return fill_opacity; }
+        std::optional<double> & get_mutable_fill_opacity() { return fill_opacity; }
+        void set_fill_opacity(const std::optional<double> & value) { CheckConstraint("fill_opacity", fill_opacity_constraint, value); this->fill_opacity = value; }
+
         /**
          * Whether the mark's color should be used as fill color instead of stroke color.
          *
@@ -7986,15 +7995,6 @@ namespace quicktype {
         std::optional<bool> & get_mutable_filled() { return filled; }
         void set_filled(const std::optional<bool> & value) { this->filled = value; }
 
-        /**
-         * The fill opacity (value between [0,1]).
-         *
-         * __Default value:__ `1`
-         */
-        const std::optional<double> & get_fill_opacity() const { return fill_opacity; }
-        std::optional<double> & get_mutable_fill_opacity() { return fill_opacity; }
-        void set_fill_opacity(const std::optional<double> & value) { CheckConstraint("fill_opacity", fill_opacity_constraint, value); this->fill_opacity = value; }
-
         /**
          * The typeface to set the text in (e.g., `"Helvetica Neue"`).
          */
@@ -10074,8 +10074,8 @@ namespace quicktype {
         x.set_dx(get_stack_optional<double>(j, "dx"));
         x.set_dy(get_stack_optional<double>(j, "dy"));
         x.set_fill(get_stack_optional<std::string>(j, "fill"));
-        x.set_filled(get_stack_optional<bool>(j, "filled"));
         x.set_fill_opacity(get_stack_optional<double>(j, "fillOpacity"));
+        x.set_filled(get_stack_optional<bool>(j, "filled"));
         x.set_font(get_stack_optional<std::string>(j, "font"));
         x.set_font_size(get_stack_optional<double>(j, "fontSize"));
         x.set_font_style(get_stack_optional<FontStyle>(j, "fontStyle"));
@@ -10108,8 +10108,8 @@ namespace quicktype {
         j["dx"] = x.get_dx();
         j["dy"] = x.get_dy();
         j["fill"] = x.get_fill();
-        j["filled"] = x.get_filled();
         j["fillOpacity"] = x.get_fill_opacity();
+        j["filled"] = x.get_filled();
         j["font"] = x.get_font();
         j["fontSize"] = x.get_font_size();
         j["fontStyle"] = x.get_font_style();
@@ -10157,9 +10157,9 @@ namespace quicktype {
         x.set_short_time_labels(get_stack_optional<bool>(j, "shortTimeLabels"));
         x.set_tick_color(get_stack_optional<std::string>(j, "tickColor"));
         x.set_tick_round(get_stack_optional<bool>(j, "tickRound"));
-        x.set_ticks(get_stack_optional<bool>(j, "ticks"));
         x.set_tick_size(get_stack_optional<double>(j, "tickSize"));
         x.set_tick_width(get_stack_optional<double>(j, "tickWidth"));
+        x.set_ticks(get_stack_optional<bool>(j, "ticks"));
         x.set_title_align(get_stack_optional<std::string>(j, "titleAlign"));
         x.set_title_angle(get_stack_optional<double>(j, "titleAngle"));
         x.set_title_baseline(get_stack_optional<std::string>(j, "titleBaseline"));
@@ -10200,9 +10200,9 @@ namespace quicktype {
         j["shortTimeLabels"] = x.get_short_time_labels();
         j["tickColor"] = x.get_tick_color();
         j["tickRound"] = x.get_tick_round();
-        j["ticks"] = x.get_ticks();
         j["tickSize"] = x.get_tick_size();
         j["tickWidth"] = x.get_tick_width();
+        j["ticks"] = x.get_ticks();
         j["titleAlign"] = x.get_title_align();
         j["titleAngle"] = x.get_title_angle();
         j["titleBaseline"] = x.get_title_baseline();
@@ -10241,9 +10241,9 @@ namespace quicktype {
         x.set_min_extent(get_stack_optional<double>(j, "minExtent"));
         x.set_tick_color(get_stack_optional<std::string>(j, "tickColor"));
         x.set_tick_round(get_stack_optional<bool>(j, "tickRound"));
-        x.set_ticks(get_stack_optional<bool>(j, "ticks"));
         x.set_tick_size(get_stack_optional<double>(j, "tickSize"));
         x.set_tick_width(get_stack_optional<double>(j, "tickWidth"));
+        x.set_ticks(get_stack_optional<bool>(j, "ticks"));
         x.set_title_align(get_stack_optional<std::string>(j, "titleAlign"));
         x.set_title_angle(get_stack_optional<double>(j, "titleAngle"));
         x.set_title_baseline(get_stack_optional<std::string>(j, "titleBaseline"));
@@ -10283,9 +10283,9 @@ namespace quicktype {
         j["minExtent"] = x.get_min_extent();
         j["tickColor"] = x.get_tick_color();
         j["tickRound"] = x.get_tick_round();
-        j["ticks"] = x.get_ticks();
         j["tickSize"] = x.get_tick_size();
         j["tickWidth"] = x.get_tick_width();
+        j["ticks"] = x.get_ticks();
         j["titleAlign"] = x.get_title_align();
         j["titleAngle"] = x.get_title_angle();
         j["titleBaseline"] = x.get_title_baseline();
@@ -10312,8 +10312,8 @@ namespace quicktype {
         x.set_dx(get_stack_optional<double>(j, "dx"));
         x.set_dy(get_stack_optional<double>(j, "dy"));
         x.set_fill(get_stack_optional<std::string>(j, "fill"));
-        x.set_filled(get_stack_optional<bool>(j, "filled"));
         x.set_fill_opacity(get_stack_optional<double>(j, "fillOpacity"));
+        x.set_filled(get_stack_optional<bool>(j, "filled"));
         x.set_font(get_stack_optional<std::string>(j, "font"));
         x.set_font_size(get_stack_optional<double>(j, "fontSize"));
         x.set_font_style(get_stack_optional<FontStyle>(j, "fontStyle"));
@@ -10349,8 +10349,8 @@ namespace quicktype {
         j["dx"] = x.get_dx();
         j["dy"] = x.get_dy();
         j["fill"] = x.get_fill();
-        j["filled"] = x.get_filled();
         j["fillOpacity"] = x.get_fill_opacity();
+        j["filled"] = x.get_filled();
         j["font"] = x.get_font();
         j["fontSize"] = x.get_font_size();
         j["fontStyle"] = x.get_font_style();
@@ -10756,8 +10756,8 @@ namespace quicktype {
         x.set_dx(get_stack_optional<double>(j, "dx"));
         x.set_dy(get_stack_optional<double>(j, "dy"));
         x.set_fill(get_stack_optional<std::string>(j, "fill"));
-        x.set_filled(get_stack_optional<bool>(j, "filled"));
         x.set_fill_opacity(get_stack_optional<double>(j, "fillOpacity"));
+        x.set_filled(get_stack_optional<bool>(j, "filled"));
         x.set_font(get_stack_optional<std::string>(j, "font"));
         x.set_font_size(get_stack_optional<double>(j, "fontSize"));
         x.set_font_style(get_stack_optional<FontStyle>(j, "fontStyle"));
@@ -10791,8 +10791,8 @@ namespace quicktype {
         j["dx"] = x.get_dx();
         j["dy"] = x.get_dy();
         j["fill"] = x.get_fill();
-        j["filled"] = x.get_filled();
         j["fillOpacity"] = x.get_fill_opacity();
+        j["filled"] = x.get_filled();
         j["font"] = x.get_font();
         j["fontSize"] = x.get_font_size();
         j["fontStyle"] = x.get_font_style();
@@ -10826,8 +10826,8 @@ namespace quicktype {
         x.set_dx(get_stack_optional<double>(j, "dx"));
         x.set_dy(get_stack_optional<double>(j, "dy"));
         x.set_fill(get_stack_optional<std::string>(j, "fill"));
-        x.set_filled(get_stack_optional<bool>(j, "filled"));
         x.set_fill_opacity(get_stack_optional<double>(j, "fillOpacity"));
+        x.set_filled(get_stack_optional<bool>(j, "filled"));
         x.set_font(get_stack_optional<std::string>(j, "font"));
         x.set_font_size(get_stack_optional<double>(j, "fontSize"));
         x.set_font_style(get_stack_optional<FontStyle>(j, "fontStyle"));
@@ -10862,8 +10862,8 @@ namespace quicktype {
         j["dx"] = x.get_dx();
         j["dy"] = x.get_dy();
         j["fill"] = x.get_fill();
-        j["filled"] = x.get_filled();
         j["fillOpacity"] = x.get_fill_opacity();
+        j["filled"] = x.get_filled();
         j["font"] = x.get_font();
         j["fontSize"] = x.get_font_size();
         j["fontStyle"] = x.get_font_style();
@@ -11521,8 +11521,8 @@ namespace quicktype {
         x.set_orient(get_stack_optional<TitleOrient>(j, "orient"));
         x.set_position(get_stack_optional<double>(j, "position"));
         x.set_tick_count(get_stack_optional<double>(j, "tickCount"));
-        x.set_ticks(get_stack_optional<bool>(j, "ticks"));
         x.set_tick_size(get_stack_optional<double>(j, "tickSize"));
+        x.set_ticks(get_stack_optional<bool>(j, "ticks"));
         x.set_title(get_stack_optional<std::string>(j, "title"));
         x.set_title_max_length(get_stack_optional<double>(j, "titleMaxLength"));
         x.set_title_padding(get_stack_optional<double>(j, "titlePadding"));
@@ -11547,8 +11547,8 @@ namespace quicktype {
         j["orient"] = x.get_orient();
         j["position"] = x.get_position();
         j["tickCount"] = x.get_tick_count();
-        j["ticks"] = x.get_ticks();
         j["tickSize"] = x.get_tick_size();
+        j["ticks"] = x.get_ticks();
         j["title"] = x.get_title();
         j["titleMaxLength"] = x.get_title_max_length();
         j["titlePadding"] = x.get_title_padding();
@@ -11693,8 +11693,8 @@ namespace quicktype {
         x.set_dx(get_stack_optional<double>(j, "dx"));
         x.set_dy(get_stack_optional<double>(j, "dy"));
         x.set_fill(get_stack_optional<std::string>(j, "fill"));
-        x.set_filled(get_stack_optional<bool>(j, "filled"));
         x.set_fill_opacity(get_stack_optional<double>(j, "fillOpacity"));
+        x.set_filled(get_stack_optional<bool>(j, "filled"));
         x.set_font(get_stack_optional<std::string>(j, "font"));
         x.set_font_size(get_stack_optional<double>(j, "fontSize"));
         x.set_font_style(get_stack_optional<FontStyle>(j, "fontStyle"));
@@ -11730,8 +11730,8 @@ namespace quicktype {
         j["dx"] = x.get_dx();
         j["dy"] = x.get_dy();
         j["fill"] = x.get_fill();
-        j["filled"] = x.get_filled();
         j["fillOpacity"] = x.get_fill_opacity();
+        j["filled"] = x.get_filled();
         j["font"] = x.get_font();
         j["fontSize"] = x.get_font_size();
         j["fontStyle"] = x.get_font_style();
diff --git a/base/schema-csharp/test/inputs/schema/accessors.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/accessors.schema/default/QuickType.cs
index 5052e1d..e531cfb 100644
--- a/base/schema-csharp/test/inputs/schema/accessors.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/accessors.schema/default/QuickType.cs
@@ -25,8 +25,8 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("bar", Required = Required.Always)]
-        public string Barre { get; set; }
+        [JsonProperty("union", Required = Required.Always)]
+        public Union Unionization { get; set; }
 
         [JsonProperty("enum", Required = Required.Always)]
         public Enum Enumerification { get; set; }
@@ -34,8 +34,8 @@ namespace QuickType
         [JsonProperty("foo", Required = Required.Always)]
         public string Fu_uu { get; set; }
 
-        [JsonProperty("union", Required = Required.Always)]
-        public Union Unionization { get; set; }
+        [JsonProperty("bar", Required = Required.Always)]
+        public string Barre { get; set; }
     }
 
     public enum Enum { Fire, Grass, Blue };
diff --git a/base/schema-csharp/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.cs
index 2446b5d..83c0c04 100644
--- a/base/schema-csharp/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.cs
@@ -31,11 +31,11 @@ namespace QuickType
         [JsonProperty("frequency", Required = Required.Always)]
         public Frequency Frequency { get; set; }
 
-        [JsonProperty("description", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public string? Description { get; set; }
-
         [JsonProperty("type", Required = Required.Always)]
         public TypeEnum Type { get; set; }
+
+        [JsonProperty("description", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public string? Description { get; set; }
     }
 
     public enum Frequency { Weekly, Monthly, Annually };
diff --git a/base/schema-csharp/test/inputs/schema/bool-string.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/bool-string.schema/default/QuickType.cs
index b488fe6..a263d30 100644
--- a/base/schema-csharp/test/inputs/schema/bool-string.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/bool-string.schema/default/QuickType.cs
@@ -25,18 +25,6 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("arrNullable", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(PurpleDecodeArrayConverter))]
-        public bool?[]? ArrNullable { get; set; }
-
-        [JsonProperty("arrOne", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(FluffyDecodeArrayConverter))]
-        public bool[]? ArrOne { get; set; }
-
-        [JsonProperty("nullable", Required = Required.AllowNull)]
-        [JsonConverter(typeof(ParseStringConverter))]
-        public bool? Nullable { get; set; }
-
         [JsonProperty("one", Required = Required.Always)]
         [JsonConverter(typeof(ParseStringConverter))]
         public bool One { get; set; }
@@ -45,6 +33,18 @@ namespace QuickType
         [JsonConverter(typeof(ParseStringConverter))]
         public bool? Optional { get; set; }
 
+        [JsonProperty("nullable", Required = Required.AllowNull)]
+        [JsonConverter(typeof(ParseStringConverter))]
+        public bool? Nullable { get; set; }
+
+        [JsonProperty("arrOne", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(FluffyDecodeArrayConverter))]
+        public bool[]? ArrOne { get; set; }
+
+        [JsonProperty("arrNullable", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(PurpleDecodeArrayConverter))]
+        public bool?[]? ArrNullable { get; set; }
+
         [JsonProperty("unionWithBool", Required = Required.Always)]
         [JsonConverter(typeof(DecodingChoiceConverter))]
         public bool UnionWithBool { get; set; }
diff --git a/base/schema-csharp/test/inputs/schema/boolean-subschema.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/boolean-subschema.schema/default/QuickType.cs
index 4d9f352..c3fc9fa 100644
--- a/base/schema-csharp/test/inputs/schema/boolean-subschema.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/boolean-subschema.schema/default/QuickType.cs
@@ -25,15 +25,15 @@ namespace QuickType
 
     public partial class TopLevel
     {
+        [JsonProperty("foo", Required = Required.Always)]
+        public string Foo { get; set; }
+
         [JsonProperty("disallowed")]
         public object? Disallowed { get; set; }
 
         [JsonProperty("empty", Required = Required.Always)]
         public object[] Empty { get; set; }
 
-        [JsonProperty("foo", Required = Required.Always)]
-        public string Foo { get; set; }
-
         [JsonProperty("impossible")]
         public object? Impossible { get; set; }
     }
diff --git a/base/schema-csharp/test/inputs/schema/comment-injection.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/comment-injection.schema/default/QuickType.cs
index a5ce04a..ae49fcf 100644
--- a/base/schema-csharp/test/inputs/schema/comment-injection.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/comment-injection.schema/default/QuickType.cs
@@ -39,6 +39,23 @@ namespace QuickType
     /// </summary>
     public partial class TopLevel
     {
+        /// <summary>
+        /// Property delimiters:
+        /// */
+        /// /*
+        /// {-
+        /// -}
+        /// """
+        /// &lt;/summary&gt; &amp; &lt;br&gt;
+        /// }
+        /// }
+        /// }
+        /// }
+        /// }
+        /// </summary>
+        [JsonProperty("value", Required = Required.Always)]
+        public string Value { get; set; }
+
         /// <summary>
         /// Ends with a backslash \
         /// </summary>
@@ -56,23 +73,6 @@ namespace QuickType
         /// </summary>
         [JsonProperty("trailingTripleQuote", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public string? TrailingTripleQuote { get; set; }
-
-        /// <summary>
-        /// Property delimiters:
-        /// */
-        /// /*
-        /// {-
-        /// -}
-        /// """
-        /// &lt;/summary&gt; &amp; &lt;br&gt;
-        /// }
-        /// }
-        /// }
-        /// }
-        /// }
-        /// </summary>
-        [JsonProperty("value", Required = Required.Always)]
-        public string Value { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp/test/inputs/schema/const-non-string.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/const-non-string.schema/default/QuickType.cs
index 420129d..f2c1869 100644
--- a/base/schema-csharp/test/inputs/schema/const-non-string.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/const-non-string.schema/default/QuickType.cs
@@ -25,20 +25,20 @@ namespace QuickType
 
     public partial class TopLevel
     {
+        [JsonProperty("version", Required = Required.Always)]
+        public double Version { get; set; }
+
         [JsonProperty("amount", Required = Required.Always)]
         public long Amount { get; set; }
 
+        [JsonProperty("ratio", Required = Required.Always)]
+        public double Ratio { get; set; }
+
         [JsonProperty("enabled", Required = Required.Always)]
         public bool Enabled { get; set; }
 
         [JsonProperty("kind", Required = Required.Always)]
         public Kind Kind { get; set; }
-
-        [JsonProperty("ratio", Required = Required.Always)]
-        public double Ratio { get; set; }
-
-        [JsonProperty("version", Required = Required.Always)]
-        public double Version { get; set; }
     }
 
     public enum Kind { Widget };
diff --git a/base/schema-csharp/test/inputs/schema/date-time-or-string.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/date-time-or-string.schema/default/QuickType.cs
index 2598f73..e5ecb57 100644
--- a/base/schema-csharp/test/inputs/schema/date-time-or-string.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/date-time-or-string.schema/default/QuickType.cs
@@ -25,11 +25,11 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("bar", Required = Required.Always)]
-        public BarUnion Bar { get; set; }
-
         [JsonProperty("foo", Required = Required.Always)]
         public string Foo { get; set; }
+
+        [JsonProperty("bar", Required = Required.Always)]
+        public BarUnion Bar { get; set; }
     }
 
     public enum BarEnum { Quux };
diff --git a/base/schema-csharp/test/inputs/schema/date-time.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/date-time.schema/default/QuickType.cs
index 04196fd..62f9bb8 100644
--- a/base/schema-csharp/test/inputs/schema/date-time.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/date-time.schema/default/QuickType.cs
@@ -25,20 +25,20 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("complex-union-array", Required = Required.Always)]
-        public ComplexUnionArrayElement[] ComplexUnionArray { get; set; }
-
         [JsonProperty("date", Required = Required.Always)]
         public DateTimeOffset Date { get; set; }
 
-        [JsonProperty("date-time", Required = Required.Always)]
-        public DateTimeOffset DateTime { get; set; }
-
         [JsonProperty("time", Required = Required.Always)]
         public DateTimeOffset Time { get; set; }
 
+        [JsonProperty("date-time", Required = Required.Always)]
+        public DateTimeOffset DateTime { get; set; }
+
         [JsonProperty("union-array", Required = Required.Always)]
         public DateTimeOffset[] UnionArray { get; set; }
+
+        [JsonProperty("complex-union-array", Required = Required.Always)]
+        public ComplexUnionArrayElement[] ComplexUnionArray { get; set; }
     }
 
     public enum ComplexUnionArrayEnum { Foo, Bar };
diff --git a/base/schema-csharp/test/inputs/schema/description.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/description.schema/default/QuickType.cs
index b578b8f..7a3788c 100644
--- a/base/schema-csharp/test/inputs/schema/description.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/description.schema/default/QuickType.cs
@@ -30,10 +30,10 @@ namespace QuickType
     public partial class TopLevel
     {
         /// <summary>
-        /// A pretty boolean
+        /// Either a number or a string
         /// </summary>
-        [JsonProperty("bar", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public bool? Bar { get; set; }
+        [JsonProperty("union", Required = Required.Always)]
+        public Union Union { get; set; }
 
         /// <summary>
         /// An enumeration
@@ -44,14 +44,14 @@ namespace QuickType
         [JsonProperty("foo", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public double? Foo { get; set; }
 
-        [JsonProperty("object-or-string", Required = Required.Always)]
-        public ObjectOrStringUnion ObjectOrString { get; set; }
-
         /// <summary>
-        /// Either a number or a string
+        /// A pretty boolean
         /// </summary>
-        [JsonProperty("union", Required = Required.Always)]
-        public Union Union { get; set; }
+        [JsonProperty("bar", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public bool? Bar { get; set; }
+
+        [JsonProperty("object-or-string", Required = Required.Always)]
+        public ObjectOrStringUnion ObjectOrString { get; set; }
     }
 
     public partial class ObjectOrStringClass
diff --git a/base/schema-csharp/test/inputs/schema/direct-union.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/direct-union.schema/default/QuickType.cs
index 1ee8825..bd7373d 100644
--- a/base/schema-csharp/test/inputs/schema/direct-union.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/direct-union.schema/default/QuickType.cs
@@ -31,11 +31,11 @@ namespace QuickType
 
     public partial class Thing
     {
-        [JsonProperty("optional")]
-        public Anything? Optional { get; set; }
-
         [JsonProperty("required", Required = Required.AllowNull)]
         public Anything ThingRequired { get; set; }
+
+        [JsonProperty("optional")]
+        public Anything? Optional { get; set; }
     }
 
     public partial struct Anything
diff --git a/base/schema-csharp/test/inputs/schema/enum.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/enum.schema/default/QuickType.cs
index 0913039..3b4ccc8 100644
--- a/base/schema-csharp/test/inputs/schema/enum.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/enum.schema/default/QuickType.cs
@@ -25,20 +25,20 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("arr", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public Arr[]? Arr { get; set; }
-
-        [JsonProperty("for", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public string? For { get; set; }
+        [JsonProperty("lvc", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public Lvc? Lvc { get; set; }
 
         [JsonProperty("gve", Required = Required.Always)]
         public Gve Gve { get; set; }
 
-        [JsonProperty("lvc", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public Lvc? Lvc { get; set; }
+        [JsonProperty("arr", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public Arr[]? Arr { get; set; }
 
         [JsonProperty("otherArr", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public OtherArr[]? OtherArr { get; set; }
+
+        [JsonProperty("for", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public string? For { get; set; }
     }
 
     public enum OtherArr { Foo, Bar, If };
diff --git a/base/schema-csharp/test/inputs/schema/integer-string.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/integer-string.schema/default/QuickType.cs
index 8675e0e..fbbd6a1 100644
--- a/base/schema-csharp/test/inputs/schema/integer-string.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/integer-string.schema/default/QuickType.cs
@@ -25,18 +25,6 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("arrNullable", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(PurpleDecodeArrayConverter))]
-        public long?[]? ArrNullable { get; set; }
-
-        [JsonProperty("arrOne", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(FluffyDecodeArrayConverter))]
-        public long[]? ArrOne { get; set; }
-
-        [JsonProperty("nullable", Required = Required.AllowNull)]
-        [JsonConverter(typeof(ParseStringConverter))]
-        public long? Nullable { get; set; }
-
         [JsonProperty("one", Required = Required.Always)]
         [JsonConverter(typeof(ParseStringConverter))]
         public long One { get; set; }
@@ -45,6 +33,18 @@ namespace QuickType
         [JsonConverter(typeof(ParseStringConverter))]
         public long? Optional { get; set; }
 
+        [JsonProperty("nullable", Required = Required.AllowNull)]
+        [JsonConverter(typeof(ParseStringConverter))]
+        public long? Nullable { get; set; }
+
+        [JsonProperty("arrOne", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(FluffyDecodeArrayConverter))]
+        public long[]? ArrOne { get; set; }
+
+        [JsonProperty("arrNullable", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(PurpleDecodeArrayConverter))]
+        public long?[]? ArrNullable { get; set; }
+
         [JsonProperty("unionWithInt", Required = Required.Always)]
         [JsonConverter(typeof(DecodingChoiceConverter))]
         public long UnionWithInt { get; set; }
diff --git a/base/schema-csharp/test/inputs/schema/integer-type.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/integer-type.schema/default/QuickType.cs
index 1a28d77..d25cf13 100644
--- a/base/schema-csharp/test/inputs/schema/integer-type.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/integer-type.schema/default/QuickType.cs
@@ -25,32 +25,32 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("above_i32_max", Required = Required.Always)]
-        public long AboveI32Max { get; set; }
+        [JsonProperty("small_positive", Required = Required.Always)]
+        public long SmallPositive { get; set; }
 
-        [JsonProperty("below_i32_min", Required = Required.Always)]
-        public long BelowI32Min { get; set; }
+        [JsonProperty("small_negative", Required = Required.Always)]
+        public long SmallNegative { get; set; }
 
         [JsonProperty("i32_range", Required = Required.Always)]
         public long I32Range { get; set; }
 
-        [JsonProperty("large_bounds", Required = Required.Always)]
-        public long LargeBounds { get; set; }
+        [JsonProperty("above_i32_max", Required = Required.Always)]
+        public long AboveI32Max { get; set; }
 
-        [JsonProperty("only_maximum", Required = Required.Always)]
-        public long OnlyMaximum { get; set; }
+        [JsonProperty("below_i32_min", Required = Required.Always)]
+        public long BelowI32Min { get; set; }
 
         [JsonProperty("only_minimum", Required = Required.Always)]
         public long OnlyMinimum { get; set; }
 
-        [JsonProperty("small_negative", Required = Required.Always)]
-        public long SmallNegative { get; set; }
-
-        [JsonProperty("small_positive", Required = Required.Always)]
-        public long SmallPositive { get; set; }
+        [JsonProperty("only_maximum", Required = Required.Always)]
+        public long OnlyMaximum { get; set; }
 
         [JsonProperty("unbounded", Required = Required.Always)]
         public long Unbounded { get; set; }
+
+        [JsonProperty("large_bounds", Required = Required.Always)]
+        public long LargeBounds { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp/test/inputs/schema/keyword-unions.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/keyword-unions.schema/default/QuickType.cs
index ae377c5..ee8377b 100644
--- a/base/schema-csharp/test/inputs/schema/keyword-unions.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/keyword-unions.schema/default/QuickType.cs
@@ -253,9 +253,6 @@ namespace QuickType
         [JsonProperty("double", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public UnionDouble? Double { get; set; }
 
-        [JsonProperty("dummy", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public double? Dummy { get; set; }
-
         [JsonProperty("dynamic", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public UnionDynamic? Dynamic { get; set; }
 
@@ -412,12 +409,12 @@ namespace QuickType
         [JsonProperty("internal", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public UnionInternal? Internal { get; set; }
 
-        [JsonProperty("is", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public UnionIs? Is { get; set; }
-
         [JsonProperty("iterable", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public UnionIterable? Iterable { get; set; }
 
+        [JsonProperty("is", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public UnionIs? Is { get; set; }
+
         [JsonProperty("jdec", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public UnionJdec? Jdec { get; set; }
 
@@ -855,6 +852,9 @@ namespace QuickType
 
         [JsonProperty("yield", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public UnionYield? Yield { get; set; }
+
+        [JsonProperty("dummy", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public double? Dummy { get; set; }
     }
 
     public partial class Abstract
diff --git a/base/schema-csharp/test/inputs/schema/light.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/light.schema/default/QuickType.cs
index 741ea32..a9538ad 100644
--- a/base/schema-csharp/test/inputs/schema/light.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/light.schema/default/QuickType.cs
@@ -31,12 +31,12 @@ namespace QuickType
 
     public partial class LightParams
     {
-        [JsonProperty("app_id", Required = Required.Always)]
-        public string AppId { get; set; }
-
         [JsonProperty("outlet_id", Required = Required.Always)]
         public string OutletId { get; set; }
 
+        [JsonProperty("app_id", Required = Required.Always)]
+        public string AppId { get; set; }
+
         [JsonProperty("rgba", Required = Required.Always)]
         public string Rgba { get; set; }
     }
diff --git a/base/schema-csharp/test/inputs/schema/min-max-items.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/min-max-items.schema/default/QuickType.cs
index f268227..402e453 100644
--- a/base/schema-csharp/test/inputs/schema/min-max-items.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/min-max-items.schema/default/QuickType.cs
@@ -25,15 +25,15 @@ namespace QuickType
 
     public partial class TopLevel
     {
+        [JsonProperty("minOnly", Required = Required.Always)]
+        public string[] MinOnly { get; set; }
+
         [JsonProperty("maxOnly", Required = Required.Always)]
         public long[] MaxOnly { get; set; }
 
         [JsonProperty("minAndMax", Required = Required.Always)]
         public double[] MinAndMax { get; set; }
 
-        [JsonProperty("minOnly", Required = Required.Always)]
-        public string[] MinOnly { get; set; }
-
         [JsonProperty("plain", Required = Required.Always)]
         public string[] Plain { get; set; }
 
diff --git a/base/schema-csharp/test/inputs/schema/minmax-integer.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/minmax-integer.schema/default/QuickType.cs
index 6d110ab..8ffceb9 100644
--- a/base/schema-csharp/test/inputs/schema/minmax-integer.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/minmax-integer.schema/default/QuickType.cs
@@ -28,26 +28,26 @@ namespace QuickType
         [JsonProperty("free", Required = Required.Always)]
         public long Free { get; set; }
 
-        [JsonProperty("intersection", Required = Required.Always)]
-        public long Intersection { get; set; }
+        [JsonProperty("min", Required = Required.Always)]
+        public long Min { get; set; }
 
         [JsonProperty("max", Required = Required.Always)]
         public long Max { get; set; }
 
-        [JsonProperty("min", Required = Required.Always)]
-        public long Min { get; set; }
-
         [JsonProperty("minmax", Required = Required.Always)]
         public long Minmax { get; set; }
 
-        [JsonProperty("minMaxIntersection", Required = Required.Always)]
-        public long MinMaxIntersection { get; set; }
+        [JsonProperty("union", Required = Required.Always)]
+        public long Union { get; set; }
 
         [JsonProperty("minMaxUnion", Required = Required.Always)]
         public long MinMaxUnion { get; set; }
 
-        [JsonProperty("union", Required = Required.Always)]
-        public long Union { get; set; }
+        [JsonProperty("intersection", Required = Required.Always)]
+        public long Intersection { get; set; }
+
+        [JsonProperty("minMaxIntersection", Required = Required.Always)]
+        public long MinMaxIntersection { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp/test/inputs/schema/minmax.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/minmax.schema/default/QuickType.cs
index 71fa273..fd5c880 100644
--- a/base/schema-csharp/test/inputs/schema/minmax.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/minmax.schema/default/QuickType.cs
@@ -28,32 +28,32 @@ namespace QuickType
         [JsonProperty("free", Required = Required.Always)]
         public double Free { get; set; }
 
-        [JsonProperty("intersection", Required = Required.Always)]
-        [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
-        public double Intersection { get; set; }
+        [JsonProperty("min", Required = Required.Always)]
+        [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
+        public double Min { get; set; }
 
         [JsonProperty("max", Required = Required.Always)]
         [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
         public double Max { get; set; }
 
-        [JsonProperty("min", Required = Required.Always)]
-        [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
-        public double Min { get; set; }
-
         [JsonProperty("minmax", Required = Required.Always)]
         [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
         public double Minmax { get; set; }
 
-        [JsonProperty("minMaxIntersection", Required = Required.Always)]
-        [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
-        public double MinMaxIntersection { get; set; }
+        [JsonProperty("union", Required = Required.Always)]
+        [JsonConverter(typeof(IndigoMinMaxValueCheckConverter))]
+        public double Union { get; set; }
 
         [JsonProperty("minMaxUnion", Required = Required.Always)]
         public double MinMaxUnion { get; set; }
 
-        [JsonProperty("union", Required = Required.Always)]
-        [JsonConverter(typeof(IndigoMinMaxValueCheckConverter))]
-        public double Union { get; set; }
+        [JsonProperty("intersection", Required = Required.Always)]
+        [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
+        public double Intersection { get; set; }
+
+        [JsonProperty("minMaxIntersection", Required = Required.Always)]
+        [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
+        public double MinMaxIntersection { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp/test/inputs/schema/minmaxlength.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
index c99cdcf..88ebebb 100644
--- a/base/schema-csharp/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
@@ -25,35 +25,35 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("intersection", Required = Required.Always)]
-        [JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
-        public string Intersection { get; set; }
-
-        [JsonProperty("inUnion", Required = Required.Always)]
-        public InUnion InUnion { get; set; }
-
-        [JsonProperty("maxlength", Required = Required.Always)]
-        [JsonConverter(typeof(TentacledMinMaxLengthCheckConverter))]
-        public string Maxlength { get; set; }
-
         [JsonProperty("minlength", Required = Required.Always)]
         [JsonConverter(typeof(StickyMinMaxLengthCheckConverter))]
         public string Minlength { get; set; }
 
-        [JsonProperty("minMaxIntersection", Required = Required.Always)]
-        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
-        public string MinMaxIntersection { get; set; }
+        [JsonProperty("maxlength", Required = Required.Always)]
+        [JsonConverter(typeof(TentacledMinMaxLengthCheckConverter))]
+        public string Maxlength { get; set; }
 
         [JsonProperty("minmaxlength", Required = Required.Always)]
         [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
         public string Minmaxlength { get; set; }
 
-        [JsonProperty("minMaxUnion", Required = Required.Always)]
-        public string MinMaxUnion { get; set; }
-
         [JsonProperty("union", Required = Required.Always)]
         [JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))]
         public string Union { get; set; }
+
+        [JsonProperty("inUnion", Required = Required.Always)]
+        public InUnion InUnion { get; set; }
+
+        [JsonProperty("minMaxUnion", Required = Required.Always)]
+        public string MinMaxUnion { get; set; }
+
+        [JsonProperty("intersection", Required = Required.Always)]
+        [JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
+        public string Intersection { get; set; }
+
+        [JsonProperty("minMaxIntersection", Required = Required.Always)]
+        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        public string MinMaxIntersection { get; set; }
     }
 
     public partial struct InUnion
diff --git a/base/schema-csharp/test/inputs/schema/non-standard-ref.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/non-standard-ref.schema/default/QuickType.cs
index e12b930..f941241 100644
--- a/base/schema-csharp/test/inputs/schema/non-standard-ref.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/non-standard-ref.schema/default/QuickType.cs
@@ -25,12 +25,12 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("bar", Required = Required.Always)]
-        public long Bar { get; set; }
-
         [JsonProperty("foo", Required = Required.Always)]
         public long Foo { get; set; }
 
+        [JsonProperty("bar", Required = Required.Always)]
+        public long Bar { get; set; }
+
         [JsonProperty("quux", Required = Required.Always)]
         public bool Quux { get; set; }
     }
diff --git a/base/schema-csharp/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.cs
index 5a1a51c..1c52ab0 100644
--- a/base/schema-csharp/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.cs
@@ -25,11 +25,11 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("b")]
-        public string? B { get; set; }
-
         [JsonProperty("kind", Required = Required.Always)]
         public Kind Kind { get; set; }
+
+        [JsonProperty("b")]
+        public string? B { get; set; }
     }
 
     public enum Kind { One, Two };
diff --git a/base/schema-csharp/test/inputs/schema/optional-any.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/optional-any.schema/default/QuickType.cs
index ea630ef..bd4bc3a 100644
--- a/base/schema-csharp/test/inputs/schema/optional-any.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/optional-any.schema/default/QuickType.cs
@@ -25,11 +25,11 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("bar", Required = Required.Always)]
-        public bool Bar { get; set; }
-
         [JsonProperty("foo")]
         public object? Foo { get; set; }
+
+        [JsonProperty("bar", Required = Required.Always)]
+        public bool Bar { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp/test/inputs/schema/optional-const-ref.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/optional-const-ref.schema/default/QuickType.cs
index 94dff2e..60c2263 100644
--- a/base/schema-csharp/test/inputs/schema/optional-const-ref.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/optional-const-ref.schema/default/QuickType.cs
@@ -28,26 +28,26 @@ namespace QuickType
         [JsonProperty("coordinates", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public Coordinate[]? Coordinates { get; set; }
 
+        [JsonProperty("requiredCoordinates", Required = Required.Always)]
+        public Coordinate[] RequiredCoordinates { get; set; }
+
         [JsonProperty("count", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public long? Count { get; set; }
 
+        [JsonProperty("requiredCount", Required = Required.Always)]
+        public long RequiredCount { get; set; }
+
+        [JsonProperty("weight", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(MinMaxValueCheckConverter))]
+        public double? Weight { get; set; }
+
         [JsonProperty("label", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         [JsonConverter(typeof(MinMaxLengthCheckConverter))]
         public string? Label { get; set; }
 
-        [JsonProperty("requiredCoordinates", Required = Required.Always)]
-        public Coordinate[] RequiredCoordinates { get; set; }
-
-        [JsonProperty("requiredCount", Required = Required.Always)]
-        public long RequiredCount { get; set; }
-
         [JsonProperty("requiredLabel", Required = Required.Always)]
         [JsonConverter(typeof(MinMaxLengthCheckConverter))]
         public string RequiredLabel { get; set; }
-
-        [JsonProperty("weight", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(MinMaxValueCheckConverter))]
-        public double? Weight { get; set; }
     }
 
     public partial class Coordinate
diff --git a/base/schema-csharp/test/inputs/schema/optional-constraints.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/optional-constraints.schema/default/QuickType.cs
index e5a334f..4530372 100644
--- a/base/schema-csharp/test/inputs/schema/optional-constraints.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/optional-constraints.schema/default/QuickType.cs
@@ -25,22 +25,22 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("optDouble", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(MinMaxValueCheckConverter))]
-        public double? OptDouble { get; set; }
+        [JsonProperty("reqZeroMin", Required = Required.Always)]
+        public long ReqZeroMin { get; set; }
 
         [JsonProperty("optInt", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public long? OptInt { get; set; }
 
-        [JsonProperty("optPattern", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public string? OptPattern { get; set; }
+        [JsonProperty("optDouble", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(MinMaxValueCheckConverter))]
+        public double? OptDouble { get; set; }
 
         [JsonProperty("optString", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         [JsonConverter(typeof(MinMaxLengthCheckConverter))]
         public string? OptString { get; set; }
 
-        [JsonProperty("reqZeroMin", Required = Required.Always)]
-        public long ReqZeroMin { get; set; }
+        [JsonProperty("optPattern", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public string? OptPattern { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp/test/inputs/schema/optional-date-time.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/optional-date-time.schema/default/QuickType.cs
index 6699e19..451f919 100644
--- a/base/schema-csharp/test/inputs/schema/optional-date-time.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/optional-date-time.schema/default/QuickType.cs
@@ -25,23 +25,23 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("optional-date", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public DateTimeOffset? OptionalDate { get; set; }
-
-        [JsonProperty("optional-date-time", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public DateTimeOffset? OptionalDateTime { get; set; }
-
-        [JsonProperty("optional-time", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public DateTimeOffset? OptionalTime { get; set; }
-
         [JsonProperty("required-date", Required = Required.Always)]
         public DateTimeOffset RequiredDate { get; set; }
 
+        [JsonProperty("required-time", Required = Required.Always)]
+        public DateTimeOffset RequiredTime { get; set; }
+
         [JsonProperty("required-date-time", Required = Required.Always)]
         public DateTimeOffset RequiredDateTime { get; set; }
 
-        [JsonProperty("required-time", Required = Required.Always)]
-        public DateTimeOffset RequiredTime { get; set; }
+        [JsonProperty("optional-date", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public DateTimeOffset? OptionalDate { get; set; }
+
+        [JsonProperty("optional-time", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public DateTimeOffset? OptionalTime { get; set; }
+
+        [JsonProperty("optional-date-time", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public DateTimeOffset? OptionalDateTime { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp/test/inputs/schema/prefix-items.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/prefix-items.schema/default/QuickType.cs
index cd7511a..9b6c7dd 100644
--- a/base/schema-csharp/test/inputs/schema/prefix-items.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/prefix-items.schema/default/QuickType.cs
@@ -25,11 +25,11 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("open", Required = Required.Always)]
-        public Open[] Open { get; set; }
-
         [JsonProperty("tuple", Required = Required.Always)]
         public Open[] Tuple { get; set; }
+
+        [JsonProperty("open", Required = Required.Always)]
+        public Open[] Open { get; set; }
     }
 
     public partial struct Open
diff --git a/head/schema-csharp/test/inputs/schema/property-order.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/property-order.schema/default/QuickType.cs
new file mode 100644
index 0000000..095eb57
--- /dev/null
+++ b/head/schema-csharp/test/inputs/schema/property-order.schema/default/QuickType.cs
@@ -0,0 +1,88 @@
+// <auto-generated />
+//
+// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
+//
+//    using QuickType;
+//
+//    var topLevel = TopLevel.FromJson(jsonString);
+#nullable enable
+#pragma warning disable CS8618
+#pragma warning disable CS8601
+#pragma warning disable CS8602
+#pragma warning disable CS8603
+#pragma warning disable CS8604
+#pragma warning disable CS8625
+#pragma warning disable CS8765
+
+namespace QuickType
+{
+    using System;
+    using System.Collections.Generic;
+
+    using System.Globalization;
+    using Newtonsoft.Json;
+    using Newtonsoft.Json.Converters;
+
+    public partial class TopLevel
+    {
+        [JsonProperty("zebra", Required = Required.Always)]
+        public string Zebra { get; set; }
+
+        [JsonProperty("mango", Required = Required.Always)]
+        public double Mango { get; set; }
+
+        [JsonProperty("apple", Required = Required.Always)]
+        public bool Apple { get; set; }
+
+        [JsonProperty("delta", Required = Required.Always)]
+        public string Delta { get; set; }
+
+        [JsonProperty("banana", Required = Required.Always)]
+        public long Banana { get; set; }
+
+        [JsonProperty("ordered", Required = Required.Always)]
+        public Ordered Ordered { get; set; }
+    }
+
+    public partial class Ordered
+    {
+        [JsonProperty("mango", Required = Required.Always)]
+        public double Mango { get; set; }
+
+        [JsonProperty("zebra", Required = Required.Always)]
+        public string Zebra { get; set; }
+
+        [JsonProperty("apple", Required = Required.Always)]
+        public bool Apple { get; set; }
+    }
+
+    public partial class TopLevel
+    {
+        public static TopLevel FromJson(string json) => JsonConvert.DeserializeObject<TopLevel>(json, QuickType.Converter.Settings);
+    }
+
+    public static partial class Serialize
+    {
+        public static string ToJson(this TopLevel self) => JsonConvert.SerializeObject(self, QuickType.Converter.Settings);
+    }
+
+    internal static partial class Converter
+    {
+        public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
+        {
+            MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
+            DateParseHandling = DateParseHandling.None,
+            Converters =
+            {
+                new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
+            },
+        };
+    }
+}
+#pragma warning restore CS8618
+#pragma warning restore CS8601
+#pragma warning restore CS8602
+#pragma warning restore CS8603
+#pragma warning restore CS8604
+#pragma warning restore CS8625
+#pragma warning restore CS8765
diff --git a/base/schema-csharp/test/inputs/schema/renaming-bug.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/renaming-bug.schema/default/QuickType.cs
index 5b3b59b..a1c2767 100644
--- a/base/schema-csharp/test/inputs/schema/renaming-bug.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/renaming-bug.schema/default/QuickType.cs
@@ -40,22 +40,22 @@ namespace QuickType
         [JsonProperty("apple", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public bool? Apple { get; set; }
 
-        [JsonProperty("berries", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public Berry[]? Berries { get; set; }
-
         [JsonProperty("orange", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public bool? Orange { get; set; }
+
+        [JsonProperty("berries", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public Berry[]? Berries { get; set; }
     }
 
     public partial class Berry
     {
-        [JsonProperty("color", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public Color? Color { get; set; }
-
         [JsonProperty("name", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         [JsonConverter(typeof(MinMaxLengthCheckConverter))]
         public string? Name { get; set; }
 
+        [JsonProperty("color", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public Color? Color { get; set; }
+
         [JsonProperty("shapes", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public Shape[]? Shapes { get; set; }
     }
@@ -68,11 +68,11 @@ namespace QuickType
 
     public partial class Shape
     {
-        [JsonProperty("geometry", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public Geometry? Geometry { get; set; }
-
         [JsonProperty("history", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public History? History { get; set; }
+
+        [JsonProperty("geometry", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public Geometry? Geometry { get; set; }
     }
 
     public partial class Geometry
@@ -98,14 +98,14 @@ namespace QuickType
 
     public partial class Part
     {
-        [JsonProperty("depth", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public string? Depth { get; set; }
-
         [JsonProperty("length", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public string? Length { get; set; }
 
         [JsonProperty("width", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public string? Width { get; set; }
+
+        [JsonProperty("depth", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public string? Depth { get; set; }
     }
 
     public partial class History
@@ -116,24 +116,24 @@ namespace QuickType
 
     public partial class Vehicle
     {
-        [JsonProperty("brand", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public string? Brand { get; set; }
-
         [JsonProperty("id", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         [JsonConverter(typeof(MinMaxLengthCheckConverter))]
         public string? Id { get; set; }
 
-        [JsonProperty("speed", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public Speed? Speed { get; set; }
-
-        [JsonProperty("subModule", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public bool? SubModule { get; set; }
-
         [JsonProperty("type", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public VehicleType? Type { get; set; }
 
+        [JsonProperty("speed", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public Speed? Speed { get; set; }
+
         [JsonProperty("year", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public string? Year { get; set; }
+
+        [JsonProperty("brand", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public string? Brand { get; set; }
+
+        [JsonProperty("subModule", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public bool? SubModule { get; set; }
     }
 
     public partial class Speed
@@ -144,11 +144,11 @@ namespace QuickType
 
     public partial class Limit
     {
-        [JsonProperty("maximum", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public double? Maximum { get; set; }
-
         [JsonProperty("minimum", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public double? Minimum { get; set; }
+
+        [JsonProperty("maximum", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public double? Maximum { get; set; }
     }
 
     public partial class VehicleType
diff --git a/base/schema-csharp/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.cs
index 76e2bac..ff565f3 100644
--- a/base/schema-csharp/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.cs
@@ -25,20 +25,20 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("next")]
-        public Next? Next { get; set; }
-
         [JsonProperty("value", Required = Required.Always)]
         public string Value { get; set; }
-    }
 
-    public partial class Node
-    {
         [JsonProperty("next")]
         public Next? Next { get; set; }
+    }
 
+    public partial class Node
+    {
         [JsonProperty("value", Required = Required.Always)]
         public string Value { get; set; }
+
+        [JsonProperty("next")]
+        public Next? Next { get; set; }
     }
 
     public partial struct Next
diff --git a/base/schema-csharp/test/inputs/schema/uuid.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/uuid.schema/default/QuickType.cs
index 2a0942b..a888466 100644
--- a/base/schema-csharp/test/inputs/schema/uuid.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/uuid.schema/default/QuickType.cs
@@ -25,20 +25,20 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonProperty("arrNullable", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public Guid?[]? ArrNullable { get; set; }
+        [JsonProperty("one", Required = Required.Always)]
+        public Guid One { get; set; }
 
-        [JsonProperty("arrOne", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public Guid[]? ArrOne { get; set; }
+        [JsonProperty("optional", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public Guid? Optional { get; set; }
 
         [JsonProperty("nullable", Required = Required.AllowNull)]
         public Guid? Nullable { get; set; }
 
-        [JsonProperty("one", Required = Required.Always)]
-        public Guid One { get; set; }
+        [JsonProperty("arrOne", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public Guid[]? ArrOne { get; set; }
 
-        [JsonProperty("optional", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public Guid? Optional { get; set; }
+        [JsonProperty("arrNullable", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public Guid?[]? ArrNullable { get; set; }
 
         [JsonProperty("unionWithEnum", Required = Required.Always)]
         public UnionWithEnumUnion UnionWithEnum { get; set; }
diff --git a/base/schema-csharp/test/inputs/schema/vega-lite.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/vega-lite.schema/default/QuickType.cs
index 14be422..07935fb 100644
--- a/base/schema-csharp/test/inputs/schema/vega-lite.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/vega-lite.schema/default/QuickType.cs
@@ -625,6 +625,15 @@ namespace QuickType
         [JsonProperty("fill", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public string? Fill { get; set; }
 
+        /// <summary>
+        /// The fill opacity (value between [0,1]).
+        ///
+        /// __Default value:__ `1`
+        /// </summary>
+        [JsonProperty("fillOpacity", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
+        public double? FillOpacity { get; set; }
+
         /// <summary>
         /// Whether the mark's color should be used as fill color instead of stroke color.
         ///
@@ -637,15 +646,6 @@ namespace QuickType
         [JsonProperty("filled", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public bool? Filled { get; set; }
 
-        /// <summary>
-        /// The fill opacity (value between [0,1]).
-        ///
-        /// __Default value:__ `1`
-        /// </summary>
-        [JsonProperty("fillOpacity", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
-        public double? FillOpacity { get; set; }
-
         /// <summary>
         /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
         /// </summary>
@@ -1020,12 +1020,6 @@ namespace QuickType
         [JsonProperty("tickRound", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public bool? TickRound { get; set; }
 
-        /// <summary>
-        /// Boolean value that determines whether the axis should include ticks.
-        /// </summary>
-        [JsonProperty("ticks", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public bool? Ticks { get; set; }
-
         /// <summary>
         /// The size in pixels of axis ticks.
         /// </summary>
@@ -1040,6 +1034,12 @@ namespace QuickType
         [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
         public double? TickWidth { get; set; }
 
+        /// <summary>
+        /// Boolean value that determines whether the axis should include ticks.
+        /// </summary>
+        [JsonProperty("ticks", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public bool? Ticks { get; set; }
+
         /// <summary>
         /// Horizontal text alignment of axis titles.
         /// </summary>
@@ -1319,12 +1319,6 @@ namespace QuickType
         [JsonProperty("tickRound", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public bool? TickRound { get; set; }
 
-        /// <summary>
-        /// Boolean value that determines whether the axis should include ticks.
-        /// </summary>
-        [JsonProperty("ticks", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public bool? Ticks { get; set; }
-
         /// <summary>
         /// The size in pixels of axis ticks.
         /// </summary>
@@ -1339,6 +1333,12 @@ namespace QuickType
         [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
         public double? TickWidth { get; set; }
 
+        /// <summary>
+        /// Boolean value that determines whether the axis should include ticks.
+        /// </summary>
+        [JsonProperty("ticks", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public bool? Ticks { get; set; }
+
         /// <summary>
         /// Horizontal text alignment of axis titles.
         /// </summary>
@@ -1507,6 +1507,15 @@ namespace QuickType
         [JsonProperty("fill", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public string? Fill { get; set; }
 
+        /// <summary>
+        /// The fill opacity (value between [0,1]).
+        ///
+        /// __Default value:__ `1`
+        /// </summary>
+        [JsonProperty("fillOpacity", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
+        public double? FillOpacity { get; set; }
+
         /// <summary>
         /// Whether the mark's color should be used as fill color instead of stroke color.
         ///
@@ -1519,15 +1528,6 @@ namespace QuickType
         [JsonProperty("filled", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public bool? Filled { get; set; }
 
-        /// <summary>
-        /// The fill opacity (value between [0,1]).
-        ///
-        /// __Default value:__ `1`
-        /// </summary>
-        [JsonProperty("fillOpacity", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
-        public double? FillOpacity { get; set; }
-
         /// <summary>
         /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
         /// </summary>
@@ -2899,6 +2899,15 @@ namespace QuickType
         [JsonProperty("fill", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public string? Fill { get; set; }
 
+        /// <summary>
+        /// The fill opacity (value between [0,1]).
+        ///
+        /// __Default value:__ `1`
+        /// </summary>
+        [JsonProperty("fillOpacity", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
+        public double? FillOpacity { get; set; }
+
         /// <summary>
         /// Whether the mark's color should be used as fill color instead of stroke color.
         ///
@@ -2911,15 +2920,6 @@ namespace QuickType
         [JsonProperty("filled", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public bool? Filled { get; set; }
 
-        /// <summary>
-        /// The fill opacity (value between [0,1]).
-        ///
-        /// __Default value:__ `1`
-        /// </summary>
-        [JsonProperty("fillOpacity", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
-        public double? FillOpacity { get; set; }
-
         /// <summary>
         /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
         /// </summary>
@@ -3173,6 +3173,15 @@ namespace QuickType
         [JsonProperty("fill", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public string? Fill { get; set; }
 
+        /// <summary>
+        /// The fill opacity (value between [0,1]).
+        ///
+        /// __Default value:__ `1`
+        /// </summary>
+        [JsonProperty("fillOpacity", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
+        public double? FillOpacity { get; set; }
+
         /// <summary>
         /// Whether the mark's color should be used as fill color instead of stroke color.
         ///
@@ -3185,15 +3194,6 @@ namespace QuickType
         [JsonProperty("filled", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public bool? Filled { get; set; }
 
-        /// <summary>
-        /// The fill opacity (value between [0,1]).
-        ///
-        /// __Default value:__ `1`
-        /// </summary>
-        [JsonProperty("fillOpacity", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
-        public double? FillOpacity { get; set; }
-
         /// <summary>
         /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
         /// </summary>
@@ -5556,12 +5556,6 @@ namespace QuickType
         [JsonProperty("tickCount", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public double? TickCount { get; set; }
 
-        /// <summary>
-        /// Boolean value that determines whether the axis should include ticks.
-        /// </summary>
-        [JsonProperty("ticks", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        public bool? Ticks { get; set; }
-
         /// <summary>
         /// The size in pixels of axis ticks.
         /// </summary>
@@ -5569,6 +5563,12 @@ namespace QuickType
         [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
         public double? TickSize { get; set; }
 
+        /// <summary>
+        /// Boolean value that determines whether the axis should include ticks.
+        /// </summary>
+        [JsonProperty("ticks", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public bool? Ticks { get; set; }
+
         /// <summary>
         /// A title for the field. If `null`, the title will be removed.
         ///
@@ -6183,6 +6183,15 @@ namespace QuickType
         [JsonProperty("fill", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public string? Fill { get; set; }
 
+        /// <summary>
+        /// The fill opacity (value between [0,1]).
+        ///
+        /// __Default value:__ `1`
+        /// </summary>
+        [JsonProperty("fillOpacity", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
+        public double? FillOpacity { get; set; }
+
         /// <summary>
         /// Whether the mark's color should be used as fill color instead of stroke color.
         ///
@@ -6195,15 +6204,6 @@ namespace QuickType
         [JsonProperty("filled", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
         public bool? Filled { get; set; }
 
-        /// <summary>
-        /// The fill opacity (value between [0,1]).
-        ///
-        /// __Default value:__ `1`
-        /// </summary>
-        [JsonProperty("fillOpacity", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
-        public double? FillOpacity { get; set; }
-
         /// <summary>
         /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
         /// </summary>
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/accessors.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/accessors.schema/default/QuickType.cs
index 0b64fa3..968afba 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/accessors.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/accessors.schema/default/QuickType.cs
@@ -23,8 +23,8 @@ namespace QuickType
     public partial class TopLevel
     {
         [JsonRequired]
-        [JsonPropertyName("bar")]
-        public string Barre { get; set; }
+        [JsonPropertyName("union")]
+        public Union Unionization { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("enum")]
@@ -35,8 +35,8 @@ namespace QuickType
         public string Fu_uu { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("union")]
-        public Union Unionization { get; set; }
+        [JsonPropertyName("bar")]
+        public string Barre { get; set; }
     }
 
     public enum Enum { Fire, Grass, Blue };
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.cs
index 2283fdb..0b88cd5 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.cs
@@ -30,13 +30,13 @@ namespace QuickType
         [JsonPropertyName("frequency")]
         public Frequency Frequency { get; set; }
 
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("description")]
-        public string? Description { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("type")]
         public TypeEnum Type { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("description")]
+        public string? Description { get; set; }
     }
 
     public enum Frequency { Weekly, Monthly, Annually };
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/bool-string.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/bool-string.schema/default/QuickType.cs
index 99ee1a3..68505ff 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/bool-string.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/bool-string.schema/default/QuickType.cs
@@ -22,30 +22,30 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("arrNullable")]
-        [JsonConverter(typeof(PurpleDecodeArrayConverter))]
-        public bool?[]? ArrNullable { get; set; }
+        [JsonRequired]
+        [JsonPropertyName("one")]
+        [JsonConverter(typeof(ParseStringConverter))]
+        public bool One { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("arrOne")]
-        [JsonConverter(typeof(FluffyDecodeArrayConverter))]
-        public bool[]? ArrOne { get; set; }
+        [JsonPropertyName("optional")]
+        [JsonConverter(typeof(ParseStringConverter))]
+        public bool? Optional { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("nullable")]
         [JsonConverter(typeof(ParseStringConverter))]
         public bool? Nullable { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("one")]
-        [JsonConverter(typeof(ParseStringConverter))]
-        public bool One { get; set; }
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("arrOne")]
+        [JsonConverter(typeof(FluffyDecodeArrayConverter))]
+        public bool[]? ArrOne { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("optional")]
-        [JsonConverter(typeof(ParseStringConverter))]
-        public bool? Optional { get; set; }
+        [JsonPropertyName("arrNullable")]
+        [JsonConverter(typeof(PurpleDecodeArrayConverter))]
+        public bool?[]? ArrNullable { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("unionWithBool")]
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/boolean-subschema.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/boolean-subschema.schema/default/QuickType.cs
index ade5327..6207f47 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/boolean-subschema.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/boolean-subschema.schema/default/QuickType.cs
@@ -22,6 +22,10 @@ namespace QuickType
 
     public partial class TopLevel
     {
+        [JsonRequired]
+        [JsonPropertyName("foo")]
+        public string Foo { get; set; }
+
         [JsonPropertyName("disallowed")]
         public object? Disallowed { get; set; }
 
@@ -29,10 +33,6 @@ namespace QuickType
         [JsonPropertyName("empty")]
         public object[] Empty { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("foo")]
-        public string Foo { get; set; }
-
         [JsonPropertyName("impossible")]
         public object? Impossible { get; set; }
     }
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/comment-injection.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/comment-injection.schema/default/QuickType.cs
index 461d42f..f316817 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/comment-injection.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/comment-injection.schema/default/QuickType.cs
@@ -36,6 +36,24 @@ namespace QuickType
     /// </summary>
     public partial class TopLevel
     {
+        /// <summary>
+        /// Property delimiters:
+        /// */
+        /// /*
+        /// {-
+        /// -}
+        /// """
+        /// &lt;/summary&gt; &amp; &lt;br&gt;
+        /// }
+        /// }
+        /// }
+        /// }
+        /// }
+        /// </summary>
+        [JsonRequired]
+        [JsonPropertyName("value")]
+        public string Value { get; set; }
+
         /// <summary>
         /// Ends with a backslash \
         /// </summary>
@@ -56,24 +74,6 @@ namespace QuickType
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("trailingTripleQuote")]
         public string? TrailingTripleQuote { get; set; }
-
-        /// <summary>
-        /// Property delimiters:
-        /// */
-        /// /*
-        /// {-
-        /// -}
-        /// """
-        /// &lt;/summary&gt; &amp; &lt;br&gt;
-        /// }
-        /// }
-        /// }
-        /// }
-        /// }
-        /// </summary>
-        [JsonRequired]
-        [JsonPropertyName("value")]
-        public string Value { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/const-non-string.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/const-non-string.schema/default/QuickType.cs
index 1783dcb..2dc77dd 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/const-non-string.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/const-non-string.schema/default/QuickType.cs
@@ -22,10 +22,18 @@ namespace QuickType
 
     public partial class TopLevel
     {
+        [JsonRequired]
+        [JsonPropertyName("version")]
+        public double Version { get; set; }
+
         [JsonRequired]
         [JsonPropertyName("amount")]
         public long Amount { get; set; }
 
+        [JsonRequired]
+        [JsonPropertyName("ratio")]
+        public double Ratio { get; set; }
+
         [JsonRequired]
         [JsonPropertyName("enabled")]
         public bool Enabled { get; set; }
@@ -33,14 +41,6 @@ namespace QuickType
         [JsonRequired]
         [JsonPropertyName("kind")]
         public Kind Kind { get; set; }
-
-        [JsonRequired]
-        [JsonPropertyName("ratio")]
-        public double Ratio { get; set; }
-
-        [JsonRequired]
-        [JsonPropertyName("version")]
-        public double Version { get; set; }
     }
 
     public enum Kind { Widget };
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/date-time-or-string.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/date-time-or-string.schema/default/QuickType.cs
index 055173b..51863d7 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/date-time-or-string.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/date-time-or-string.schema/default/QuickType.cs
@@ -22,13 +22,13 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonRequired]
-        [JsonPropertyName("bar")]
-        public BarUnion Bar { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("foo")]
         public string Foo { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("bar")]
+        public BarUnion Bar { get; set; }
     }
 
     public enum BarEnum { Quux };
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/date-time.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/date-time.schema/default/QuickType.cs
index 53eb090..03c6b67 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/date-time.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/date-time.schema/default/QuickType.cs
@@ -22,25 +22,25 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonRequired]
-        [JsonPropertyName("complex-union-array")]
-        public ComplexUnionArrayElement[] ComplexUnionArray { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("date")]
         public DateTimeOffset Date { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("date-time")]
-        public DateTimeOffset DateTime { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("time")]
         public DateTimeOffset Time { get; set; }
 
+        [JsonRequired]
+        [JsonPropertyName("date-time")]
+        public DateTimeOffset DateTime { get; set; }
+
         [JsonRequired]
         [JsonPropertyName("union-array")]
         public DateTimeOffset[] UnionArray { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("complex-union-array")]
+        public ComplexUnionArrayElement[] ComplexUnionArray { get; set; }
     }
 
     public enum ComplexUnionArrayEnum { Foo, Bar };
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/description.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/description.schema/default/QuickType.cs
index 556eabe..541e02c 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/description.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/description.schema/default/QuickType.cs
@@ -27,11 +27,11 @@ namespace QuickType
     public partial class TopLevel
     {
         /// <summary>
-        /// A pretty boolean
+        /// Either a number or a string
         /// </summary>
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("bar")]
-        public bool? Bar { get; set; }
+        [JsonRequired]
+        [JsonPropertyName("union")]
+        public Union Union { get; set; }
 
         /// <summary>
         /// An enumeration
@@ -44,16 +44,16 @@ namespace QuickType
         [JsonPropertyName("foo")]
         public double? Foo { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("object-or-string")]
-        public ObjectOrStringUnion ObjectOrString { get; set; }
-
         /// <summary>
-        /// Either a number or a string
+        /// A pretty boolean
         /// </summary>
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("bar")]
+        public bool? Bar { get; set; }
+
         [JsonRequired]
-        [JsonPropertyName("union")]
-        public Union Union { get; set; }
+        [JsonPropertyName("object-or-string")]
+        public ObjectOrStringUnion ObjectOrString { get; set; }
     }
 
     public partial class ObjectOrStringClass
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/direct-union.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/direct-union.schema/default/QuickType.cs
index bbeaff7..26b83fe 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/direct-union.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/direct-union.schema/default/QuickType.cs
@@ -29,12 +29,12 @@ namespace QuickType
 
     public partial class Thing
     {
-        [JsonPropertyName("optional")]
-        public Anything? Optional { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("required")]
         public Anything ThingRequired { get; set; }
+
+        [JsonPropertyName("optional")]
+        public Anything? Optional { get; set; }
     }
 
     public partial struct Anything
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/enum.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/enum.schema/default/QuickType.cs
index 83d78c0..a234834 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/enum.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/enum.schema/default/QuickType.cs
@@ -23,24 +23,24 @@ namespace QuickType
     public partial class TopLevel
     {
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("arr")]
-        public Arr[]? Arr { get; set; }
-
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("for")]
-        public string? For { get; set; }
+        [JsonPropertyName("lvc")]
+        public Lvc? Lvc { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("gve")]
         public Gve Gve { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("lvc")]
-        public Lvc? Lvc { get; set; }
+        [JsonPropertyName("arr")]
+        public Arr[]? Arr { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("otherArr")]
         public OtherArr[]? OtherArr { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("for")]
+        public string? For { get; set; }
     }
 
     public enum OtherArr { Foo, Bar, If };
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/integer-string.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/integer-string.schema/default/QuickType.cs
index a98a5a5..fd6d832 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/integer-string.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/integer-string.schema/default/QuickType.cs
@@ -22,30 +22,30 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("arrNullable")]
-        [JsonConverter(typeof(PurpleDecodeArrayConverter))]
-        public long?[]? ArrNullable { get; set; }
+        [JsonRequired]
+        [JsonPropertyName("one")]
+        [JsonConverter(typeof(ParseStringConverter))]
+        public long One { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("arrOne")]
-        [JsonConverter(typeof(FluffyDecodeArrayConverter))]
-        public long[]? ArrOne { get; set; }
+        [JsonPropertyName("optional")]
+        [JsonConverter(typeof(ParseStringConverter))]
+        public long? Optional { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("nullable")]
         [JsonConverter(typeof(ParseStringConverter))]
         public long? Nullable { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("one")]
-        [JsonConverter(typeof(ParseStringConverter))]
-        public long One { get; set; }
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("arrOne")]
+        [JsonConverter(typeof(FluffyDecodeArrayConverter))]
+        public long[]? ArrOne { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("optional")]
-        [JsonConverter(typeof(ParseStringConverter))]
-        public long? Optional { get; set; }
+        [JsonPropertyName("arrNullable")]
+        [JsonConverter(typeof(PurpleDecodeArrayConverter))]
+        public long?[]? ArrNullable { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("unionWithInt")]
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/integer-type.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/integer-type.schema/default/QuickType.cs
index 2142569..d656a69 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/integer-type.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/integer-type.schema/default/QuickType.cs
@@ -23,40 +23,40 @@ namespace QuickType
     public partial class TopLevel
     {
         [JsonRequired]
-        [JsonPropertyName("above_i32_max")]
-        public long AboveI32Max { get; set; }
+        [JsonPropertyName("small_positive")]
+        public long SmallPositive { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("below_i32_min")]
-        public long BelowI32Min { get; set; }
+        [JsonPropertyName("small_negative")]
+        public long SmallNegative { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("i32_range")]
         public long I32Range { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("large_bounds")]
-        public long LargeBounds { get; set; }
+        [JsonPropertyName("above_i32_max")]
+        public long AboveI32Max { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("only_maximum")]
-        public long OnlyMaximum { get; set; }
+        [JsonPropertyName("below_i32_min")]
+        public long BelowI32Min { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("only_minimum")]
         public long OnlyMinimum { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("small_negative")]
-        public long SmallNegative { get; set; }
-
-        [JsonRequired]
-        [JsonPropertyName("small_positive")]
-        public long SmallPositive { get; set; }
+        [JsonPropertyName("only_maximum")]
+        public long OnlyMaximum { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("unbounded")]
         public long Unbounded { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("large_bounds")]
+        public long LargeBounds { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/light.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/light.schema/default/QuickType.cs
index 7fc9a33..11613d7 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/light.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/light.schema/default/QuickType.cs
@@ -29,14 +29,14 @@ namespace QuickType
 
     public partial class LightParams
     {
-        [JsonRequired]
-        [JsonPropertyName("app_id")]
-        public string AppId { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("outlet_id")]
         public string OutletId { get; set; }
 
+        [JsonRequired]
+        [JsonPropertyName("app_id")]
+        public string AppId { get; set; }
+
         [JsonRequired]
         [JsonPropertyName("rgba")]
         public string Rgba { get; set; }
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/min-max-items.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/min-max-items.schema/default/QuickType.cs
index a0f1dd8..ab96c41 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/min-max-items.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/min-max-items.schema/default/QuickType.cs
@@ -22,6 +22,10 @@ namespace QuickType
 
     public partial class TopLevel
     {
+        [JsonRequired]
+        [JsonPropertyName("minOnly")]
+        public string[] MinOnly { get; set; }
+
         [JsonRequired]
         [JsonPropertyName("maxOnly")]
         public long[] MaxOnly { get; set; }
@@ -30,10 +34,6 @@ namespace QuickType
         [JsonPropertyName("minAndMax")]
         public double[] MinAndMax { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("minOnly")]
-        public string[] MinOnly { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("plain")]
         public string[] Plain { get; set; }
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/minmax-integer.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/minmax-integer.schema/default/QuickType.cs
index 78a29e0..68defd7 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/minmax-integer.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/minmax-integer.schema/default/QuickType.cs
@@ -27,32 +27,32 @@ namespace QuickType
         public long Free { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("intersection")]
-        public long Intersection { get; set; }
+        [JsonPropertyName("min")]
+        public long Min { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("max")]
         public long Max { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("min")]
-        public long Min { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("minmax")]
         public long Minmax { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("minMaxIntersection")]
-        public long MinMaxIntersection { get; set; }
+        [JsonPropertyName("union")]
+        public long Union { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("minMaxUnion")]
         public long MinMaxUnion { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("union")]
-        public long Union { get; set; }
+        [JsonPropertyName("intersection")]
+        public long Intersection { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("minMaxIntersection")]
+        public long MinMaxIntersection { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/minmax.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/minmax.schema/default/QuickType.cs
index afd660e..5413432 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/minmax.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/minmax.schema/default/QuickType.cs
@@ -27,38 +27,38 @@ namespace QuickType
         public double Free { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("intersection")]
-        [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
-        public double Intersection { get; set; }
+        [JsonPropertyName("min")]
+        [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
+        public double Min { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("max")]
         [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
         public double Max { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("min")]
-        [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
-        public double Min { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("minmax")]
         [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
         public double Minmax { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("minMaxIntersection")]
-        [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
-        public double MinMaxIntersection { get; set; }
+        [JsonPropertyName("union")]
+        [JsonConverter(typeof(IndigoMinMaxValueCheckConverter))]
+        public double Union { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("minMaxUnion")]
         public double MinMaxUnion { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("union")]
-        [JsonConverter(typeof(IndigoMinMaxValueCheckConverter))]
-        public double Union { get; set; }
+        [JsonPropertyName("intersection")]
+        [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
+        public double Intersection { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("minMaxIntersection")]
+        [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
+        public double MinMaxIntersection { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/minmaxlength.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
index c5b52c2..a913c4a 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
@@ -23,13 +23,9 @@ namespace QuickType
     public partial class TopLevel
     {
         [JsonRequired]
-        [JsonPropertyName("intersection")]
-        [JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
-        public string Intersection { get; set; }
-
-        [JsonRequired]
-        [JsonPropertyName("inUnion")]
-        public InUnion InUnion { get; set; }
+        [JsonPropertyName("minlength")]
+        [JsonConverter(typeof(StickyMinMaxLengthCheckConverter))]
+        public string Minlength { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("maxlength")]
@@ -37,28 +33,32 @@ namespace QuickType
         public string Maxlength { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("minlength")]
-        [JsonConverter(typeof(StickyMinMaxLengthCheckConverter))]
-        public string Minlength { get; set; }
+        [JsonPropertyName("minmaxlength")]
+        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        public string Minmaxlength { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("minMaxIntersection")]
-        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
-        public string MinMaxIntersection { get; set; }
+        [JsonPropertyName("union")]
+        [JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))]
+        public string Union { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("minmaxlength")]
-        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
-        public string Minmaxlength { get; set; }
+        [JsonPropertyName("inUnion")]
+        public InUnion InUnion { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("minMaxUnion")]
         public string MinMaxUnion { get; set; }
 
         [JsonRequired]
-        [JsonPropertyName("union")]
-        [JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))]
-        public string Union { get; set; }
+        [JsonPropertyName("intersection")]
+        [JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
+        public string Intersection { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("minMaxIntersection")]
+        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        public string MinMaxIntersection { get; set; }
     }
 
     public partial struct InUnion
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/non-standard-ref.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/non-standard-ref.schema/default/QuickType.cs
index cb446d8..099055d 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/non-standard-ref.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/non-standard-ref.schema/default/QuickType.cs
@@ -22,14 +22,14 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonRequired]
-        [JsonPropertyName("bar")]
-        public long Bar { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("foo")]
         public long Foo { get; set; }
 
+        [JsonRequired]
+        [JsonPropertyName("bar")]
+        public long Bar { get; set; }
+
         [JsonRequired]
         [JsonPropertyName("quux")]
         public bool Quux { get; set; }
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.cs
index 790d6c3..375f5c0 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.cs
@@ -22,12 +22,12 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonPropertyName("b")]
-        public string? B { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("kind")]
         public Kind Kind { get; set; }
+
+        [JsonPropertyName("b")]
+        public string? B { get; set; }
     }
 
     public enum Kind { One, Two };
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/optional-any.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/optional-any.schema/default/QuickType.cs
index 5213207..985c64d 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/optional-any.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/optional-any.schema/default/QuickType.cs
@@ -22,12 +22,12 @@ namespace QuickType
 
     public partial class TopLevel
     {
+        [JsonPropertyName("foo")]
+        public object? Foo { get; set; }
+
         [JsonRequired]
         [JsonPropertyName("bar")]
         public bool Bar { get; set; }
-
-        [JsonPropertyName("foo")]
-        public object? Foo { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/optional-const-ref.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/optional-const-ref.schema/default/QuickType.cs
index 1f02722..b80404b 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/optional-const-ref.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/optional-const-ref.schema/default/QuickType.cs
@@ -26,32 +26,32 @@ namespace QuickType
         [JsonPropertyName("coordinates")]
         public Coordinate[]? Coordinates { get; set; }
 
+        [JsonRequired]
+        [JsonPropertyName("requiredCoordinates")]
+        public Coordinate[] RequiredCoordinates { get; set; }
+
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("count")]
         public long? Count { get; set; }
 
+        [JsonRequired]
+        [JsonPropertyName("requiredCount")]
+        public long RequiredCount { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("weight")]
+        [JsonConverter(typeof(MinMaxValueCheckConverter))]
+        public double? Weight { get; set; }
+
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("label")]
         [JsonConverter(typeof(MinMaxLengthCheckConverter))]
         public string? Label { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("requiredCoordinates")]
-        public Coordinate[] RequiredCoordinates { get; set; }
-
-        [JsonRequired]
-        [JsonPropertyName("requiredCount")]
-        public long RequiredCount { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("requiredLabel")]
         [JsonConverter(typeof(MinMaxLengthCheckConverter))]
         public string RequiredLabel { get; set; }
-
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("weight")]
-        [JsonConverter(typeof(MinMaxValueCheckConverter))]
-        public double? Weight { get; set; }
     }
 
     public partial class Coordinate
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/optional-constraints.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/optional-constraints.schema/default/QuickType.cs
index 1d6cd3c..0ff070d 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/optional-constraints.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/optional-constraints.schema/default/QuickType.cs
@@ -22,27 +22,27 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("optDouble")]
-        [JsonConverter(typeof(MinMaxValueCheckConverter))]
-        public double? OptDouble { get; set; }
+        [JsonRequired]
+        [JsonPropertyName("reqZeroMin")]
+        public long ReqZeroMin { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("optInt")]
         public long? OptInt { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("optPattern")]
-        public string? OptPattern { get; set; }
+        [JsonPropertyName("optDouble")]
+        [JsonConverter(typeof(MinMaxValueCheckConverter))]
+        public double? OptDouble { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("optString")]
         [JsonConverter(typeof(MinMaxLengthCheckConverter))]
         public string? OptString { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("reqZeroMin")]
-        public long ReqZeroMin { get; set; }
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("optPattern")]
+        public string? OptPattern { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/optional-date-time.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/optional-date-time.schema/default/QuickType.cs
index 312c111..4ee3ab1 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/optional-date-time.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/optional-date-time.schema/default/QuickType.cs
@@ -22,29 +22,29 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("optional-date")]
-        public DateTimeOffset? OptionalDate { get; set; }
-
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("optional-date-time")]
-        public DateTimeOffset? OptionalDateTime { get; set; }
-
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("optional-time")]
-        public DateTimeOffset? OptionalTime { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("required-date")]
         public DateTimeOffset RequiredDate { get; set; }
 
+        [JsonRequired]
+        [JsonPropertyName("required-time")]
+        public DateTimeOffset RequiredTime { get; set; }
+
         [JsonRequired]
         [JsonPropertyName("required-date-time")]
         public DateTimeOffset RequiredDateTime { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("required-time")]
-        public DateTimeOffset RequiredTime { get; set; }
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("optional-date")]
+        public DateTimeOffset? OptionalDate { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("optional-time")]
+        public DateTimeOffset? OptionalTime { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("optional-date-time")]
+        public DateTimeOffset? OptionalDateTime { get; set; }
     }
 
     public partial class TopLevel
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/prefix-items.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/prefix-items.schema/default/QuickType.cs
index bb421d2..854545a 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/prefix-items.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/prefix-items.schema/default/QuickType.cs
@@ -22,13 +22,13 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonRequired]
-        [JsonPropertyName("open")]
-        public Open[] Open { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("tuple")]
         public Open[] Tuple { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("open")]
+        public Open[] Open { get; set; }
     }
 
     public partial struct Open
diff --git a/head/schema-csharp-SystemTextJson/test/inputs/schema/property-order.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/property-order.schema/default/QuickType.cs
new file mode 100644
index 0000000..18208ca
--- /dev/null
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/property-order.schema/default/QuickType.cs
@@ -0,0 +1,201 @@
+// <auto-generated />
+//
+// To parse this JSON data, add NuGet 'System.Text.Json' then do:
+//
+//    using QuickType;
+//
+//    var topLevel = TopLevel.FromJson(jsonString);
+#nullable enable
+#pragma warning disable CS8618
+#pragma warning disable CS8601
+#pragma warning disable CS8602
+#pragma warning disable CS8603
+
+namespace QuickType
+{
+    using System;
+    using System.Collections.Generic;
+
+    using System.Text.Json;
+    using System.Text.Json.Serialization;
+    using System.Globalization;
+
+    public partial class TopLevel
+    {
+        [JsonRequired]
+        [JsonPropertyName("zebra")]
+        public string Zebra { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("mango")]
+        public double Mango { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("apple")]
+        public bool Apple { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("delta")]
+        public string Delta { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("banana")]
+        public long Banana { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("ordered")]
+        public Ordered Ordered { get; set; }
+    }
+
+    public partial class Ordered
+    {
+        [JsonRequired]
+        [JsonPropertyName("mango")]
+        public double Mango { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("zebra")]
+        public string Zebra { get; set; }
+
+        [JsonRequired]
+        [JsonPropertyName("apple")]
+        public bool Apple { get; set; }
+    }
+
+    public partial class TopLevel
+    {
+        public static TopLevel FromJson(string json) => JsonSerializer.Deserialize<TopLevel>(json, QuickType.Converter.Settings);
+    }
+
+    public static partial class Serialize
+    {
+        public static string ToJson(this TopLevel self) => JsonSerializer.Serialize(self, QuickType.Converter.Settings);
+    }
+
+    internal static partial class Converter
+    {
+        public static readonly JsonSerializerOptions Settings = new(JsonSerializerDefaults.General)
+        {
+            Converters =
+            {
+                new DateOnlyConverter(),
+                new TimeOnlyConverter(),
+                IsoDateTimeOffsetConverter.Singleton
+            },
+        };
+    }
+    
+    public class DateOnlyConverter : JsonConverter<DateOnly>
+    {
+        private readonly string serializationFormat;
+        public DateOnlyConverter() : this(null) { }
+
+        public DateOnlyConverter(string? serializationFormat)
+        {
+                this.serializationFormat = serializationFormat ?? "yyyy-MM-dd";
+        }
+
+        public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+        {
+                var value = reader.GetString();
+                return DateOnly.Parse(value!);
+        }
+
+        public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options)
+                => writer.WriteStringValue(value.ToString(serializationFormat));
+    }
+
+    public class TimeOnlyConverter : JsonConverter<TimeOnly>
+    {
+        private readonly string serializationFormat;
+
+        public TimeOnlyConverter() : this(null) { }
+
+        public TimeOnlyConverter(string? serializationFormat)
+        {
+                this.serializationFormat = serializationFormat ?? "HH:mm:ss.fff";
+        }
+
+        public override TimeOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+        {
+                var value = reader.GetString();
+                return TimeOnly.Parse(value!);
+        }
+
+        public override void Write(Utf8JsonWriter writer, TimeOnly value, JsonSerializerOptions options)
+                => writer.WriteStringValue(value.ToString(serializationFormat));
+    }
+
+    internal class IsoDateTimeOffsetConverter : JsonConverter<DateTimeOffset>
+    {
+        public override bool CanConvert(Type t) => t == typeof(DateTimeOffset);
+
+        private const string DefaultDateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK";
+
+        private DateTimeStyles _dateTimeStyles = DateTimeStyles.RoundtripKind;
+        private string? _dateTimeFormat;
+        private CultureInfo? _culture;
+
+        public DateTimeStyles DateTimeStyles
+        {
+                get => _dateTimeStyles;
+                set => _dateTimeStyles = value;
+        }
+
+        public string? DateTimeFormat
+        {
+                get => _dateTimeFormat ?? string.Empty;
+                set => _dateTimeFormat = (string.IsNullOrEmpty(value)) ? null : value;
+        }
+
+        public CultureInfo Culture
+        {
+                get => _culture ?? CultureInfo.CurrentCulture;
+                set => _culture = value;
+        }
+
+        public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options)
+        {
+                string text;
+
+
+                if ((_dateTimeStyles & DateTimeStyles.AdjustToUniversal) == DateTimeStyles.AdjustToUniversal
+                        || (_dateTimeStyles & DateTimeStyles.AssumeUniversal) == DateTimeStyles.AssumeUniversal)
+                {
+                        value = value.ToUniversalTime();
+                }
+
+                text = value.ToString(_dateTimeFormat ?? DefaultDateTimeFormat, Culture);
+
+                writer.WriteStringValue(text);
+        }
+
+        public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+        {
+                string? dateText = reader.GetString();
+
+                if (string.IsNullOrEmpty(dateText) == false)
+                {
+                        if (!string.IsNullOrEmpty(_dateTimeFormat))
+                        {
+                                return DateTimeOffset.ParseExact(dateText, _dateTimeFormat, Culture, _dateTimeStyles);
+                        }
+                        else
+                        {
+                                return DateTimeOffset.Parse(dateText, Culture, _dateTimeStyles);
+                        }
+                }
+                else
+                {
+                        return default(DateTimeOffset);
+                }
+        }
+
+
+        public static readonly IsoDateTimeOffsetConverter Singleton = new IsoDateTimeOffsetConverter();
+    }
+}
+#pragma warning restore CS8618
+#pragma warning restore CS8601
+#pragma warning restore CS8602
+#pragma warning restore CS8603
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/renaming-bug.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/renaming-bug.schema/default/QuickType.cs
index 23b7027..d2398ce 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/renaming-bug.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/renaming-bug.schema/default/QuickType.cs
@@ -41,26 +41,26 @@ namespace QuickType
         [JsonPropertyName("apple")]
         public bool? Apple { get; set; }
 
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("berries")]
-        public Berry[]? Berries { get; set; }
-
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("orange")]
         public bool? Orange { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("berries")]
+        public Berry[]? Berries { get; set; }
     }
 
     public partial class Berry
     {
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("color")]
-        public Color? Color { get; set; }
-
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("name")]
         [JsonConverter(typeof(MinMaxLengthCheckConverter))]
         public string? Name { get; set; }
 
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("color")]
+        public Color? Color { get; set; }
+
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("shapes")]
         public Shape[]? Shapes { get; set; }
@@ -75,13 +75,13 @@ namespace QuickType
 
     public partial class Shape
     {
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("geometry")]
-        public Geometry? Geometry { get; set; }
-
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("history")]
         public History? History { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("geometry")]
+        public Geometry? Geometry { get; set; }
     }
 
     public partial class Geometry
@@ -111,10 +111,6 @@ namespace QuickType
 
     public partial class Part
     {
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("depth")]
-        public string? Depth { get; set; }
-
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("length")]
         public string? Length { get; set; }
@@ -122,6 +118,10 @@ namespace QuickType
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("width")]
         public string? Width { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("depth")]
+        public string? Depth { get; set; }
     }
 
     public partial class History
@@ -133,30 +133,30 @@ namespace QuickType
 
     public partial class Vehicle
     {
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("brand")]
-        public string? Brand { get; set; }
-
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("id")]
         [JsonConverter(typeof(MinMaxLengthCheckConverter))]
         public string? Id { get; set; }
 
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("type")]
+        public VehicleType? Type { get; set; }
+
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("speed")]
         public Speed? Speed { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("subModule")]
-        public bool? SubModule { get; set; }
+        [JsonPropertyName("year")]
+        public string? Year { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("type")]
-        public VehicleType? Type { get; set; }
+        [JsonPropertyName("brand")]
+        public string? Brand { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("year")]
-        public string? Year { get; set; }
+        [JsonPropertyName("subModule")]
+        public bool? SubModule { get; set; }
     }
 
     public partial class Speed
@@ -168,13 +168,13 @@ namespace QuickType
 
     public partial class Limit
     {
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("maximum")]
-        public double? Maximum { get; set; }
-
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
         [JsonPropertyName("minimum")]
         public double? Minimum { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("maximum")]
+        public double? Maximum { get; set; }
     }
 
     public partial class VehicleType
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.cs
index 1aaef3f..c7930d1 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.cs
@@ -22,22 +22,22 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonPropertyName("next")]
-        public Next? Next { get; set; }
-
         [JsonRequired]
         [JsonPropertyName("value")]
         public string Value { get; set; }
-    }
 
-    public partial class Node
-    {
         [JsonPropertyName("next")]
         public Next? Next { get; set; }
+    }
 
+    public partial class Node
+    {
         [JsonRequired]
         [JsonPropertyName("value")]
         public string Value { get; set; }
+
+        [JsonPropertyName("next")]
+        public Next? Next { get; set; }
     }
 
     public partial struct Next
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/uuid.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/uuid.schema/default/QuickType.cs
index ddbdb35..3a1ddc0 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/uuid.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/uuid.schema/default/QuickType.cs
@@ -22,25 +22,25 @@ namespace QuickType
 
     public partial class TopLevel
     {
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("arrNullable")]
-        public Guid?[]? ArrNullable { get; set; }
+        [JsonRequired]
+        [JsonPropertyName("one")]
+        public Guid One { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("arrOne")]
-        public Guid[]? ArrOne { get; set; }
+        [JsonPropertyName("optional")]
+        public Guid? Optional { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("nullable")]
         public Guid? Nullable { get; set; }
 
-        [JsonRequired]
-        [JsonPropertyName("one")]
-        public Guid One { get; set; }
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("arrOne")]
+        public Guid[]? ArrOne { get; set; }
 
         [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("optional")]
-        public Guid? Optional { get; set; }
+        [JsonPropertyName("arrNullable")]
+        public Guid?[]? ArrNullable { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("unionWithEnum")]
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/vega-lite.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/vega-lite.schema/default/QuickType.cs
index 2179c69..aafcd4d 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/vega-lite.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/vega-lite.schema/default/QuickType.cs
@@ -693,6 +693,16 @@ namespace QuickType
         [JsonPropertyName("fill")]
         public string? Fill { get; set; }
 
+        /// <summary>
+        /// The fill opacity (value between [0,1]).
+        ///
+        /// __Default value:__ `1`
+        /// </summary>
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("fillOpacity")]
+        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
+        public double? FillOpacity { get; set; }
+
         /// <summary>
         /// Whether the mark's color should be used as fill color instead of stroke color.
         ///
@@ -706,16 +716,6 @@ namespace QuickType
         [JsonPropertyName("filled")]
         public bool? Filled { get; set; }
 
-        /// <summary>
-        /// The fill opacity (value between [0,1]).
-        ///
-        /// __Default value:__ `1`
-        /// </summary>
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("fillOpacity")]
-        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
-        public double? FillOpacity { get; set; }
-
         /// <summary>
         /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
         /// </summary>
@@ -1134,13 +1134,6 @@ namespace QuickType
         [JsonPropertyName("tickRound")]
         public bool? TickRound { get; set; }
 
-        /// <summary>
-        /// Boolean value that determines whether the axis should include ticks.
-        /// </summary>
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("ticks")]
-        public bool? Ticks { get; set; }
-
         /// <summary>
         /// The size in pixels of axis ticks.
         /// </summary>
@@ -1157,6 +1150,13 @@ namespace QuickType
         [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
         public double? TickWidth { get; set; }
 
+        /// <summary>
+        /// Boolean value that determines whether the axis should include ticks.
+        /// </summary>
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("ticks")]
+        public bool? Ticks { get; set; }
+
         /// <summary>
         /// Horizontal text alignment of axis titles.
         /// </summary>
@@ -1471,13 +1471,6 @@ namespace QuickType
         [JsonPropertyName("tickRound")]
         public bool? TickRound { get; set; }
 
-        /// <summary>
-        /// Boolean value that determines whether the axis should include ticks.
-        /// </summary>
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("ticks")]
-        public bool? Ticks { get; set; }
-
         /// <summary>
         /// The size in pixels of axis ticks.
         /// </summary>
@@ -1494,6 +1487,13 @@ namespace QuickType
         [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
         public double? TickWidth { get; set; }
 
+        /// <summary>
+        /// Boolean value that determines whether the axis should include ticks.
+        /// </summary>
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("ticks")]
+        public bool? Ticks { get; set; }
+
         /// <summary>
         /// Horizontal text alignment of axis titles.
         /// </summary>
@@ -1685,6 +1685,16 @@ namespace QuickType
         [JsonPropertyName("fill")]
         public string? Fill { get; set; }
 
+        /// <summary>
+        /// The fill opacity (value between [0,1]).
+        ///
+        /// __Default value:__ `1`
+        /// </summary>
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("fillOpacity")]
+        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
+        public double? FillOpacity { get; set; }
+
         /// <summary>
         /// Whether the mark's color should be used as fill color instead of stroke color.
         ///
@@ -1698,16 +1708,6 @@ namespace QuickType
         [JsonPropertyName("filled")]
         public bool? Filled { get; set; }
 
-        /// <summary>
-        /// The fill opacity (value between [0,1]).
-        ///
-        /// __Default value:__ `1`
-        /// </summary>
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("fillOpacity")]
-        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
-        public double? FillOpacity { get; set; }
-
         /// <summary>
         /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
         /// </summary>
@@ -3248,6 +3248,16 @@ namespace QuickType
         [JsonPropertyName("fill")]
         public string? Fill { get; set; }
 
+        /// <summary>
+        /// The fill opacity (value between [0,1]).
+        ///
+        /// __Default value:__ `1`
+        /// </summary>
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("fillOpacity")]
+        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
+        public double? FillOpacity { get; set; }
+
         /// <summary>
         /// Whether the mark's color should be used as fill color instead of stroke color.
         ///
@@ -3261,16 +3271,6 @@ namespace QuickType
         [JsonPropertyName("filled")]
         public bool? Filled { get; set; }
 
-        /// <summary>
-        /// The fill opacity (value between [0,1]).
-        ///
-        /// __Default value:__ `1`
-        /// </summary>
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("fillOpacity")]
-        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
-        public double? FillOpacity { get; set; }
-
         /// <summary>
         /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
         /// </summary>
@@ -3554,6 +3554,16 @@ namespace QuickType
         [JsonPropertyName("fill")]
         public string? Fill { get; set; }
 
+        /// <summary>
+        /// The fill opacity (value between [0,1]).
+        ///
+        /// __Default value:__ `1`
+        /// </summary>
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("fillOpacity")]
+        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
+        public double? FillOpacity { get; set; }
+
         /// <summary>
         /// Whether the mark's color should be used as fill color instead of stroke color.
         ///
@@ -3567,16 +3577,6 @@ namespace QuickType
         [JsonPropertyName("filled")]
         public bool? Filled { get; set; }
 
-        /// <summary>
-        /// The fill opacity (value between [0,1]).
-        ///
-        /// __Default value:__ `1`
-        /// </summary>
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("fillOpacity")]
-        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
-        public double? FillOpacity { get; set; }
-
         /// <summary>
         /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
         /// </summary>
@@ -6161,13 +6161,6 @@ namespace QuickType
         [JsonPropertyName("tickCount")]
         public double? TickCount { get; set; }
 
-        /// <summary>
-        /// Boolean value that determines whether the axis should include ticks.
-        /// </summary>
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("ticks")]
-        public bool? Ticks { get; set; }
-
         /// <summary>
         /// The size in pixels of axis ticks.
         /// </summary>
@@ -6176,6 +6169,13 @@ namespace QuickType
         [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
         public double? TickSize { get; set; }
 
+        /// <summary>
+        /// Boolean value that determines whether the axis should include ticks.
+        /// </summary>
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("ticks")]
+        public bool? Ticks { get; set; }
+
         /// <summary>
         /// A title for the field. If `null`, the title will be removed.
         ///
@@ -6855,6 +6855,16 @@ namespace QuickType
         [JsonPropertyName("fill")]
         public string? Fill { get; set; }
 
+        /// <summary>
+        /// The fill opacity (value between [0,1]).
+        ///
+        /// __Default value:__ `1`
+        /// </summary>
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("fillOpacity")]
+        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
+        public double? FillOpacity { get; set; }
+
         /// <summary>
         /// Whether the mark's color should be used as fill color instead of stroke color.
         ///
@@ -6868,16 +6878,6 @@ namespace QuickType
         [JsonPropertyName("filled")]
         public bool? Filled { get; set; }
 
-        /// <summary>
-        /// The fill opacity (value between [0,1]).
-        ///
-        /// __Default value:__ `1`
-        /// </summary>
-        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
-        [JsonPropertyName("fillOpacity")]
-        [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
-        public double? FillOpacity { get; set; }
-
         /// <summary>
         /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
         /// </summary>
diff --git a/base/schema-dart/test/inputs/schema/accessors.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/accessors.schema/default/TopLevel.dart
index e402c4f..cbaa8c2 100644
--- a/base/schema-dart/test/inputs/schema/accessors.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/accessors.schema/default/TopLevel.dart
@@ -9,30 +9,30 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
-    final String barre;
+    final dynamic unionization;
     final Enum enumerification;
     final String foo;
-    final dynamic unionization;
+    final String barre;
 
     TopLevel({
-        required this.barre,
+        required this.unionization,
         required this.enumerification,
         required this.foo,
-        required this.unionization,
+        required this.barre,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        barre: json["bar"],
+        unionization: json["union"],
         enumerification: enumValues.map[json["enum"]]!,
         foo: json["foo"],
-        unionization: json["union"],
+        barre: json["bar"],
     );
 
     Map<String, dynamic> toJson() => {
-        "bar": barre,
+        "union": unionization,
         "enum": enumValues.reverse[enumerification],
         "foo": foo,
-        "union": unionization,
+        "bar": barre,
     };
 }
 
diff --git a/base/schema-dart/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.dart
index e09e53d..0fa391d 100644
--- a/base/schema-dart/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.dart
@@ -11,28 +11,28 @@ String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 class TopLevel {
     final double amount;
     final Frequency frequency;
-    final String? description;
     final Type type;
+    final String? description;
 
     TopLevel({
         required this.amount,
         required this.frequency,
-        this.description,
         required this.type,
+        this.description,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         amount: json["amount"]?.toDouble(),
         frequency: frequencyValues.map[json["frequency"]]!,
-        description: json["description"],
         type: typeValues.map[json["type"]]!,
+        description: json["description"],
     );
 
     Map<String, dynamic> toJson() => {
         "amount": amount,
         "frequency": frequencyValues.reverse[frequency],
-        "description": description,
         "type": typeValues.reverse[type],
+        "description": description,
     };
 }
 
diff --git a/base/schema-dart/test/inputs/schema/boolean-subschema.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/boolean-subschema.schema/default/TopLevel.dart
index 80370de..09028fa 100644
--- a/base/schema-dart/test/inputs/schema/boolean-subschema.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/boolean-subschema.schema/default/TopLevel.dart
@@ -9,29 +9,29 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
+    final String foo;
     final dynamic disallowed;
     final List<dynamic> empty;
-    final String foo;
     final dynamic impossible;
 
     TopLevel({
+        required this.foo,
         this.disallowed,
         required this.empty,
-        required this.foo,
         this.impossible,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        foo: json["foo"],
         disallowed: json["disallowed"],
         empty: List<dynamic>.from(json["empty"].map((x) => x)),
-        foo: json["foo"],
         impossible: json["impossible"],
     );
 
     Map<String, dynamic> toJson() => {
+        "foo": foo,
         "disallowed": disallowed,
         "empty": List<dynamic>.from(empty.map((x) => x)),
-        "foo": foo,
         "impossible": impossible,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/comment-injection.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/comment-injection.schema/default/TopLevel.dart
index f0ced98..8696f55 100644
--- a/base/schema-dart/test/inputs/schema/comment-injection.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/comment-injection.schema/default/TopLevel.dart
@@ -23,15 +23,6 @@ String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 ///}
 class TopLevel {
     
-    ///Ends with a backslash \
-    final String? trailingBackslash;
-    
-    ///Ends with a quote "
-    final String? trailingQuote;
-    
-    ///Ends with a triple quote """
-    final String? trailingTripleQuote;
-    
     ///Property delimiters:
     ///*/
     ////*
@@ -45,25 +36,34 @@ class TopLevel {
     ///}
     ///}
     final String value;
+    
+    ///Ends with a backslash \
+    final String? trailingBackslash;
+    
+    ///Ends with a quote "
+    final String? trailingQuote;
+    
+    ///Ends with a triple quote """
+    final String? trailingTripleQuote;
 
     TopLevel({
+        required this.value,
         this.trailingBackslash,
         this.trailingQuote,
         this.trailingTripleQuote,
-        required this.value,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        value: json["value"],
         trailingBackslash: json["trailingBackslash"],
         trailingQuote: json["trailingQuote"],
         trailingTripleQuote: json["trailingTripleQuote"],
-        value: json["value"],
     );
 
     Map<String, dynamic> toJson() => {
+        "value": value,
         "trailingBackslash": trailingBackslash,
         "trailingQuote": trailingQuote,
         "trailingTripleQuote": trailingTripleQuote,
-        "value": value,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/date-time-or-string.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/date-time-or-string.schema/default/TopLevel.dart
index cdcf6c8..7566014 100644
--- a/base/schema-dart/test/inputs/schema/date-time-or-string.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/date-time-or-string.schema/default/TopLevel.dart
@@ -9,22 +9,22 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
-    final dynamic bar;
     final String foo;
+    final dynamic bar;
 
     TopLevel({
-        required this.bar,
         required this.foo,
+        required this.bar,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        bar: json["bar"],
         foo: json["foo"],
+        bar: json["bar"],
     );
 
     Map<String, dynamic> toJson() => {
-        "bar": bar,
         "foo": foo,
+        "bar": bar,
     };
 }
 
diff --git a/base/schema-dart/test/inputs/schema/date-time.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/date-time.schema/default/TopLevel.dart
index c9e211f..2c4af74 100644
--- a/base/schema-dart/test/inputs/schema/date-time.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/date-time.schema/default/TopLevel.dart
@@ -9,34 +9,34 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
-    final List<dynamic> complexUnionArray;
     final DateTime date;
-    final DateTime dateTime;
     final String time;
+    final DateTime dateTime;
     final List<String> unionArray;
+    final List<dynamic> complexUnionArray;
 
     TopLevel({
-        required this.complexUnionArray,
         required this.date,
-        required this.dateTime,
         required this.time,
+        required this.dateTime,
         required this.unionArray,
+        required this.complexUnionArray,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        complexUnionArray: List<dynamic>.from(json["complex-union-array"].map((x) => x)),
         date: DateTime.parse(json["date"]),
-        dateTime: DateTime.parse(json["date-time"]),
         time: json["time"],
+        dateTime: DateTime.parse(json["date-time"]),
         unionArray: List<String>.from(json["union-array"].map((x) => x)),
+        complexUnionArray: List<dynamic>.from(json["complex-union-array"].map((x) => x)),
     );
 
     Map<String, dynamic> toJson() => {
-        "complex-union-array": List<dynamic>.from(complexUnionArray.map((x) => x)),
         "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
-        "date-time": dateTime.toIso8601String(),
         "time": time,
+        "date-time": dateTime.toIso8601String(),
         "union-array": List<dynamic>.from(unionArray.map((x) => x)),
+        "complex-union-array": List<dynamic>.from(complexUnionArray.map((x) => x)),
     };
 }
 
diff --git a/base/schema-dart/test/inputs/schema/description.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/description.schema/default/TopLevel.dart
index c01c117..af00960 100644
--- a/base/schema-dart/test/inputs/schema/description.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/description.schema/default/TopLevel.dart
@@ -13,39 +13,39 @@ String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 ///Its description has two lines.
 class TopLevel {
     
-    ///A pretty boolean
-    final bool? bar;
+    ///Either a number or a string
+    final dynamic union;
     
     ///An enumeration
     final Enum topLevelEnum;
     final double? foo;
-    final dynamic objectOrString;
     
-    ///Either a number or a string
-    final dynamic union;
+    ///A pretty boolean
+    final bool? bar;
+    final dynamic objectOrString;
 
     TopLevel({
-        this.bar,
+        required this.union,
         required this.topLevelEnum,
         this.foo,
+        this.bar,
         required this.objectOrString,
-        required this.union,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        bar: json["bar"],
+        union: json["union"],
         topLevelEnum: enumValues.map[json["enum"]]!,
         foo: json["foo"]?.toDouble(),
+        bar: json["bar"],
         objectOrString: json["object-or-string"],
-        union: json["union"],
     );
 
     Map<String, dynamic> toJson() => {
-        "bar": bar,
+        "union": union,
         "enum": enumValues.reverse[topLevelEnum],
         "foo": foo,
+        "bar": bar,
         "object-or-string": objectOrString,
-        "union": union,
     };
 }
 
diff --git a/base/schema-dart/test/inputs/schema/direct-union.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/direct-union.schema/default/TopLevel.dart
index f0d5549..66f9a6a 100644
--- a/base/schema-dart/test/inputs/schema/direct-union.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/direct-union.schema/default/TopLevel.dart
@@ -25,21 +25,21 @@ class TopLevel {
 }
 
 class Thing {
-    final dynamic optional;
     final dynamic required;
+    final dynamic optional;
 
     Thing({
-        this.optional,
         required this.required,
+        this.optional,
     });
 
     factory Thing.fromJson(Map<String, dynamic> json) => Thing(
-        optional: json["optional"],
         required: json["required"],
+        optional: json["optional"],
     );
 
     Map<String, dynamic> toJson() => {
-        "optional": optional,
         "required": required,
+        "optional": optional,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/integer-type.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/integer-type.schema/default/TopLevel.dart
index 364bfb6..f7e2c95 100644
--- a/base/schema-dart/test/inputs/schema/integer-type.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/integer-type.schema/default/TopLevel.dart
@@ -9,49 +9,49 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
+    final int smallPositive;
+    final int smallNegative;
+    final int i32Range;
     final int aboveI32Max;
     final int belowI32Min;
-    final int i32Range;
-    final int largeBounds;
-    final int onlyMaximum;
     final int onlyMinimum;
-    final int smallNegative;
-    final int smallPositive;
+    final int onlyMaximum;
     final int unbounded;
+    final int largeBounds;
 
     TopLevel({
+        required this.smallPositive,
+        required this.smallNegative,
+        required this.i32Range,
         required this.aboveI32Max,
         required this.belowI32Min,
-        required this.i32Range,
-        required this.largeBounds,
-        required this.onlyMaximum,
         required this.onlyMinimum,
-        required this.smallNegative,
-        required this.smallPositive,
+        required this.onlyMaximum,
         required this.unbounded,
+        required this.largeBounds,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        smallPositive: json["small_positive"],
+        smallNegative: json["small_negative"],
+        i32Range: json["i32_range"],
         aboveI32Max: json["above_i32_max"],
         belowI32Min: json["below_i32_min"],
-        i32Range: json["i32_range"],
-        largeBounds: json["large_bounds"],
-        onlyMaximum: json["only_maximum"],
         onlyMinimum: json["only_minimum"],
-        smallNegative: json["small_negative"],
-        smallPositive: json["small_positive"],
+        onlyMaximum: json["only_maximum"],
         unbounded: json["unbounded"],
+        largeBounds: json["large_bounds"],
     );
 
     Map<String, dynamic> toJson() => {
+        "small_positive": smallPositive,
+        "small_negative": smallNegative,
+        "i32_range": i32Range,
         "above_i32_max": aboveI32Max,
         "below_i32_min": belowI32Min,
-        "i32_range": i32Range,
-        "large_bounds": largeBounds,
-        "only_maximum": onlyMaximum,
         "only_minimum": onlyMinimum,
-        "small_negative": smallNegative,
-        "small_positive": smallPositive,
+        "only_maximum": onlyMaximum,
         "unbounded": unbounded,
+        "large_bounds": largeBounds,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/light.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/light.schema/default/TopLevel.dart
index 6a0a8ea..32c00b6 100644
--- a/base/schema-dart/test/inputs/schema/light.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/light.schema/default/TopLevel.dart
@@ -25,25 +25,25 @@ class TopLevel {
 }
 
 class LightParams {
-    final String appId;
     final String outletId;
+    final String appId;
     final String rgba;
 
     LightParams({
-        required this.appId,
         required this.outletId,
+        required this.appId,
         required this.rgba,
     });
 
     factory LightParams.fromJson(Map<String, dynamic> json) => LightParams(
-        appId: json["app_id"],
         outletId: json["outlet_id"],
+        appId: json["app_id"],
         rgba: json["rgba"],
     );
 
     Map<String, dynamic> toJson() => {
-        "app_id": appId,
         "outlet_id": outletId,
+        "app_id": appId,
         "rgba": rgba,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/min-max-items.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/min-max-items.schema/default/TopLevel.dart
index 25033b6..7308851 100644
--- a/base/schema-dart/test/inputs/schema/min-max-items.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/min-max-items.schema/default/TopLevel.dart
@@ -9,32 +9,32 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
+    final List<String> minOnly;
     final List<int> maxOnly;
     final List<double> minAndMax;
-    final List<String> minOnly;
     final List<String> plain;
     final List<dynamic> unionItems;
 
     TopLevel({
+        required this.minOnly,
         required this.maxOnly,
         required this.minAndMax,
-        required this.minOnly,
         required this.plain,
         required this.unionItems,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        minOnly: List<String>.from(json["minOnly"].map((x) => x)),
         maxOnly: List<int>.from(json["maxOnly"].map((x) => x)),
         minAndMax: List<double>.from(json["minAndMax"].map((x) => x?.toDouble())),
-        minOnly: List<String>.from(json["minOnly"].map((x) => x)),
         plain: List<String>.from(json["plain"].map((x) => x)),
         unionItems: List<dynamic>.from(json["unionItems"].map((x) => x)),
     );
 
     Map<String, dynamic> toJson() => {
+        "minOnly": List<dynamic>.from(minOnly.map((x) => x)),
         "maxOnly": List<dynamic>.from(maxOnly.map((x) => x)),
         "minAndMax": List<dynamic>.from(minAndMax.map((x) => x)),
-        "minOnly": List<dynamic>.from(minOnly.map((x) => x)),
         "plain": List<dynamic>.from(plain.map((x) => x)),
         "unionItems": List<dynamic>.from(unionItems.map((x) => x)),
     };
diff --git a/base/schema-dart/test/inputs/schema/minmax-integer.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/minmax-integer.schema/default/TopLevel.dart
index 4e83e3f..61bed9a 100644
--- a/base/schema-dart/test/inputs/schema/minmax-integer.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/minmax-integer.schema/default/TopLevel.dart
@@ -10,44 +10,44 @@ String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
     final int free;
-    final int intersection;
-    final int max;
     final int min;
+    final int max;
     final int minmax;
-    final int minMaxIntersection;
-    final int minMaxUnion;
     final int union;
+    final int minMaxUnion;
+    final int intersection;
+    final int minMaxIntersection;
 
     TopLevel({
         required this.free,
-        required this.intersection,
-        required this.max,
         required this.min,
+        required this.max,
         required this.minmax,
-        required this.minMaxIntersection,
-        required this.minMaxUnion,
         required this.union,
+        required this.minMaxUnion,
+        required this.intersection,
+        required this.minMaxIntersection,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         free: json["free"],
-        intersection: json["intersection"],
-        max: json["max"],
         min: json["min"],
+        max: json["max"],
         minmax: json["minmax"],
-        minMaxIntersection: json["minMaxIntersection"],
-        minMaxUnion: json["minMaxUnion"],
         union: json["union"],
+        minMaxUnion: json["minMaxUnion"],
+        intersection: json["intersection"],
+        minMaxIntersection: json["minMaxIntersection"],
     );
 
     Map<String, dynamic> toJson() => {
         "free": free,
-        "intersection": intersection,
-        "max": max,
         "min": min,
+        "max": max,
         "minmax": minmax,
-        "minMaxIntersection": minMaxIntersection,
-        "minMaxUnion": minMaxUnion,
         "union": union,
+        "minMaxUnion": minMaxUnion,
+        "intersection": intersection,
+        "minMaxIntersection": minMaxIntersection,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/minmax.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/minmax.schema/default/TopLevel.dart
index 521b275..f461d70 100644
--- a/base/schema-dart/test/inputs/schema/minmax.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/minmax.schema/default/TopLevel.dart
@@ -10,44 +10,44 @@ String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
     final double free;
-    final double intersection;
-    final double max;
     final double min;
+    final double max;
     final double minmax;
-    final double minMaxIntersection;
-    final double minMaxUnion;
     final double union;
+    final double minMaxUnion;
+    final double intersection;
+    final double minMaxIntersection;
 
     TopLevel({
         required this.free,
-        required this.intersection,
-        required this.max,
         required this.min,
+        required this.max,
         required this.minmax,
-        required this.minMaxIntersection,
-        required this.minMaxUnion,
         required this.union,
+        required this.minMaxUnion,
+        required this.intersection,
+        required this.minMaxIntersection,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         free: json["free"]?.toDouble(),
-        intersection: json["intersection"]?.toDouble(),
-        max: json["max"]?.toDouble(),
         min: json["min"]?.toDouble(),
+        max: json["max"]?.toDouble(),
         minmax: json["minmax"]?.toDouble(),
-        minMaxIntersection: json["minMaxIntersection"]?.toDouble(),
-        minMaxUnion: json["minMaxUnion"]?.toDouble(),
         union: json["union"]?.toDouble(),
+        minMaxUnion: json["minMaxUnion"]?.toDouble(),
+        intersection: json["intersection"]?.toDouble(),
+        minMaxIntersection: json["minMaxIntersection"]?.toDouble(),
     );
 
     Map<String, dynamic> toJson() => {
         "free": free,
-        "intersection": intersection,
-        "max": max,
         "min": min,
+        "max": max,
         "minmax": minmax,
-        "minMaxIntersection": minMaxIntersection,
-        "minMaxUnion": minMaxUnion,
         "union": union,
+        "minMaxUnion": minMaxUnion,
+        "intersection": intersection,
+        "minMaxIntersection": minMaxIntersection,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/minmaxlength.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/minmaxlength.schema/default/TopLevel.dart
index 9d838bc..dd332c7 100644
--- a/base/schema-dart/test/inputs/schema/minmaxlength.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/minmaxlength.schema/default/TopLevel.dart
@@ -9,45 +9,45 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
-    final String intersection;
-    final dynamic inUnion;
-    final String maxlength;
     final String minlength;
-    final String minMaxIntersection;
+    final String maxlength;
     final String minmaxlength;
-    final String minMaxUnion;
     final String union;
+    final dynamic inUnion;
+    final String minMaxUnion;
+    final String intersection;
+    final String minMaxIntersection;
 
     TopLevel({
-        required this.intersection,
-        required this.inUnion,
-        required this.maxlength,
         required this.minlength,
-        required this.minMaxIntersection,
+        required this.maxlength,
         required this.minmaxlength,
-        required this.minMaxUnion,
         required this.union,
+        required this.inUnion,
+        required this.minMaxUnion,
+        required this.intersection,
+        required this.minMaxIntersection,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        intersection: json["intersection"],
-        inUnion: json["inUnion"],
-        maxlength: json["maxlength"],
         minlength: json["minlength"],
-        minMaxIntersection: json["minMaxIntersection"],
+        maxlength: json["maxlength"],
         minmaxlength: json["minmaxlength"],
-        minMaxUnion: json["minMaxUnion"],
         union: json["union"],
+        inUnion: json["inUnion"],
+        minMaxUnion: json["minMaxUnion"],
+        intersection: json["intersection"],
+        minMaxIntersection: json["minMaxIntersection"],
     );
 
     Map<String, dynamic> toJson() => {
-        "intersection": intersection,
-        "inUnion": inUnion,
-        "maxlength": maxlength,
         "minlength": minlength,
-        "minMaxIntersection": minMaxIntersection,
+        "maxlength": maxlength,
         "minmaxlength": minmaxlength,
-        "minMaxUnion": minMaxUnion,
         "union": union,
+        "inUnion": inUnion,
+        "minMaxUnion": minMaxUnion,
+        "intersection": intersection,
+        "minMaxIntersection": minMaxIntersection,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/non-standard-ref.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/non-standard-ref.schema/default/TopLevel.dart
index c83bcdd..6d505ed 100644
--- a/base/schema-dart/test/inputs/schema/non-standard-ref.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/non-standard-ref.schema/default/TopLevel.dart
@@ -9,25 +9,25 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
-    final int bar;
     final int foo;
+    final int bar;
     final bool quux;
 
     TopLevel({
-        required this.bar,
         required this.foo,
+        required this.bar,
         required this.quux,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        bar: json["bar"],
         foo: json["foo"],
+        bar: json["bar"],
         quux: json["quux"],
     );
 
     Map<String, dynamic> toJson() => {
-        "bar": bar,
         "foo": foo,
+        "bar": bar,
         "quux": quux,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.dart
index 857a543..ca98a10 100644
--- a/base/schema-dart/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.dart
@@ -9,22 +9,22 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
-    final String? b;
     final Kind kind;
+    final String? b;
 
     TopLevel({
-        this.b,
         required this.kind,
+        this.b,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        b: json["b"],
         kind: kindValues.map[json["kind"]]!,
+        b: json["b"],
     );
 
     Map<String, dynamic> toJson() => {
-        "b": b,
         "kind": kindValues.reverse[kind],
+        "b": b,
     };
 }
 
diff --git a/base/schema-dart/test/inputs/schema/optional-any.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/optional-any.schema/default/TopLevel.dart
index 8248389..2f4822c 100644
--- a/base/schema-dart/test/inputs/schema/optional-any.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/optional-any.schema/default/TopLevel.dart
@@ -9,21 +9,21 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
-    final bool bar;
     final dynamic foo;
+    final bool bar;
 
     TopLevel({
-        required this.bar,
         this.foo,
+        required this.bar,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        bar: json["bar"],
         foo: json["foo"],
+        bar: json["bar"],
     );
 
     Map<String, dynamic> toJson() => {
-        "bar": bar,
         "foo": foo,
+        "bar": bar,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/optional-const-ref.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/optional-const-ref.schema/default/TopLevel.dart
index 20f2729..181960d 100644
--- a/base/schema-dart/test/inputs/schema/optional-const-ref.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/optional-const-ref.schema/default/TopLevel.dart
@@ -10,41 +10,41 @@ String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
     final List<Coordinate>? coordinates;
-    final int? count;
-    final String? label;
     final List<Coordinate> requiredCoordinates;
+    final int? count;
     final int requiredCount;
-    final String requiredLabel;
     final double? weight;
+    final String? label;
+    final String requiredLabel;
 
     TopLevel({
         this.coordinates,
-        this.count,
-        this.label,
         required this.requiredCoordinates,
+        this.count,
         required this.requiredCount,
-        required this.requiredLabel,
         this.weight,
+        this.label,
+        required this.requiredLabel,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         coordinates: json["coordinates"] == null ? null : List<Coordinate>.from(json["coordinates"]!.map((x) => Coordinate.fromJson(x))),
-        count: json["count"],
-        label: json["label"],
         requiredCoordinates: List<Coordinate>.from(json["requiredCoordinates"].map((x) => Coordinate.fromJson(x))),
+        count: json["count"],
         requiredCount: json["requiredCount"],
-        requiredLabel: json["requiredLabel"],
         weight: json["weight"]?.toDouble(),
+        label: json["label"],
+        requiredLabel: json["requiredLabel"],
     );
 
     Map<String, dynamic> toJson() => {
         "coordinates": coordinates == null ? null : List<dynamic>.from(coordinates!.map((x) => x.toJson())),
-        "count": count,
-        "label": label,
         "requiredCoordinates": List<dynamic>.from(requiredCoordinates.map((x) => x.toJson())),
+        "count": count,
         "requiredCount": requiredCount,
-        "requiredLabel": requiredLabel,
         "weight": weight,
+        "label": label,
+        "requiredLabel": requiredLabel,
     };
 }
 
diff --git a/base/schema-dart/test/inputs/schema/optional-constraints.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/optional-constraints.schema/default/TopLevel.dart
index 8f52feb..87c23b9 100644
--- a/base/schema-dart/test/inputs/schema/optional-constraints.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/optional-constraints.schema/default/TopLevel.dart
@@ -9,33 +9,33 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
-    final double? optDouble;
+    final int reqZeroMin;
     final int? optInt;
-    final String? optPattern;
+    final double? optDouble;
     final String? optString;
-    final int reqZeroMin;
+    final String? optPattern;
 
     TopLevel({
-        this.optDouble,
+        required this.reqZeroMin,
         this.optInt,
-        this.optPattern,
+        this.optDouble,
         this.optString,
-        required this.reqZeroMin,
+        this.optPattern,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        optDouble: json["optDouble"]?.toDouble(),
+        reqZeroMin: json["reqZeroMin"],
         optInt: json["optInt"],
-        optPattern: json["optPattern"],
+        optDouble: json["optDouble"]?.toDouble(),
         optString: json["optString"],
-        reqZeroMin: json["reqZeroMin"],
+        optPattern: json["optPattern"],
     );
 
     Map<String, dynamic> toJson() => {
-        "optDouble": optDouble,
+        "reqZeroMin": reqZeroMin,
         "optInt": optInt,
-        "optPattern": optPattern,
+        "optDouble": optDouble,
         "optString": optString,
-        "reqZeroMin": reqZeroMin,
+        "optPattern": optPattern,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/optional-date-time.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/optional-date-time.schema/default/TopLevel.dart
index 57bb775..1b1ab7f 100644
--- a/base/schema-dart/test/inputs/schema/optional-date-time.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/optional-date-time.schema/default/TopLevel.dart
@@ -9,37 +9,37 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
-    final DateTime? optionalDate;
-    final DateTime? optionalDateTime;
-    final String? optionalTime;
     final DateTime requiredDate;
-    final DateTime requiredDateTime;
     final String requiredTime;
+    final DateTime requiredDateTime;
+    final DateTime? optionalDate;
+    final String? optionalTime;
+    final DateTime? optionalDateTime;
 
     TopLevel({
-        this.optionalDate,
-        this.optionalDateTime,
-        this.optionalTime,
         required this.requiredDate,
-        required this.requiredDateTime,
         required this.requiredTime,
+        required this.requiredDateTime,
+        this.optionalDate,
+        this.optionalTime,
+        this.optionalDateTime,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        optionalDate: json["optional-date"] == null ? null : DateTime.parse(json["optional-date"]),
-        optionalDateTime: json["optional-date-time"] == null ? null : DateTime.parse(json["optional-date-time"]),
-        optionalTime: json["optional-time"],
         requiredDate: DateTime.parse(json["required-date"]),
-        requiredDateTime: DateTime.parse(json["required-date-time"]),
         requiredTime: json["required-time"],
+        requiredDateTime: DateTime.parse(json["required-date-time"]),
+        optionalDate: json["optional-date"] == null ? null : DateTime.parse(json["optional-date"]),
+        optionalTime: json["optional-time"],
+        optionalDateTime: json["optional-date-time"] == null ? null : DateTime.parse(json["optional-date-time"]),
     );
 
     Map<String, dynamic> toJson() => {
-        "optional-date": optionalDate == null ? null : "${optionalDate!.year.toString().padLeft(4, '0')}-${optionalDate!.month.toString().padLeft(2, '0')}-${optionalDate!.day.toString().padLeft(2, '0')}",
-        "optional-date-time": optionalDateTime?.toIso8601String(),
-        "optional-time": optionalTime,
         "required-date": "${requiredDate.year.toString().padLeft(4, '0')}-${requiredDate.month.toString().padLeft(2, '0')}-${requiredDate.day.toString().padLeft(2, '0')}",
-        "required-date-time": requiredDateTime.toIso8601String(),
         "required-time": requiredTime,
+        "required-date-time": requiredDateTime.toIso8601String(),
+        "optional-date": optionalDate == null ? null : "${optionalDate!.year.toString().padLeft(4, '0')}-${optionalDate!.month.toString().padLeft(2, '0')}-${optionalDate!.day.toString().padLeft(2, '0')}",
+        "optional-time": optionalTime,
+        "optional-date-time": optionalDateTime?.toIso8601String(),
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/prefix-items.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/prefix-items.schema/default/TopLevel.dart
index 405268a..648b3d5 100644
--- a/base/schema-dart/test/inputs/schema/prefix-items.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/prefix-items.schema/default/TopLevel.dart
@@ -9,21 +9,21 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
-    final List<dynamic> open;
     final List<dynamic> tuple;
+    final List<dynamic> open;
 
     TopLevel({
-        required this.open,
         required this.tuple,
+        required this.open,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        open: List<dynamic>.from(json["open"].map((x) => x)),
         tuple: List<dynamic>.from(json["tuple"].map((x) => x)),
+        open: List<dynamic>.from(json["open"].map((x) => x)),
     );
 
     Map<String, dynamic> toJson() => {
-        "open": List<dynamic>.from(open.map((x) => x)),
         "tuple": List<dynamic>.from(tuple.map((x) => x)),
+        "open": List<dynamic>.from(open.map((x) => x)),
     };
 }
diff --git a/head/schema-dart/test/inputs/schema/property-order.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/property-order.schema/default/TopLevel.dart
new file mode 100644
index 0000000..7f37153
--- /dev/null
+++ b/head/schema-dart/test/inputs/schema/property-order.schema/default/TopLevel.dart
@@ -0,0 +1,69 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String zebra;
+    final double mango;
+    final bool apple;
+    final String delta;
+    final int banana;
+    final Ordered ordered;
+
+    TopLevel({
+        required this.zebra,
+        required this.mango,
+        required this.apple,
+        required this.delta,
+        required this.banana,
+        required this.ordered,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        zebra: json["zebra"],
+        mango: json["mango"]?.toDouble(),
+        apple: json["apple"],
+        delta: json["delta"],
+        banana: json["banana"],
+        ordered: Ordered.fromJson(json["ordered"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "zebra": zebra,
+        "mango": mango,
+        "apple": apple,
+        "delta": delta,
+        "banana": banana,
+        "ordered": ordered.toJson(),
+    };
+}
+
+class Ordered {
+    final double mango;
+    final String zebra;
+    final bool apple;
+
+    Ordered({
+        required this.mango,
+        required this.zebra,
+        required this.apple,
+    });
+
+    factory Ordered.fromJson(Map<String, dynamic> json) => Ordered(
+        mango: json["mango"]?.toDouble(),
+        zebra: json["zebra"],
+        apple: json["apple"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "mango": mango,
+        "zebra": zebra,
+        "apple": apple,
+    };
+}
diff --git a/base/schema-dart/test/inputs/schema/renaming-bug.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/renaming-bug.schema/default/TopLevel.dart
index 83964e9..d124f50 100644
--- a/base/schema-dart/test/inputs/schema/renaming-bug.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/renaming-bug.schema/default/TopLevel.dart
@@ -34,48 +34,48 @@ class TopLevel {
 
 class Fruit {
     final bool? apple;
-    final List<Berry>? berries;
     final bool? orange;
+    final List<Berry>? berries;
 
     Fruit({
         this.apple,
-        this.berries,
         this.orange,
+        this.berries,
     });
 
     factory Fruit.fromJson(Map<String, dynamic> json) => Fruit(
         apple: json["apple"],
-        berries: json["berries"] == null ? null : List<Berry>.from(json["berries"]!.map((x) => Berry.fromJson(x))),
         orange: json["orange"],
+        berries: json["berries"] == null ? null : List<Berry>.from(json["berries"]!.map((x) => Berry.fromJson(x))),
     );
 
     Map<String, dynamic> toJson() => {
         "apple": apple,
-        "berries": berries == null ? null : List<dynamic>.from(berries!.map((x) => x.toJson())),
         "orange": orange,
+        "berries": berries == null ? null : List<dynamic>.from(berries!.map((x) => x.toJson())),
     };
 }
 
 class Berry {
-    final Color? color;
     final String? name;
+    final Color? color;
     final List<Shape>? shapes;
 
     Berry({
-        this.color,
         this.name,
+        this.color,
         this.shapes,
     });
 
     factory Berry.fromJson(Map<String, dynamic> json) => Berry(
-        color: json["color"] == null ? null : Color.fromJson(json["color"]),
         name: json["name"],
+        color: json["color"] == null ? null : Color.fromJson(json["color"]),
         shapes: json["shapes"] == null ? null : List<Shape>.from(json["shapes"]!.map((x) => Shape.fromJson(x))),
     );
 
     Map<String, dynamic> toJson() => {
-        "color": color?.toJson(),
         "name": name,
+        "color": color?.toJson(),
         "shapes": shapes == null ? null : List<dynamic>.from(shapes!.map((x) => x.toJson())),
     };
 }
@@ -97,22 +97,22 @@ class Color {
 }
 
 class Shape {
-    final Geometry? geometry;
     final History? history;
+    final Geometry? geometry;
 
     Shape({
-        this.geometry,
         this.history,
+        this.geometry,
     });
 
     factory Shape.fromJson(Map<String, dynamic> json) => Shape(
-        geometry: json["geometry"] == null ? null : Geometry.fromJson(json["geometry"]),
         history: json["history"] == null ? null : History.fromJson(json["history"]),
+        geometry: json["geometry"] == null ? null : Geometry.fromJson(json["geometry"]),
     );
 
     Map<String, dynamic> toJson() => {
-        "geometry": geometry?.toJson(),
         "history": history?.toJson(),
+        "geometry": geometry?.toJson(),
     };
 }
 
@@ -169,26 +169,26 @@ class RectShape {
 }
 
 class Part {
-    final String? depth;
     final String? length;
     final String? width;
+    final String? depth;
 
     Part({
-        this.depth,
         this.length,
         this.width,
+        this.depth,
     });
 
     factory Part.fromJson(Map<String, dynamic> json) => Part(
-        depth: json["depth"],
         length: json["length"],
         width: json["width"],
+        depth: json["depth"],
     );
 
     Map<String, dynamic> toJson() => {
-        "depth": depth,
         "length": length,
         "width": width,
+        "depth": depth,
     };
 }
 
@@ -209,38 +209,38 @@ class History {
 }
 
 class Vehicle {
-    final String? brand;
     final String? id;
-    final Speed? speed;
-    final bool? subModule;
     final VehicleType? type;
+    final Speed? speed;
     final String? year;
+    final String? brand;
+    final bool? subModule;
 
     Vehicle({
-        this.brand,
         this.id,
-        this.speed,
-        this.subModule,
         this.type,
+        this.speed,
         this.year,
+        this.brand,
+        this.subModule,
     });
 
     factory Vehicle.fromJson(Map<String, dynamic> json) => Vehicle(
-        brand: json["brand"],
         id: json["id"],
-        speed: json["speed"] == null ? null : Speed.fromJson(json["speed"]),
-        subModule: json["subModule"],
         type: json["type"] == null ? null : VehicleType.fromJson(json["type"]),
+        speed: json["speed"] == null ? null : Speed.fromJson(json["speed"]),
         year: json["year"],
+        brand: json["brand"],
+        subModule: json["subModule"],
     );
 
     Map<String, dynamic> toJson() => {
-        "brand": brand,
         "id": id,
-        "speed": speed?.toJson(),
-        "subModule": subModule,
         "type": type?.toJson(),
+        "speed": speed?.toJson(),
         "year": year,
+        "brand": brand,
+        "subModule": subModule,
     };
 }
 
@@ -261,22 +261,22 @@ class Speed {
 }
 
 class Limit {
-    final double? maximum;
     final double? minimum;
+    final double? maximum;
 
     Limit({
-        this.maximum,
         this.minimum,
+        this.maximum,
     });
 
     factory Limit.fromJson(Map<String, dynamic> json) => Limit(
-        maximum: json["maximum"]?.toDouble(),
         minimum: json["minimum"]?.toDouble(),
+        maximum: json["maximum"]?.toDouble(),
     );
 
     Map<String, dynamic> toJson() => {
-        "maximum": maximum,
         "minimum": minimum,
+        "maximum": maximum,
     };
 }
 
diff --git a/base/schema-dart/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.dart
index 6b0876b..de9395f 100644
--- a/base/schema-dart/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.dart
@@ -9,41 +9,41 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
-    final dynamic next;
     final String value;
+    final dynamic next;
 
     TopLevel({
-        this.next,
         required this.value,
+        this.next,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        next: json["next"],
         value: json["value"],
+        next: json["next"],
     );
 
     Map<String, dynamic> toJson() => {
-        "next": next,
         "value": value,
+        "next": next,
     };
 }
 
 class Node {
-    final dynamic next;
     final String value;
+    final dynamic next;
 
     Node({
-        this.next,
         required this.value,
+        this.next,
     });
 
     factory Node.fromJson(Map<String, dynamic> json) => Node(
-        next: json["next"],
         value: json["value"],
+        next: json["next"],
     );
 
     Map<String, dynamic> toJson() => {
-        "next": next,
         "value": value,
+        "next": next,
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart
index e65602f..f88c35e 100644
--- a/base/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart
@@ -646,6 +646,11 @@ class MarkConfig {
     ///__Default value:__ (None)
     final String? fill;
     
+    ///The fill opacity (value between [0,1]).
+    ///
+    ///__Default value:__ `1`
+    final double? fillOpacity;
+    
     ///Whether the mark's color should be used as fill color instead of stroke color.
     ///
     ///__Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -655,11 +660,6 @@ class MarkConfig {
     ///__Note:__ This property cannot be used in a [style config](mark.html#style-config).
     final bool? filled;
     
-    ///The fill opacity (value between [0,1]).
-    ///
-    ///__Default value:__ `1`
-    final double? fillOpacity;
-    
     ///The typeface to set the text in (e.g., `"Helvetica Neue"`).
     final String? font;
     
@@ -773,8 +773,8 @@ class MarkConfig {
         this.dx,
         this.dy,
         this.fill,
-        this.filled,
         this.fillOpacity,
+        this.filled,
         this.font,
         this.fontSize,
         this.fontStyle,
@@ -806,8 +806,8 @@ class MarkConfig {
         dx: json["dx"]?.toDouble(),
         dy: json["dy"]?.toDouble(),
         fill: json["fill"],
-        filled: json["filled"],
         fillOpacity: json["fillOpacity"]?.toDouble(),
+        filled: json["filled"],
         font: json["font"],
         fontSize: json["fontSize"]?.toDouble(),
         fontStyle: fontStyleValues.map[json["fontStyle"]],
@@ -839,8 +839,8 @@ class MarkConfig {
         "dx": dx,
         "dy": dy,
         "fill": fill,
-        "filled": filled,
         "fillOpacity": fillOpacity,
+        "filled": filled,
         "font": font,
         "fontSize": fontSize,
         "fontStyle": fontStyleValues.reverse[fontStyle],
@@ -1195,15 +1195,15 @@ class AxisConfig {
     ///Boolean flag indicating if pixel position values should be rounded to the nearest integer.
     final bool? tickRound;
     
-    ///Boolean value that determines whether the axis should include ticks.
-    final bool? ticks;
-    
     ///The size in pixels of axis ticks.
     final double? tickSize;
     
     ///The width, in pixels, of ticks.
     final double? tickWidth;
     
+    ///Boolean value that determines whether the axis should include ticks.
+    final bool? ticks;
+    
     ///Horizontal text alignment of axis titles.
     final String? titleAlign;
     
@@ -1266,9 +1266,9 @@ class AxisConfig {
         this.shortTimeLabels,
         this.tickColor,
         this.tickRound,
-        this.ticks,
         this.tickSize,
         this.tickWidth,
+        this.ticks,
         this.titleAlign,
         this.titleAngle,
         this.titleBaseline,
@@ -1308,9 +1308,9 @@ class AxisConfig {
         shortTimeLabels: json["shortTimeLabels"],
         tickColor: json["tickColor"],
         tickRound: json["tickRound"],
-        ticks: json["ticks"],
         tickSize: json["tickSize"]?.toDouble(),
         tickWidth: json["tickWidth"]?.toDouble(),
+        ticks: json["ticks"],
         titleAlign: json["titleAlign"],
         titleAngle: json["titleAngle"]?.toDouble(),
         titleBaseline: json["titleBaseline"],
@@ -1350,9 +1350,9 @@ class AxisConfig {
         "shortTimeLabels": shortTimeLabels,
         "tickColor": tickColor,
         "tickRound": tickRound,
-        "ticks": ticks,
         "tickSize": tickSize,
         "tickWidth": tickWidth,
+        "ticks": ticks,
         "titleAlign": titleAlign,
         "titleAngle": titleAngle,
         "titleBaseline": titleBaseline,
@@ -1508,15 +1508,15 @@ class VgAxisConfig {
     ///Boolean flag indicating if pixel position values should be rounded to the nearest integer.
     final bool? tickRound;
     
-    ///Boolean value that determines whether the axis should include ticks.
-    final bool? ticks;
-    
     ///The size in pixels of axis ticks.
     final double? tickSize;
     
     ///The width, in pixels, of ticks.
     final double? tickWidth;
     
+    ///Boolean value that determines whether the axis should include ticks.
+    final bool? ticks;
+    
     ///Horizontal text alignment of axis titles.
     final String? titleAlign;
     
@@ -1578,9 +1578,9 @@ class VgAxisConfig {
         this.minExtent,
         this.tickColor,
         this.tickRound,
-        this.ticks,
         this.tickSize,
         this.tickWidth,
+        this.ticks,
         this.titleAlign,
         this.titleAngle,
         this.titleBaseline,
@@ -1619,9 +1619,9 @@ class VgAxisConfig {
         minExtent: json["minExtent"]?.toDouble(),
         tickColor: json["tickColor"],
         tickRound: json["tickRound"],
-        ticks: json["ticks"],
         tickSize: json["tickSize"]?.toDouble(),
         tickWidth: json["tickWidth"]?.toDouble(),
+        ticks: json["ticks"],
         titleAlign: json["titleAlign"],
         titleAngle: json["titleAngle"]?.toDouble(),
         titleBaseline: json["titleBaseline"],
@@ -1660,9 +1660,9 @@ class VgAxisConfig {
         "minExtent": minExtent,
         "tickColor": tickColor,
         "tickRound": tickRound,
-        "ticks": ticks,
         "tickSize": tickSize,
         "tickWidth": tickWidth,
+        "ticks": ticks,
         "titleAlign": titleAlign,
         "titleAngle": titleAngle,
         "titleBaseline": titleBaseline,
@@ -1733,6 +1733,11 @@ class BarConfig {
     ///__Default value:__ (None)
     final String? fill;
     
+    ///The fill opacity (value between [0,1]).
+    ///
+    ///__Default value:__ `1`
+    final double? fillOpacity;
+    
     ///Whether the mark's color should be used as fill color instead of stroke color.
     ///
     ///__Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -1742,11 +1747,6 @@ class BarConfig {
     ///__Note:__ This property cannot be used in a [style config](mark.html#style-config).
     final bool? filled;
     
-    ///The fill opacity (value between [0,1]).
-    ///
-    ///__Default value:__ `1`
-    final double? fillOpacity;
-    
     ///The typeface to set the text in (e.g., `"Helvetica Neue"`).
     final String? font;
     
@@ -1863,8 +1863,8 @@ class BarConfig {
         this.dx,
         this.dy,
         this.fill,
-        this.filled,
         this.fillOpacity,
+        this.filled,
         this.font,
         this.fontSize,
         this.fontStyle,
@@ -1899,8 +1899,8 @@ class BarConfig {
         dx: json["dx"]?.toDouble(),
         dy: json["dy"]?.toDouble(),
         fill: json["fill"],
-        filled: json["filled"],
         fillOpacity: json["fillOpacity"]?.toDouble(),
+        filled: json["filled"],
         font: json["font"],
         fontSize: json["fontSize"]?.toDouble(),
         fontStyle: fontStyleValues.map[json["fontStyle"]],
@@ -1935,8 +1935,8 @@ class BarConfig {
         "dx": dx,
         "dy": dy,
         "fill": fill,
-        "filled": filled,
         "fillOpacity": fillOpacity,
+        "filled": filled,
         "font": font,
         "fontSize": fontSize,
         "fontStyle": fontStyleValues.reverse[fontStyle],
@@ -3410,6 +3410,11 @@ class TextConfig {
     ///__Default value:__ (None)
     final String? fill;
     
+    ///The fill opacity (value between [0,1]).
+    ///
+    ///__Default value:__ `1`
+    final double? fillOpacity;
+    
     ///Whether the mark's color should be used as fill color instead of stroke color.
     ///
     ///__Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -3419,11 +3424,6 @@ class TextConfig {
     ///__Note:__ This property cannot be used in a [style config](mark.html#style-config).
     final bool? filled;
     
-    ///The fill opacity (value between [0,1]).
-    ///
-    ///__Default value:__ `1`
-    final double? fillOpacity;
-    
     ///The typeface to set the text in (e.g., `"Helvetica Neue"`).
     final String? font;
     
@@ -3540,8 +3540,8 @@ class TextConfig {
         this.dx,
         this.dy,
         this.fill,
-        this.filled,
         this.fillOpacity,
+        this.filled,
         this.font,
         this.fontSize,
         this.fontStyle,
@@ -3574,8 +3574,8 @@ class TextConfig {
         dx: json["dx"]?.toDouble(),
         dy: json["dy"]?.toDouble(),
         fill: json["fill"],
-        filled: json["filled"],
         fillOpacity: json["fillOpacity"]?.toDouble(),
+        filled: json["filled"],
         font: json["font"],
         fontSize: json["fontSize"]?.toDouble(),
         fontStyle: fontStyleValues.map[json["fontStyle"]],
@@ -3608,8 +3608,8 @@ class TextConfig {
         "dx": dx,
         "dy": dy,
         "fill": fill,
-        "filled": filled,
         "fillOpacity": fillOpacity,
+        "filled": filled,
         "font": font,
         "fontSize": fontSize,
         "fontStyle": fontStyleValues.reverse[fontStyle],
@@ -3679,6 +3679,11 @@ class TickConfig {
     ///__Default value:__ (None)
     final String? fill;
     
+    ///The fill opacity (value between [0,1]).
+    ///
+    ///__Default value:__ `1`
+    final double? fillOpacity;
+    
     ///Whether the mark's color should be used as fill color instead of stroke color.
     ///
     ///__Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -3688,11 +3693,6 @@ class TickConfig {
     ///__Note:__ This property cannot be used in a [style config](mark.html#style-config).
     final bool? filled;
     
-    ///The fill opacity (value between [0,1]).
-    ///
-    ///__Default value:__ `1`
-    final double? fillOpacity;
-    
     ///The typeface to set the text in (e.g., `"Helvetica Neue"`).
     final String? font;
     
@@ -3812,8 +3812,8 @@ class TickConfig {
         this.dx,
         this.dy,
         this.fill,
-        this.filled,
         this.fillOpacity,
+        this.filled,
         this.font,
         this.fontSize,
         this.fontStyle,
@@ -3847,8 +3847,8 @@ class TickConfig {
         dx: json["dx"]?.toDouble(),
         dy: json["dy"]?.toDouble(),
         fill: json["fill"],
-        filled: json["filled"],
         fillOpacity: json["fillOpacity"]?.toDouble(),
+        filled: json["filled"],
         font: json["font"],
         fontSize: json["fontSize"]?.toDouble(),
         fontStyle: fontStyleValues.map[json["fontStyle"]],
@@ -3882,8 +3882,8 @@ class TickConfig {
         "dx": dx,
         "dy": dy,
         "fill": fill,
-        "filled": filled,
         "fillOpacity": fillOpacity,
+        "filled": filled,
         "font": font,
         "fontSize": fontSize,
         "fontStyle": fontStyleValues.reverse[fontStyle],
@@ -6684,12 +6684,12 @@ class Axis {
     ///underlying scale's range.
     final double? tickCount;
     
-    ///Boolean value that determines whether the axis should include ticks.
-    final bool? ticks;
-    
     ///The size in pixels of axis ticks.
     final double? tickSize;
     
+    ///Boolean value that determines whether the axis should include ticks.
+    final bool? ticks;
+    
     ///A title for the field. If `null`, the title will be removed.
     ///
     ///__Default value:__  derived from the field's name and transformation function
@@ -6738,8 +6738,8 @@ class Axis {
         this.orient,
         this.position,
         this.tickCount,
-        this.ticks,
         this.tickSize,
+        this.ticks,
         this.title,
         this.titleMaxLength,
         this.titlePadding,
@@ -6763,8 +6763,8 @@ class Axis {
         orient: titleOrientValues.map[json["orient"]],
         position: json["position"]?.toDouble(),
         tickCount: json["tickCount"]?.toDouble(),
-        ticks: json["ticks"],
         tickSize: json["tickSize"]?.toDouble(),
+        ticks: json["ticks"],
         title: json["title"],
         titleMaxLength: json["titleMaxLength"]?.toDouble(),
         titlePadding: json["titlePadding"]?.toDouble(),
@@ -6788,8 +6788,8 @@ class Axis {
         "orient": titleOrientValues.reverse[orient],
         "position": position,
         "tickCount": tickCount,
-        "ticks": ticks,
         "tickSize": tickSize,
+        "ticks": ticks,
         "title": title,
         "titleMaxLength": titleMaxLength,
         "titlePadding": titlePadding,
@@ -7375,6 +7375,11 @@ class MarkDef {
     ///__Default value:__ (None)
     final String? fill;
     
+    ///The fill opacity (value between [0,1]).
+    ///
+    ///__Default value:__ `1`
+    final double? fillOpacity;
+    
     ///Whether the mark's color should be used as fill color instead of stroke color.
     ///
     ///__Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -7384,11 +7389,6 @@ class MarkDef {
     ///__Note:__ This property cannot be used in a [style config](mark.html#style-config).
     final bool? filled;
     
-    ///The fill opacity (value between [0,1]).
-    ///
-    ///__Default value:__ `1`
-    final double? fillOpacity;
-    
     ///The typeface to set the text in (e.g., `"Helvetica Neue"`).
     final String? font;
     
@@ -7521,8 +7521,8 @@ class MarkDef {
         this.dx,
         this.dy,
         this.fill,
-        this.filled,
         this.fillOpacity,
+        this.filled,
         this.font,
         this.fontSize,
         this.fontStyle,
@@ -7557,8 +7557,8 @@ class MarkDef {
         dx: json["dx"]?.toDouble(),
         dy: json["dy"]?.toDouble(),
         fill: json["fill"],
-        filled: json["filled"],
         fillOpacity: json["fillOpacity"]?.toDouble(),
+        filled: json["filled"],
         font: json["font"],
         fontSize: json["fontSize"]?.toDouble(),
         fontStyle: fontStyleValues.map[json["fontStyle"]],
@@ -7593,8 +7593,8 @@ class MarkDef {
         "dx": dx,
         "dy": dy,
         "fill": fill,
-        "filled": filled,
         "fillOpacity": fillOpacity,
+        "filled": filled,
         "font": font,
         "fontSize": fontSize,
         "fontStyle": fontStyleValues.reverse[fontStyle],
diff --git a/base/schema-elixir/test/inputs/schema/accessors.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/accessors.schema/default/QuickType.ex
index f6d9cf3..cb268cd 100644
--- a/base/schema-elixir/test/inputs/schema/accessors.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/accessors.schema/default/QuickType.ex
@@ -53,22 +53,22 @@ defmodule EnumEnum do
 end
 
 defmodule TopLevel do
-  @enforce_keys [:barre, :enumerification, :foo, :unionization]
-  defstruct [:barre, :enumerification, :foo, :unionization]
+  @enforce_keys [:unionization, :enumerification, :foo, :barre]
+  defstruct [:unionization, :enumerification, :foo, :barre]
 
   @type t :: %__MODULE__{
-          barre: String.t(),
+          unionization: boolean() | float(),
           enumerification: EnumEnum.t(),
           foo: String.t(),
-          unionization: boolean() | float()
+          barre: String.t()
         }
 
   def from_map(m) do
     %TopLevel{
-      barre: m["bar"],
+      unionization: m["union"],
       enumerification: EnumEnum.decode(m["enum"]),
       foo: m["foo"],
-      unionization: m["union"],
+      barre: m["bar"],
     }
   end
 
@@ -80,10 +80,10 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "bar" => struct.barre,
+      "union" => struct.unionization,
       "enum" => EnumEnum.encode(struct.enumerification),
       "foo" => struct.foo,
-      "union" => struct.unionization,
+      "bar" => struct.barre,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.ex
index ff5ebd1..c3bc50a 100644
--- a/base/schema-elixir/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.ex
@@ -100,21 +100,21 @@ end
 
 defmodule TopLevel do
   @enforce_keys [:amount, :frequency, :type]
-  defstruct [:amount, :frequency, :description, :type]
+  defstruct [:amount, :frequency, :type, :description]
 
   @type t :: %__MODULE__{
           amount: float(),
           frequency: Frequency.t(),
-          description: String.t() | nil,
-          type: Type.t()
+          type: Type.t(),
+          description: String.t() | nil
         }
 
   def from_map(m) do
     %TopLevel{
       amount: m["amount"],
       frequency: Frequency.decode(m["frequency"]),
-      description: m["description"],
       type: Type.decode(m["type"]),
+      description: m["description"],
     }
   end
 
@@ -128,8 +128,8 @@ defmodule TopLevel do
     %{
       "amount" => struct.amount,
       "frequency" => Frequency.encode(struct.frequency),
-      "description" => struct.description,
       "type" => Type.encode(struct.type),
+      "description" => struct.description,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/bool-string.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/bool-string.schema/default/QuickType.ex
index 8bd9c99..08001cd 100644
--- a/base/schema-elixir/test/inputs/schema/bool-string.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/bool-string.schema/default/QuickType.ex
@@ -6,15 +6,15 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:nullable, :one, :union_with_bool, :union_with_bool_and_enum]
-  defstruct [:arr_nullable, :arr_one, :nullable, :one, :optional, :union_with_bool, :union_with_bool_and_enum]
+  @enforce_keys [:one, :nullable, :union_with_bool, :union_with_bool_and_enum]
+  defstruct [:one, :optional, :nullable, :arr_one, :arr_nullable, :union_with_bool, :union_with_bool_and_enum]
 
   @type t :: %__MODULE__{
-          arr_nullable: [nil | String.t()] | nil,
-          arr_one: [String.t()] | nil,
-          nullable: nil | String.t(),
           one: String.t(),
           optional: String.t() | nil,
+          nullable: nil | String.t(),
+          arr_one: [String.t()] | nil,
+          arr_nullable: [nil | String.t()] | nil,
           union_with_bool: boolean() | String.t(),
           union_with_bool_and_enum: boolean() | String.t()
         }
@@ -29,11 +29,11 @@ defmodule TopLevel do
 
   def from_map(m) do
     %TopLevel{
-      arr_nullable: m["arrNullable"] && Enum.map(m["arrNullable"], &decode_arr_nullable_element/1),
-      arr_one: m["arrOne"],
-      nullable: m["nullable"],
       one: m["one"],
       optional: m["optional"],
+      nullable: m["nullable"],
+      arr_one: m["arrOne"],
+      arr_nullable: m["arrNullable"] && Enum.map(m["arrNullable"], &decode_arr_nullable_element/1),
       union_with_bool: m["unionWithBool"],
       union_with_bool_and_enum: m["unionWithBoolAndEnum"],
     }
@@ -47,11 +47,11 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "arrNullable" => struct.arr_nullable && Enum.map(struct.arr_nullable, &encode_arr_nullable_element/1),
-      "arrOne" => struct.arr_one,
-      "nullable" => struct.nullable,
       "one" => struct.one,
       "optional" => struct.optional,
+      "nullable" => struct.nullable,
+      "arrOne" => struct.arr_one,
+      "arrNullable" => struct.arr_nullable && Enum.map(struct.arr_nullable, &encode_arr_nullable_element/1),
       "unionWithBool" => struct.union_with_bool,
       "unionWithBoolAndEnum" => struct.union_with_bool_and_enum,
     }
diff --git a/base/schema-elixir/test/inputs/schema/comment-injection.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/comment-injection.schema/default/QuickType.ex
index 56d28c3..7d51702 100644
--- a/base/schema-elixir/test/inputs/schema/comment-injection.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/comment-injection.schema/default/QuickType.ex
@@ -19,28 +19,28 @@ defmodule TopLevel do
   }
   }
   }
+  - `:value` - Property delimiters:*//*{--}\"\"\"</summary> & <br>}}}}}
   - `:trailing_backslash` - Ends with a backslash \\
   - `:trailing_quote` - Ends with a quote "
   - `:trailing_triple_quote` - Ends with a triple quote \"\"\"
-  - `:value` - Property delimiters:*//*{--}\"\"\"</summary> & <br>}}}}}
   """
 
   @enforce_keys [:value]
-  defstruct [:trailing_backslash, :trailing_quote, :trailing_triple_quote, :value]
+  defstruct [:value, :trailing_backslash, :trailing_quote, :trailing_triple_quote]
 
   @type t :: %__MODULE__{
+          value: String.t(),
           trailing_backslash: String.t() | nil,
           trailing_quote: String.t() | nil,
-          trailing_triple_quote: String.t() | nil,
-          value: String.t()
+          trailing_triple_quote: String.t() | nil
         }
 
   def from_map(m) do
     %TopLevel{
+      value: m["value"],
       trailing_backslash: m["trailingBackslash"],
       trailing_quote: m["trailingQuote"],
       trailing_triple_quote: m["trailingTripleQuote"],
-      value: m["value"],
     }
   end
 
@@ -52,10 +52,10 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
+      "value" => struct.value,
       "trailingBackslash" => struct.trailing_backslash,
       "trailingQuote" => struct.trailing_quote,
       "trailingTripleQuote" => struct.trailing_triple_quote,
-      "value" => struct.value,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/const-non-string.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/const-non-string.schema/default/QuickType.ex
index 9dbf0f0..df1be64 100644
--- a/base/schema-elixir/test/inputs/schema/const-non-string.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/const-non-string.schema/default/QuickType.ex
@@ -51,24 +51,24 @@ defmodule Kind do
 end
 
 defmodule TopLevel do
-  @enforce_keys [:amount, :enabled, :kind, :ratio, :version]
-  defstruct [:amount, :enabled, :kind, :ratio, :version]
+  @enforce_keys [:version, :amount, :ratio, :enabled, :kind]
+  defstruct [:version, :amount, :ratio, :enabled, :kind]
 
   @type t :: %__MODULE__{
+          version: float(),
           amount: integer(),
-          enabled: boolean(),
-          kind: Kind.t(),
           ratio: float(),
-          version: float()
+          enabled: boolean(),
+          kind: Kind.t()
         }
 
   def from_map(m) do
     %TopLevel{
+      version: m["version"],
       amount: m["amount"],
+      ratio: m["ratio"],
       enabled: m["enabled"],
       kind: Kind.decode(m["kind"]),
-      ratio: m["ratio"],
-      version: m["version"],
     }
   end
 
@@ -80,11 +80,11 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
+      "version" => struct.version,
       "amount" => struct.amount,
+      "ratio" => struct.ratio,
       "enabled" => struct.enabled,
       "kind" => Kind.encode(struct.kind),
-      "ratio" => struct.ratio,
-      "version" => struct.version,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/date-time-or-string.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/date-time-or-string.schema/default/QuickType.ex
index 44ed170..c2e5219 100644
--- a/base/schema-elixir/test/inputs/schema/date-time-or-string.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/date-time-or-string.schema/default/QuickType.ex
@@ -6,18 +6,18 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:bar, :foo]
-  defstruct [:bar, :foo]
+  @enforce_keys [:foo, :bar]
+  defstruct [:foo, :bar]
 
   @type t :: %__MODULE__{
-          bar: String.t(),
-          foo: String.t()
+          foo: String.t(),
+          bar: String.t()
         }
 
   def from_map(m) do
     %TopLevel{
-      bar: m["bar"],
       foo: m["foo"],
+      bar: m["bar"],
     }
   end
 
@@ -29,8 +29,8 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "bar" => struct.bar,
       "foo" => struct.foo,
+      "bar" => struct.bar,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/date-time.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/date-time.schema/default/QuickType.ex
index 915dc4c..1ecc2ef 100644
--- a/base/schema-elixir/test/inputs/schema/date-time.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/date-time.schema/default/QuickType.ex
@@ -6,15 +6,15 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:complex_union_array, :date, :date_time, :time, :union_array]
-  defstruct [:complex_union_array, :date, :date_time, :time, :union_array]
+  @enforce_keys [:date, :time, :date_time, :union_array, :complex_union_array]
+  defstruct [:date, :time, :date_time, :union_array, :complex_union_array]
 
   @type t :: %__MODULE__{
-          complex_union_array: [integer() | String.t()],
           date: String.t(),
-          date_time: String.t(),
           time: String.t(),
-          union_array: [String.t()]
+          date_time: String.t(),
+          union_array: [String.t()],
+          complex_union_array: [integer() | String.t()]
         }
 
   def decode_complex_union_array_element(value) when is_integer(value), do: value
@@ -27,11 +27,11 @@ defmodule TopLevel do
 
   def from_map(m) do
     %TopLevel{
-      complex_union_array: Enum.map(m["complex-union-array"], &decode_complex_union_array_element/1),
       date: m["date"],
-      date_time: m["date-time"],
       time: m["time"],
+      date_time: m["date-time"],
       union_array: m["union-array"],
+      complex_union_array: Enum.map(m["complex-union-array"], &decode_complex_union_array_element/1),
     }
   end
 
@@ -43,11 +43,11 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "complex-union-array" => struct.complex_union_array && Enum.map(struct.complex_union_array, &encode_complex_union_array_element/1),
       "date" => struct.date,
-      "date-time" => struct.date_time,
       "time" => struct.time,
+      "date-time" => struct.date_time,
       "union-array" => struct.union_array,
+      "complex-union-array" => struct.complex_union_array && Enum.map(struct.complex_union_array, &encode_complex_union_array_element/1),
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/description.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/description.schema/default/QuickType.ex
index 933eb3d..b4cdcfe 100644
--- a/base/schema-elixir/test/inputs/schema/description.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/description.schema/default/QuickType.ex
@@ -95,20 +95,20 @@ defmodule TopLevel do
   @moduledoc """
   The top-level class.
   Its description has two lines.
-  - `:bar` - A pretty boolean
-  - `:enum` - An enumeration
   - `:union` - Either a number or a string
+  - `:enum` - An enumeration
+  - `:bar` - A pretty boolean
   """
 
-  @enforce_keys [:enum, :object_or_string, :union]
-  defstruct [:bar, :enum, :foo, :object_or_string, :union]
+  @enforce_keys [:union, :enum, :object_or_string]
+  defstruct [:union, :enum, :foo, :bar, :object_or_string]
 
   @type t :: %__MODULE__{
-          bar: boolean() | nil,
+          union: float() | String.t(),
           enum: EnumEnum.t(),
           foo: float() | nil,
-          object_or_string: ObjectOrStringClass.t() | String.t(),
-          union: float() | String.t()
+          bar: boolean() | nil,
+          object_or_string: ObjectOrStringClass.t() | String.t()
         }
 
   def decode_object_or_string(%{"prop" => _,} = value), do: ObjectOrStringClass.from_map(value)
@@ -121,11 +121,11 @@ defmodule TopLevel do
 
   def from_map(m) do
     %TopLevel{
-      bar: m["bar"],
+      union: m["union"],
       enum: EnumEnum.decode(m["enum"]),
       foo: m["foo"],
+      bar: m["bar"],
       object_or_string: decode_object_or_string(m["object-or-string"]),
-      union: m["union"],
     }
   end
 
@@ -137,11 +137,11 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "bar" => struct.bar,
+      "union" => struct.union,
       "enum" => EnumEnum.encode(struct.enum),
       "foo" => struct.foo,
+      "bar" => struct.bar,
       "object-or-string" => encode_object_or_string(struct.object_or_string),
-      "union" => struct.union,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/direct-union.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/direct-union.schema/default/QuickType.ex
index 3e3f57e..01de91b 100644
--- a/base/schema-elixir/test/inputs/schema/direct-union.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/direct-union.schema/default/QuickType.ex
@@ -7,31 +7,13 @@
 
 defmodule Thing do
   @enforce_keys [:required]
-  defstruct [:optional, :required]
+  defstruct [:required, :optional]
 
   @type t :: %__MODULE__{
-          optional: [any()] | boolean() | float() | integer() | %{String.t() => any()} | nil | String.t() | nil,
-          required: [any()] | boolean() | float() | integer() | %{String.t() => any()} | nil | String.t()
+          required: [any()] | boolean() | float() | integer() | %{String.t() => any()} | nil | String.t(),
+          optional: [any()] | boolean() | float() | integer() | %{String.t() => any()} | nil | String.t() | nil
         }
 
-  def decode_optional(value) when is_boolean(value), do: value
-  def decode_optional(value) when is_float(value), do: value
-  def decode_optional(value) when is_integer(value), do: value
-  def decode_optional(value) when is_nil(value), do: value
-  def decode_optional(value) when is_binary(value), do: value
-  def decode_optional(value) when is_list(value), do: value
-  def decode_optional(value) when is_map(value), do: value
-  def decode_optional(_), do: {:error, "Unexpected type when decoding Thing.optional"}
-
-  def encode_optional(value) when is_boolean(value), do: value
-  def encode_optional(value) when is_float(value), do: value
-  def encode_optional(value) when is_integer(value), do: value
-  def encode_optional(value) when is_nil(value), do: value
-  def encode_optional(value) when is_binary(value), do: value
-  def encode_optional(value) when is_list(value), do: value
-  def encode_optional(value) when is_map(value), do: value
-  def encode_optional(_), do: {:error, "Unexpected type when encoding Thing.optional"}
-
   def decode_required(value) when is_boolean(value), do: value
   def decode_required(value) when is_float(value), do: value
   def decode_required(value) when is_integer(value), do: value
@@ -50,10 +32,28 @@ defmodule Thing do
   def encode_required(value) when is_map(value), do: value
   def encode_required(_), do: {:error, "Unexpected type when encoding Thing.required"}
 
+  def decode_optional(value) when is_boolean(value), do: value
+  def decode_optional(value) when is_float(value), do: value
+  def decode_optional(value) when is_integer(value), do: value
+  def decode_optional(value) when is_nil(value), do: value
+  def decode_optional(value) when is_binary(value), do: value
+  def decode_optional(value) when is_list(value), do: value
+  def decode_optional(value) when is_map(value), do: value
+  def decode_optional(_), do: {:error, "Unexpected type when decoding Thing.optional"}
+
+  def encode_optional(value) when is_boolean(value), do: value
+  def encode_optional(value) when is_float(value), do: value
+  def encode_optional(value) when is_integer(value), do: value
+  def encode_optional(value) when is_nil(value), do: value
+  def encode_optional(value) when is_binary(value), do: value
+  def encode_optional(value) when is_list(value), do: value
+  def encode_optional(value) when is_map(value), do: value
+  def encode_optional(_), do: {:error, "Unexpected type when encoding Thing.optional"}
+
   def from_map(m) do
     %Thing{
-      optional: decode_optional(m["optional"]),
       required: decode_required(m["required"]),
+      optional: decode_optional(m["optional"]),
     }
   end
 
@@ -65,8 +65,8 @@ defmodule Thing do
 
   def to_map(struct) do
     %{
-      "optional" => encode_optional(struct.optional),
       "required" => encode_required(struct.required),
+      "optional" => encode_optional(struct.optional),
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/enum.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/enum.schema/default/QuickType.ex
index ad3cb12..21fefe2 100644
--- a/base/schema-elixir/test/inputs/schema/enum.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/enum.schema/default/QuickType.ex
@@ -148,14 +148,14 @@ end
 
 defmodule TopLevel do
   @enforce_keys [:gve]
-  defstruct [:arr, :for, :gve, :lvc, :other_arr]
+  defstruct [:lvc, :gve, :arr, :other_arr, :for]
 
   @type t :: %__MODULE__{
-          arr: [OtherArr.t() | integer()] | nil,
-          for: String.t() | nil,
-          gve: Gve.t(),
           lvc: Lvc.t() | nil,
-          other_arr: [OtherArr.t()] | nil
+          gve: Gve.t(),
+          arr: [OtherArr.t() | integer()] | nil,
+          other_arr: [OtherArr.t()] | nil,
+          for: String.t() | nil
         }
 
   def decode_arr_element(value) when is_binary(value), do: OtherArr.decode(value)
@@ -168,11 +168,11 @@ defmodule TopLevel do
 
   def from_map(m) do
     %TopLevel{
-      arr: m["arr"] && Enum.map(m["arr"], &decode_arr_element/1),
-      for: m["for"],
-      gve: Gve.decode(m["gve"]),
       lvc: m["lvc"] && Lvc.decode(m["lvc"]),
+      gve: Gve.decode(m["gve"]),
+      arr: m["arr"] && Enum.map(m["arr"], &decode_arr_element/1),
       other_arr: m["otherArr"] && Enum.map(m["otherArr"], &OtherArr.decode/1),
+      for: m["for"],
     }
   end
 
@@ -184,11 +184,11 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "arr" => struct.arr && Enum.map(struct.arr, &encode_arr_element/1),
-      "for" => struct.for,
-      "gve" => Gve.encode(struct.gve),
       "lvc" => struct.lvc && Lvc.encode(struct.lvc),
+      "gve" => Gve.encode(struct.gve),
+      "arr" => struct.arr && Enum.map(struct.arr, &encode_arr_element/1),
       "otherArr" => struct.other_arr && Enum.map(struct.other_arr, &OtherArr.encode/1),
+      "for" => struct.for,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/integer-string.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/integer-string.schema/default/QuickType.ex
index 55627bf..5cc7034 100644
--- a/base/schema-elixir/test/inputs/schema/integer-string.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/integer-string.schema/default/QuickType.ex
@@ -6,15 +6,15 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:nullable, :one, :union_with_int, :union_with_int_and_enum]
-  defstruct [:arr_nullable, :arr_one, :nullable, :one, :optional, :union_with_int, :union_with_int_and_enum]
+  @enforce_keys [:one, :nullable, :union_with_int, :union_with_int_and_enum]
+  defstruct [:one, :optional, :nullable, :arr_one, :arr_nullable, :union_with_int, :union_with_int_and_enum]
 
   @type t :: %__MODULE__{
-          arr_nullable: [nil | String.t()] | nil,
-          arr_one: [String.t()] | nil,
-          nullable: nil | String.t(),
           one: String.t(),
           optional: String.t() | nil,
+          nullable: nil | String.t(),
+          arr_one: [String.t()] | nil,
+          arr_nullable: [nil | String.t()] | nil,
           union_with_int: integer() | String.t(),
           union_with_int_and_enum: integer() | String.t()
         }
@@ -29,11 +29,11 @@ defmodule TopLevel do
 
   def from_map(m) do
     %TopLevel{
-      arr_nullable: m["arrNullable"] && Enum.map(m["arrNullable"], &decode_arr_nullable_element/1),
-      arr_one: m["arrOne"],
-      nullable: m["nullable"],
       one: m["one"],
       optional: m["optional"],
+      nullable: m["nullable"],
+      arr_one: m["arrOne"],
+      arr_nullable: m["arrNullable"] && Enum.map(m["arrNullable"], &decode_arr_nullable_element/1),
       union_with_int: m["unionWithInt"],
       union_with_int_and_enum: m["unionWithIntAndEnum"],
     }
@@ -47,11 +47,11 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "arrNullable" => struct.arr_nullable && Enum.map(struct.arr_nullable, &encode_arr_nullable_element/1),
-      "arrOne" => struct.arr_one,
-      "nullable" => struct.nullable,
       "one" => struct.one,
       "optional" => struct.optional,
+      "nullable" => struct.nullable,
+      "arrOne" => struct.arr_one,
+      "arrNullable" => struct.arr_nullable && Enum.map(struct.arr_nullable, &encode_arr_nullable_element/1),
       "unionWithInt" => struct.union_with_int,
       "unionWithIntAndEnum" => struct.union_with_int_and_enum,
     }
diff --git a/base/schema-elixir/test/inputs/schema/integer-type.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/integer-type.schema/default/QuickType.ex
index 41efa9c..82b05ae 100644
--- a/base/schema-elixir/test/inputs/schema/integer-type.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/integer-type.schema/default/QuickType.ex
@@ -6,32 +6,32 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:above_i32_max, :below_i32_min, :i32_range, :large_bounds, :only_maximum, :only_minimum, :small_negative, :small_positive, :unbounded]
-  defstruct [:above_i32_max, :below_i32_min, :i32_range, :large_bounds, :only_maximum, :only_minimum, :small_negative, :small_positive, :unbounded]
+  @enforce_keys [:small_positive, :small_negative, :i32_range, :above_i32_max, :below_i32_min, :only_minimum, :only_maximum, :unbounded, :large_bounds]
+  defstruct [:small_positive, :small_negative, :i32_range, :above_i32_max, :below_i32_min, :only_minimum, :only_maximum, :unbounded, :large_bounds]
 
   @type t :: %__MODULE__{
+          small_positive: integer(),
+          small_negative: integer(),
+          i32_range: integer(),
           above_i32_max: integer(),
           below_i32_min: integer(),
-          i32_range: integer(),
-          large_bounds: integer(),
-          only_maximum: integer(),
           only_minimum: integer(),
-          small_negative: integer(),
-          small_positive: integer(),
-          unbounded: integer()
+          only_maximum: integer(),
+          unbounded: integer(),
+          large_bounds: integer()
         }
 
   def from_map(m) do
     %TopLevel{
+      small_positive: m["small_positive"],
+      small_negative: m["small_negative"],
+      i32_range: m["i32_range"],
       above_i32_max: m["above_i32_max"],
       below_i32_min: m["below_i32_min"],
-      i32_range: m["i32_range"],
-      large_bounds: m["large_bounds"],
-      only_maximum: m["only_maximum"],
       only_minimum: m["only_minimum"],
-      small_negative: m["small_negative"],
-      small_positive: m["small_positive"],
+      only_maximum: m["only_maximum"],
       unbounded: m["unbounded"],
+      large_bounds: m["large_bounds"],
     }
   end
 
@@ -43,15 +43,15 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
+      "small_positive" => struct.small_positive,
+      "small_negative" => struct.small_negative,
+      "i32_range" => struct.i32_range,
       "above_i32_max" => struct.above_i32_max,
       "below_i32_min" => struct.below_i32_min,
-      "i32_range" => struct.i32_range,
-      "large_bounds" => struct.large_bounds,
-      "only_maximum" => struct.only_maximum,
       "only_minimum" => struct.only_minimum,
-      "small_negative" => struct.small_negative,
-      "small_positive" => struct.small_positive,
+      "only_maximum" => struct.only_maximum,
       "unbounded" => struct.unbounded,
+      "large_bounds" => struct.large_bounds,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/keyword-unions.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/keyword-unions.schema/default/QuickType.ex
index 4d138dd..ed09464 100644
--- a/base/schema-elixir/test/inputs/schema/keyword-unions.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/keyword-unions.schema/default/QuickType.ex
@@ -8010,7 +8010,7 @@ defmodule Yield do
 end
 
 defmodule TopLevel do
-  defstruct [:empty, :top_level_bool, :complex, :imaginery, :abstract, :alignas, :alignof, :top_level_and, :and_eq, :top_level_any, :any, :array, :as, :asm, :assert, :associatedtype, :associativity, :async, :atomic, :atomic_cancel, :atomic_commit, :atomic_noexcept, :auto, :await, :base, :bitand, :bitor, :bool, :bool_1, :boolean, :break, :bycopy, :byref, :byte, :case, :top_level_catch, :chan, :char, :char16_t, :char32_t, :checked, :top_level_class, :class, :co_await, :co_return, :co_yield, :compl, :concept, :console, :const, :const_cast, :constexpr, :constructor, :continue, :convenience, :convert, :converter, :date, :date_parse_handling, :debugger, :decimal, :declare, :decltype, :decode_string, :top_level_def, :default, :defer, :deinit, :del, :delegate, :delete, :dict, :dictionary, :did_set, :top_level_do, :double, :dummy, :dynamic, :dynamic_cast, :elif, :top_level_else, :encode_quick_type, :enum, :event, :except, :exception, :explicit, :export, :exposing, :extends, :extension, :extern, :fallthrough, :false_1, :top_level_false, :fileprivate, :final, :finally, :fixed, :float, :for, :foreach, :friend, :from, :from_json, :func, :function, :get, :global, :go, :goto, :guard, :has_own_property, :id, :if, :imp, :implements, :implicit, :top_level_import, :top_level_in, :indirect, :infix, :init, :inline, :inout, :instanceof, :int, :interface, :internal, :is, :iterable, :jdec, :jenc, :jpipe, :json, :json_converter, :json_serializer, :json_token, :json_writer, :lambda, :lazy, :left, :let, :list, :lock, :long, :map, :metadata_property_handling, :module, :mutable, :mutating, :namespace, :native, :new, :newtonsoft, :top_level_nil, :no, :noexcept, :nonatomic, :top_level_none, :none, :nonlocal, :nonmutating, :top_level_not, :not_eq, :ns_string, :null, :top_level_null, :nullptr, :number, :object, :of, :oneway, :open, :operator, :optional, :top_level_or, :or_eq, :out, :override, :package, :params, :pass, :port, :postfix, :precedence, :prefix, :print, :printf, :private, :protected, :protocol, :top_level_protocol, :public, :quicktype, :raise, :range, :readonly, :ref, :register, :reinterpret_cast, :repeat, :require, :required, :requires, :restrict, :retain, :rethrows, :return, :right, :sbyte, :sealed, :sel, :select, :self, :top_level_self, :serialize, :set, :short, :signed, :sizeof, :stackalloc, :static, :static_assert, :static_cast, :strictfp, :string, :struct, :subscript, :super, :switch, :symbol, :synchronized, :system, :template, :then, :this, :thread_local, :throw, :throws, :to_json, :top_level, :transient, :top_level_true, :true_1, :try, :type, :top_level_type, :typealias, :typedef, :typeid, :typename, :typeof, :uint, :ulong, :unchecked, :undefined, :union, :unowned, :unsafe, :unsigned, :ushort, :using, :var, :virtual, :void, :volatile, :wchar_t, :weak, :where, :while, :will_set, :with, :xor, :xor_eq, :yes, :yield]
+  defstruct [:empty, :top_level_bool, :complex, :imaginery, :abstract, :alignas, :alignof, :top_level_and, :and_eq, :top_level_any, :any, :array, :as, :asm, :assert, :associatedtype, :associativity, :async, :atomic, :atomic_cancel, :atomic_commit, :atomic_noexcept, :auto, :await, :base, :bitand, :bitor, :bool, :bool_1, :boolean, :break, :bycopy, :byref, :byte, :case, :top_level_catch, :chan, :char, :char16_t, :char32_t, :checked, :top_level_class, :class, :co_await, :co_return, :co_yield, :compl, :concept, :console, :const, :const_cast, :constexpr, :constructor, :continue, :convenience, :convert, :converter, :date, :date_parse_handling, :debugger, :decimal, :declare, :decltype, :decode_string, :top_level_def, :default, :defer, :deinit, :del, :delegate, :delete, :dict, :dictionary, :did_set, :top_level_do, :double, :dynamic, :dynamic_cast, :elif, :top_level_else, :encode_quick_type, :enum, :event, :except, :exception, :explicit, :export, :exposing, :extends, :extension, :extern, :fallthrough, :false_1, :top_level_false, :fileprivate, :final, :finally, :fixed, :float, :for, :foreach, :friend, :from, :from_json, :func, :function, :get, :global, :go, :goto, :guard, :has_own_property, :id, :if, :imp, :implements, :implicit, :top_level_import, :top_level_in, :indirect, :infix, :init, :inline, :inout, :instanceof, :int, :interface, :internal, :iterable, :is, :jdec, :jenc, :jpipe, :json, :json_converter, :json_serializer, :json_token, :json_writer, :lambda, :lazy, :left, :let, :list, :lock, :long, :map, :metadata_property_handling, :module, :mutable, :mutating, :namespace, :native, :new, :newtonsoft, :top_level_nil, :no, :noexcept, :nonatomic, :top_level_none, :none, :nonlocal, :nonmutating, :top_level_not, :not_eq, :ns_string, :null, :top_level_null, :nullptr, :number, :object, :of, :oneway, :open, :operator, :optional, :top_level_or, :or_eq, :out, :override, :package, :params, :pass, :port, :postfix, :precedence, :prefix, :print, :printf, :private, :protected, :protocol, :top_level_protocol, :public, :quicktype, :raise, :range, :readonly, :ref, :register, :reinterpret_cast, :repeat, :require, :required, :requires, :restrict, :retain, :rethrows, :return, :right, :sbyte, :sealed, :sel, :select, :self, :top_level_self, :serialize, :set, :short, :signed, :sizeof, :stackalloc, :static, :static_assert, :static_cast, :strictfp, :string, :struct, :subscript, :super, :switch, :symbol, :synchronized, :system, :template, :then, :this, :thread_local, :throw, :throws, :to_json, :top_level, :transient, :top_level_true, :true_1, :try, :type, :top_level_type, :typealias, :typedef, :typeid, :typename, :typeof, :uint, :ulong, :unchecked, :undefined, :union, :unowned, :unsafe, :unsigned, :ushort, :using, :var, :virtual, :void, :volatile, :wchar_t, :weak, :where, :while, :will_set, :with, :xor, :xor_eq, :yes, :yield, :dummy]
 
   @type t :: %__MODULE__{
           empty: Empty.t() | float() | nil,
@@ -8089,7 +8089,6 @@ defmodule TopLevel do
           did_set: DidSet.t() | float() | nil,
           top_level_do: DoClass.t() | float() | nil,
           double: Double.t() | float() | nil,
-          dummy: float() | nil,
           dynamic: Dynamic.t() | float() | nil,
           dynamic_cast: DynamicCast.t() | float() | nil,
           elif: Elif.t() | float() | nil,
@@ -8142,8 +8141,8 @@ defmodule TopLevel do
           int: Int.t() | float() | nil,
           interface: Interface.t() | float() | nil,
           internal: Internal.t() | float() | nil,
-          is: Is.t() | float() | nil,
           iterable: Iterable.t() | float() | nil,
+          is: Is.t() | float() | nil,
           jdec: Jdec.t() | float() | nil,
           jenc: Jenc.t() | float() | nil,
           jpipe: Jpipe.t() | float() | nil,
@@ -8289,7 +8288,8 @@ defmodule TopLevel do
           xor: Xor.t() | float() | nil,
           xor_eq: XorEq.t() | float() | nil,
           yes: Yes.t() | float() | nil,
-          yield: Yield.t() | float() | nil
+          yield: Yield.t() | float() | nil,
+          dummy: float() | nil
         }
 
   def decode_empty(%{} = value), do: Empty.from_map(value)
@@ -9828,18 +9828,6 @@ defmodule TopLevel do
   def encode_internal(value) when is_nil(value), do: value
   def encode_internal(_), do: {:error, "Unexpected type when encoding TopLevel.internal"}
 
-  def decode_is(%{} = value), do: Is.from_map(value)
-  def decode_is(value) when is_float(value), do: value
-  def decode_is(value) when is_integer(value), do: value
-  def decode_is(value) when is_nil(value), do: value
-  def decode_is(_), do: {:error, "Unexpected type when decoding TopLevel.is"}
-
-  def encode_is(%Is{} = value), do: Is.to_map(value)
-  def encode_is(value) when is_float(value), do: value
-  def encode_is(value) when is_integer(value), do: value
-  def encode_is(value) when is_nil(value), do: value
-  def encode_is(_), do: {:error, "Unexpected type when encoding TopLevel.is"}
-
   def decode_iterable(%{} = value), do: Iterable.from_map(value)
   def decode_iterable(value) when is_float(value), do: value
   def decode_iterable(value) when is_integer(value), do: value
@@ -9852,6 +9840,18 @@ defmodule TopLevel do
   def encode_iterable(value) when is_nil(value), do: value
   def encode_iterable(_), do: {:error, "Unexpected type when encoding TopLevel.iterable"}
 
+  def decode_is(%{} = value), do: Is.from_map(value)
+  def decode_is(value) when is_float(value), do: value
+  def decode_is(value) when is_integer(value), do: value
+  def decode_is(value) when is_nil(value), do: value
+  def decode_is(_), do: {:error, "Unexpected type when decoding TopLevel.is"}
+
+  def encode_is(%Is{} = value), do: Is.to_map(value)
+  def encode_is(value) when is_float(value), do: value
+  def encode_is(value) when is_integer(value), do: value
+  def encode_is(value) when is_nil(value), do: value
+  def encode_is(_), do: {:error, "Unexpected type when encoding TopLevel.is"}
+
   def decode_jdec(%{} = value), do: Jdec.from_map(value)
   def decode_jdec(value) when is_float(value), do: value
   def decode_jdec(value) when is_integer(value), do: value
@@ -11682,7 +11682,6 @@ defmodule TopLevel do
       did_set: decode_did_set(m["didSet"]),
       top_level_do: decode_top_level_do(m["do"]),
       double: decode_double(m["double"]),
-      dummy: m["dummy"],
       dynamic: decode_dynamic(m["dynamic"]),
       dynamic_cast: decode_dynamic_cast(m["dynamic_cast"]),
       elif: decode_elif(m["elif"]),
@@ -11735,8 +11734,8 @@ defmodule TopLevel do
       int: decode_int(m["int"]),
       interface: decode_interface(m["interface"]),
       internal: decode_internal(m["internal"]),
-      is: decode_is(m["is"]),
       iterable: decode_iterable(m["iterable"]),
+      is: decode_is(m["is"]),
       jdec: decode_jdec(m["jdec"]),
       jenc: decode_jenc(m["jenc"]),
       jpipe: decode_jpipe(m["jpipe"]),
@@ -11883,6 +11882,7 @@ defmodule TopLevel do
       xor_eq: decode_xor_eq(m["xor_eq"]),
       yes: decode_yes(m["YES"]),
       yield: decode_yield(m["yield"]),
+      dummy: m["dummy"],
     }
   end
 
@@ -11970,7 +11970,6 @@ defmodule TopLevel do
       "didSet" => encode_did_set(struct.did_set),
       "do" => encode_top_level_do(struct.top_level_do),
       "double" => encode_double(struct.double),
-      "dummy" => struct.dummy,
       "dynamic" => encode_dynamic(struct.dynamic),
       "dynamic_cast" => encode_dynamic_cast(struct.dynamic_cast),
       "elif" => encode_elif(struct.elif),
@@ -12023,8 +12022,8 @@ defmodule TopLevel do
       "int" => encode_int(struct.int),
       "interface" => encode_interface(struct.interface),
       "internal" => encode_internal(struct.internal),
-      "is" => encode_is(struct.is),
       "iterable" => encode_iterable(struct.iterable),
+      "is" => encode_is(struct.is),
       "jdec" => encode_jdec(struct.jdec),
       "jenc" => encode_jenc(struct.jenc),
       "jpipe" => encode_jpipe(struct.jpipe),
@@ -12171,6 +12170,7 @@ defmodule TopLevel do
       "xor_eq" => encode_xor_eq(struct.xor_eq),
       "YES" => encode_yes(struct.yes),
       "yield" => encode_yield(struct.yield),
+      "dummy" => struct.dummy,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/light.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/light.schema/default/QuickType.ex
index dbafcde..6f1232a 100644
--- a/base/schema-elixir/test/inputs/schema/light.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/light.schema/default/QuickType.ex
@@ -6,19 +6,19 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule LightParams do
-  @enforce_keys [:app_id, :outlet_id, :rgba]
-  defstruct [:app_id, :outlet_id, :rgba]
+  @enforce_keys [:outlet_id, :app_id, :rgba]
+  defstruct [:outlet_id, :app_id, :rgba]
 
   @type t :: %__MODULE__{
-          app_id: String.t(),
           outlet_id: String.t(),
+          app_id: String.t(),
           rgba: String.t()
         }
 
   def from_map(m) do
     %LightParams{
-      app_id: m["app_id"],
       outlet_id: m["outlet_id"],
+      app_id: m["app_id"],
       rgba: m["rgba"],
     }
   end
@@ -31,8 +31,8 @@ defmodule LightParams do
 
   def to_map(struct) do
     %{
-      "app_id" => struct.app_id,
       "outlet_id" => struct.outlet_id,
+      "app_id" => struct.app_id,
       "rgba" => struct.rgba,
     }
   end
diff --git a/base/schema-elixir/test/inputs/schema/min-max-items.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/min-max-items.schema/default/QuickType.ex
index afebffa..56a92c0 100644
--- a/base/schema-elixir/test/inputs/schema/min-max-items.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/min-max-items.schema/default/QuickType.ex
@@ -6,13 +6,13 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:max_only, :min_and_max, :min_only, :plain, :union_items]
-  defstruct [:max_only, :min_and_max, :min_only, :plain, :union_items]
+  @enforce_keys [:min_only, :max_only, :min_and_max, :plain, :union_items]
+  defstruct [:min_only, :max_only, :min_and_max, :plain, :union_items]
 
   @type t :: %__MODULE__{
+          min_only: [String.t()],
           max_only: [integer()],
           min_and_max: [float()],
-          min_only: [String.t()],
           plain: [String.t()],
           union_items: [integer() | String.t()]
         }
@@ -27,9 +27,9 @@ defmodule TopLevel do
 
   def from_map(m) do
     %TopLevel{
+      min_only: m["minOnly"],
       max_only: m["maxOnly"],
       min_and_max: m["minAndMax"],
-      min_only: m["minOnly"],
       plain: m["plain"],
       union_items: Enum.map(m["unionItems"], &decode_union_items_element/1),
     }
@@ -43,9 +43,9 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
+      "minOnly" => struct.min_only,
       "maxOnly" => struct.max_only,
       "minAndMax" => struct.min_and_max,
-      "minOnly" => struct.min_only,
       "plain" => struct.plain,
       "unionItems" => struct.union_items && Enum.map(struct.union_items, &encode_union_items_element/1),
     }
diff --git a/base/schema-elixir/test/inputs/schema/minmax-integer.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/minmax-integer.schema/default/QuickType.ex
index 7e95e06..dc39622 100644
--- a/base/schema-elixir/test/inputs/schema/minmax-integer.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/minmax-integer.schema/default/QuickType.ex
@@ -6,30 +6,30 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:free, :intersection, :max, :min, :minmax, :min_max_intersection, :min_max_union, :union]
-  defstruct [:free, :intersection, :max, :min, :minmax, :min_max_intersection, :min_max_union, :union]
+  @enforce_keys [:free, :min, :max, :minmax, :union, :min_max_union, :intersection, :min_max_intersection]
+  defstruct [:free, :min, :max, :minmax, :union, :min_max_union, :intersection, :min_max_intersection]
 
   @type t :: %__MODULE__{
           free: integer(),
-          intersection: integer(),
-          max: integer(),
           min: integer(),
+          max: integer(),
           minmax: integer(),
-          min_max_intersection: integer(),
+          union: integer(),
           min_max_union: integer(),
-          union: integer()
+          intersection: integer(),
+          min_max_intersection: integer()
         }
 
   def from_map(m) do
     %TopLevel{
       free: m["free"],
-      intersection: m["intersection"],
-      max: m["max"],
       min: m["min"],
+      max: m["max"],
       minmax: m["minmax"],
-      min_max_intersection: m["minMaxIntersection"],
-      min_max_union: m["minMaxUnion"],
       union: m["union"],
+      min_max_union: m["minMaxUnion"],
+      intersection: m["intersection"],
+      min_max_intersection: m["minMaxIntersection"],
     }
   end
 
@@ -42,13 +42,13 @@ defmodule TopLevel do
   def to_map(struct) do
     %{
       "free" => struct.free,
-      "intersection" => struct.intersection,
-      "max" => struct.max,
       "min" => struct.min,
+      "max" => struct.max,
       "minmax" => struct.minmax,
-      "minMaxIntersection" => struct.min_max_intersection,
-      "minMaxUnion" => struct.min_max_union,
       "union" => struct.union,
+      "minMaxUnion" => struct.min_max_union,
+      "intersection" => struct.intersection,
+      "minMaxIntersection" => struct.min_max_intersection,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/minmax.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/minmax.schema/default/QuickType.ex
index 3e7b3cf..a516f17 100644
--- a/base/schema-elixir/test/inputs/schema/minmax.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/minmax.schema/default/QuickType.ex
@@ -6,30 +6,30 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:free, :intersection, :max, :min, :minmax, :min_max_intersection, :min_max_union, :union]
-  defstruct [:free, :intersection, :max, :min, :minmax, :min_max_intersection, :min_max_union, :union]
+  @enforce_keys [:free, :min, :max, :minmax, :union, :min_max_union, :intersection, :min_max_intersection]
+  defstruct [:free, :min, :max, :minmax, :union, :min_max_union, :intersection, :min_max_intersection]
 
   @type t :: %__MODULE__{
           free: float(),
-          intersection: float(),
-          max: float(),
           min: float(),
+          max: float(),
           minmax: float(),
-          min_max_intersection: float(),
+          union: float(),
           min_max_union: float(),
-          union: float()
+          intersection: float(),
+          min_max_intersection: float()
         }
 
   def from_map(m) do
     %TopLevel{
       free: m["free"],
-      intersection: m["intersection"],
-      max: m["max"],
       min: m["min"],
+      max: m["max"],
       minmax: m["minmax"],
-      min_max_intersection: m["minMaxIntersection"],
-      min_max_union: m["minMaxUnion"],
       union: m["union"],
+      min_max_union: m["minMaxUnion"],
+      intersection: m["intersection"],
+      min_max_intersection: m["minMaxIntersection"],
     }
   end
 
@@ -42,13 +42,13 @@ defmodule TopLevel do
   def to_map(struct) do
     %{
       "free" => struct.free,
-      "intersection" => struct.intersection,
-      "max" => struct.max,
       "min" => struct.min,
+      "max" => struct.max,
       "minmax" => struct.minmax,
-      "minMaxIntersection" => struct.min_max_intersection,
-      "minMaxUnion" => struct.min_max_union,
       "union" => struct.union,
+      "minMaxUnion" => struct.min_max_union,
+      "intersection" => struct.intersection,
+      "minMaxIntersection" => struct.min_max_intersection,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/minmaxlength.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/minmaxlength.schema/default/QuickType.ex
index 31656f4..708ca9f 100644
--- a/base/schema-elixir/test/inputs/schema/minmaxlength.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/minmaxlength.schema/default/QuickType.ex
@@ -6,30 +6,30 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:intersection, :in_union, :maxlength, :minlength, :min_max_intersection, :minmaxlength, :min_max_union, :union]
-  defstruct [:intersection, :in_union, :maxlength, :minlength, :min_max_intersection, :minmaxlength, :min_max_union, :union]
+  @enforce_keys [:minlength, :maxlength, :minmaxlength, :union, :in_union, :min_max_union, :intersection, :min_max_intersection]
+  defstruct [:minlength, :maxlength, :minmaxlength, :union, :in_union, :min_max_union, :intersection, :min_max_intersection]
 
   @type t :: %__MODULE__{
-          intersection: String.t(),
-          in_union: float() | String.t(),
-          maxlength: String.t(),
           minlength: String.t(),
-          min_max_intersection: String.t(),
+          maxlength: String.t(),
           minmaxlength: String.t(),
+          union: String.t(),
+          in_union: float() | String.t(),
           min_max_union: String.t(),
-          union: String.t()
+          intersection: String.t(),
+          min_max_intersection: String.t()
         }
 
   def from_map(m) do
     %TopLevel{
-      intersection: m["intersection"],
-      in_union: m["inUnion"],
-      maxlength: m["maxlength"],
       minlength: m["minlength"],
-      min_max_intersection: m["minMaxIntersection"],
+      maxlength: m["maxlength"],
       minmaxlength: m["minmaxlength"],
-      min_max_union: m["minMaxUnion"],
       union: m["union"],
+      in_union: m["inUnion"],
+      min_max_union: m["minMaxUnion"],
+      intersection: m["intersection"],
+      min_max_intersection: m["minMaxIntersection"],
     }
   end
 
@@ -41,14 +41,14 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "intersection" => struct.intersection,
-      "inUnion" => struct.in_union,
-      "maxlength" => struct.maxlength,
       "minlength" => struct.minlength,
-      "minMaxIntersection" => struct.min_max_intersection,
+      "maxlength" => struct.maxlength,
       "minmaxlength" => struct.minmaxlength,
-      "minMaxUnion" => struct.min_max_union,
       "union" => struct.union,
+      "inUnion" => struct.in_union,
+      "minMaxUnion" => struct.min_max_union,
+      "intersection" => struct.intersection,
+      "minMaxIntersection" => struct.min_max_intersection,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/non-standard-ref.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/non-standard-ref.schema/default/QuickType.ex
index e3d5cc2..c24a315 100644
--- a/base/schema-elixir/test/inputs/schema/non-standard-ref.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/non-standard-ref.schema/default/QuickType.ex
@@ -6,19 +6,19 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:bar, :foo, :quux]
-  defstruct [:bar, :foo, :quux]
+  @enforce_keys [:foo, :bar, :quux]
+  defstruct [:foo, :bar, :quux]
 
   @type t :: %__MODULE__{
-          bar: integer(),
           foo: integer(),
+          bar: integer(),
           quux: boolean()
         }
 
   def from_map(m) do
     %TopLevel{
-      bar: m["bar"],
       foo: m["foo"],
+      bar: m["bar"],
       quux: m["quux"],
     }
   end
@@ -31,8 +31,8 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "bar" => struct.bar,
       "foo" => struct.foo,
+      "bar" => struct.bar,
       "quux" => struct.quux,
     }
   end
diff --git a/base/schema-elixir/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.ex
index 64df667..ef9fb95 100644
--- a/base/schema-elixir/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.ex
@@ -53,17 +53,17 @@ end
 
 defmodule TopLevel do
   @enforce_keys [:kind]
-  defstruct [:b, :kind]
+  defstruct [:kind, :b]
 
   @type t :: %__MODULE__{
-          b: nil | String.t() | nil,
-          kind: Kind.t()
+          kind: Kind.t(),
+          b: nil | String.t() | nil
         }
 
   def from_map(m) do
     %TopLevel{
-      b: m["b"],
       kind: Kind.decode(m["kind"]),
+      b: m["b"],
     }
   end
 
@@ -75,8 +75,8 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "b" => struct.b,
       "kind" => Kind.encode(struct.kind),
+      "b" => struct.b,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/optional-const-ref.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/optional-const-ref.schema/default/QuickType.ex
index d7c96a5..d369376 100644
--- a/base/schema-elixir/test/inputs/schema/optional-const-ref.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/optional-const-ref.schema/default/QuickType.ex
@@ -43,27 +43,27 @@ end
 
 defmodule TopLevel do
   @enforce_keys [:required_coordinates, :required_count, :required_label]
-  defstruct [:coordinates, :count, :label, :required_coordinates, :required_count, :required_label, :weight]
+  defstruct [:coordinates, :required_coordinates, :count, :required_count, :weight, :label, :required_label]
 
   @type t :: %__MODULE__{
           coordinates: [Coordinate.t()] | nil,
-          count: integer() | nil,
-          label: String.t() | nil,
           required_coordinates: [Coordinate.t()],
+          count: integer() | nil,
           required_count: integer(),
-          required_label: String.t(),
-          weight: float() | nil
+          weight: float() | nil,
+          label: String.t() | nil,
+          required_label: String.t()
         }
 
   def from_map(m) do
     %TopLevel{
       coordinates: m["coordinates"] && Enum.map(m["coordinates"], &Coordinate.from_map/1),
-      count: m["count"],
-      label: m["label"],
       required_coordinates: Enum.map(m["requiredCoordinates"], &Coordinate.from_map/1),
+      count: m["count"],
       required_count: m["requiredCount"],
-      required_label: m["requiredLabel"],
       weight: m["weight"],
+      label: m["label"],
+      required_label: m["requiredLabel"],
     }
   end
 
@@ -76,12 +76,12 @@ defmodule TopLevel do
   def to_map(struct) do
     %{
       "coordinates" => struct.coordinates && Enum.map(struct.coordinates, &Coordinate.to_map/1),
-      "count" => struct.count,
-      "label" => struct.label,
       "requiredCoordinates" => struct.required_coordinates && Enum.map(struct.required_coordinates, &Coordinate.to_map/1),
+      "count" => struct.count,
       "requiredCount" => struct.required_count,
-      "requiredLabel" => struct.required_label,
       "weight" => struct.weight,
+      "label" => struct.label,
+      "requiredLabel" => struct.required_label,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/optional-constraints.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/optional-constraints.schema/default/QuickType.ex
index 47dfc9a..b79876b 100644
--- a/base/schema-elixir/test/inputs/schema/optional-constraints.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/optional-constraints.schema/default/QuickType.ex
@@ -7,23 +7,23 @@
 
 defmodule TopLevel do
   @enforce_keys [:req_zero_min]
-  defstruct [:opt_double, :opt_int, :opt_pattern, :opt_string, :req_zero_min]
+  defstruct [:req_zero_min, :opt_int, :opt_double, :opt_string, :opt_pattern]
 
   @type t :: %__MODULE__{
-          opt_double: float() | nil,
+          req_zero_min: integer(),
           opt_int: integer() | nil,
-          opt_pattern: String.t() | nil,
+          opt_double: float() | nil,
           opt_string: String.t() | nil,
-          req_zero_min: integer()
+          opt_pattern: String.t() | nil
         }
 
   def from_map(m) do
     %TopLevel{
-      opt_double: m["optDouble"],
+      req_zero_min: m["reqZeroMin"],
       opt_int: m["optInt"],
-      opt_pattern: m["optPattern"],
+      opt_double: m["optDouble"],
       opt_string: m["optString"],
-      req_zero_min: m["reqZeroMin"],
+      opt_pattern: m["optPattern"],
     }
   end
 
@@ -35,11 +35,11 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "optDouble" => struct.opt_double,
+      "reqZeroMin" => struct.req_zero_min,
       "optInt" => struct.opt_int,
-      "optPattern" => struct.opt_pattern,
+      "optDouble" => struct.opt_double,
       "optString" => struct.opt_string,
-      "reqZeroMin" => struct.req_zero_min,
+      "optPattern" => struct.opt_pattern,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/optional-date-time.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/optional-date-time.schema/default/QuickType.ex
index 81b07fd..b9f93c4 100644
--- a/base/schema-elixir/test/inputs/schema/optional-date-time.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/optional-date-time.schema/default/QuickType.ex
@@ -6,26 +6,26 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:required_date, :required_date_time, :required_time]
-  defstruct [:optional_date, :optional_date_time, :optional_time, :required_date, :required_date_time, :required_time]
+  @enforce_keys [:required_date, :required_time, :required_date_time]
+  defstruct [:required_date, :required_time, :required_date_time, :optional_date, :optional_time, :optional_date_time]
 
   @type t :: %__MODULE__{
-          optional_date: String.t() | nil,
-          optional_date_time: String.t() | nil,
-          optional_time: String.t() | nil,
           required_date: String.t(),
+          required_time: String.t(),
           required_date_time: String.t(),
-          required_time: String.t()
+          optional_date: String.t() | nil,
+          optional_time: String.t() | nil,
+          optional_date_time: String.t() | nil
         }
 
   def from_map(m) do
     %TopLevel{
-      optional_date: m["optional-date"],
-      optional_date_time: m["optional-date-time"],
-      optional_time: m["optional-time"],
       required_date: m["required-date"],
-      required_date_time: m["required-date-time"],
       required_time: m["required-time"],
+      required_date_time: m["required-date-time"],
+      optional_date: m["optional-date"],
+      optional_time: m["optional-time"],
+      optional_date_time: m["optional-date-time"],
     }
   end
 
@@ -37,12 +37,12 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "optional-date" => struct.optional_date,
-      "optional-date-time" => struct.optional_date_time,
-      "optional-time" => struct.optional_time,
       "required-date" => struct.required_date,
-      "required-date-time" => struct.required_date_time,
       "required-time" => struct.required_time,
+      "required-date-time" => struct.required_date_time,
+      "optional-date" => struct.optional_date,
+      "optional-time" => struct.optional_time,
+      "optional-date-time" => struct.optional_date_time,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/prefix-items.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/prefix-items.schema/default/QuickType.ex
index 022b5a3..2958e76 100644
--- a/base/schema-elixir/test/inputs/schema/prefix-items.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/prefix-items.schema/default/QuickType.ex
@@ -6,22 +6,14 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:open, :tuple]
-  defstruct [:open, :tuple]
+  @enforce_keys [:tuple, :open]
+  defstruct [:tuple, :open]
 
   @type t :: %__MODULE__{
-          open: [boolean() | integer()],
-          tuple: [boolean() | integer()]
+          tuple: [boolean() | integer()],
+          open: [boolean() | integer()]
         }
 
-  def decode_open_element(value) when is_boolean(value), do: value
-  def decode_open_element(value) when is_integer(value), do: value
-  def decode_open_element(_), do: {:error, "Unexpected type when decoding TopLevel.open"}
-
-  def encode_open_element(value) when is_boolean(value), do: value
-  def encode_open_element(value) when is_integer(value), do: value
-  def encode_open_element(_), do: {:error, "Unexpected type when encoding TopLevel.open"}
-
   def decode_tuple_element(value) when is_boolean(value), do: value
   def decode_tuple_element(value) when is_integer(value), do: value
   def decode_tuple_element(_), do: {:error, "Unexpected type when decoding TopLevel.tuple"}
@@ -30,10 +22,18 @@ defmodule TopLevel do
   def encode_tuple_element(value) when is_integer(value), do: value
   def encode_tuple_element(_), do: {:error, "Unexpected type when encoding TopLevel.tuple"}
 
+  def decode_open_element(value) when is_boolean(value), do: value
+  def decode_open_element(value) when is_integer(value), do: value
+  def decode_open_element(_), do: {:error, "Unexpected type when decoding TopLevel.open"}
+
+  def encode_open_element(value) when is_boolean(value), do: value
+  def encode_open_element(value) when is_integer(value), do: value
+  def encode_open_element(_), do: {:error, "Unexpected type when encoding TopLevel.open"}
+
   def from_map(m) do
     %TopLevel{
-      open: Enum.map(m["open"], &decode_open_element/1),
       tuple: Enum.map(m["tuple"], &decode_tuple_element/1),
+      open: Enum.map(m["open"], &decode_open_element/1),
     }
   end
 
@@ -45,8 +45,8 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "open" => struct.open && Enum.map(struct.open, &encode_open_element/1),
       "tuple" => struct.tuple && Enum.map(struct.tuple, &encode_tuple_element/1),
+      "open" => struct.open && Enum.map(struct.open, &encode_open_element/1),
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/renaming-bug.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/renaming-bug.schema/default/QuickType.ex
index b13cdbf..eb90ad6 100644
--- a/base/schema-elixir/test/inputs/schema/renaming-bug.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/renaming-bug.schema/default/QuickType.ex
@@ -70,19 +70,19 @@ defmodule CircularShape do
 end
 
 defmodule Part do
-  defstruct [:depth, :length, :width]
+  defstruct [:length, :width, :depth]
 
   @type t :: %__MODULE__{
-          depth: String.t() | nil,
           length: String.t() | nil,
-          width: String.t() | nil
+          width: String.t() | nil,
+          depth: String.t() | nil
         }
 
   def from_map(m) do
     %Part{
-      depth: m["depth"],
       length: m["length"],
       width: m["width"],
+      depth: m["depth"],
     }
   end
 
@@ -94,9 +94,9 @@ defmodule Part do
 
   def to_map(struct) do
     %{
-      "depth" => struct.depth,
       "length" => struct.length,
       "width" => struct.width,
+      "depth" => struct.depth,
     }
   end
 
@@ -207,17 +207,17 @@ defmodule History do
 end
 
 defmodule Shape do
-  defstruct [:geometry, :history]
+  defstruct [:history, :geometry]
 
   @type t :: %__MODULE__{
-          geometry: Geometry.t() | nil,
-          history: History.t() | nil
+          history: History.t() | nil,
+          geometry: Geometry.t() | nil
         }
 
   def from_map(m) do
     %Shape{
-      geometry: m["geometry"] && Geometry.from_map(m["geometry"]),
       history: m["history"] && History.from_map(m["history"]),
+      geometry: m["geometry"] && Geometry.from_map(m["geometry"]),
     }
   end
 
@@ -229,8 +229,8 @@ defmodule Shape do
 
   def to_map(struct) do
     %{
-      "geometry" => struct.geometry && Geometry.to_map(struct.geometry),
       "history" => struct.history && History.to_map(struct.history),
+      "geometry" => struct.geometry && Geometry.to_map(struct.geometry),
     }
   end
 
@@ -242,18 +242,18 @@ defmodule Shape do
 end
 
 defmodule Berry do
-  defstruct [:color, :name, :shapes]
+  defstruct [:name, :color, :shapes]
 
   @type t :: %__MODULE__{
-          color: Color.t() | nil,
           name: String.t() | nil,
+          color: Color.t() | nil,
           shapes: [Shape.t()] | nil
         }
 
   def from_map(m) do
     %Berry{
-      color: m["color"] && Color.from_map(m["color"]),
       name: m["name"],
+      color: m["color"] && Color.from_map(m["color"]),
       shapes: m["shapes"] && Enum.map(m["shapes"], &Shape.from_map/1),
     }
   end
@@ -266,8 +266,8 @@ defmodule Berry do
 
   def to_map(struct) do
     %{
-      "color" => struct.color && Color.to_map(struct.color),
       "name" => struct.name,
+      "color" => struct.color && Color.to_map(struct.color),
       "shapes" => struct.shapes && Enum.map(struct.shapes, &Shape.to_map/1),
     }
   end
@@ -280,19 +280,19 @@ defmodule Berry do
 end
 
 defmodule Fruit do
-  defstruct [:apple, :berries, :orange]
+  defstruct [:apple, :orange, :berries]
 
   @type t :: %__MODULE__{
           apple: boolean() | nil,
-          berries: [Berry.t()] | nil,
-          orange: boolean() | nil
+          orange: boolean() | nil,
+          berries: [Berry.t()] | nil
         }
 
   def from_map(m) do
     %Fruit{
       apple: m["apple"],
-      berries: m["berries"] && Enum.map(m["berries"], &Berry.from_map/1),
       orange: m["orange"],
+      berries: m["berries"] && Enum.map(m["berries"], &Berry.from_map/1),
     }
   end
 
@@ -305,8 +305,8 @@ defmodule Fruit do
   def to_map(struct) do
     %{
       "apple" => struct.apple,
-      "berries" => struct.berries && Enum.map(struct.berries, &Berry.to_map/1),
       "orange" => struct.orange,
+      "berries" => struct.berries && Enum.map(struct.berries, &Berry.to_map/1),
     }
   end
 
@@ -318,17 +318,17 @@ defmodule Fruit do
 end
 
 defmodule Limit do
-  defstruct [:maximum, :minimum]
+  defstruct [:minimum, :maximum]
 
   @type t :: %__MODULE__{
-          maximum: float() | nil,
-          minimum: float() | nil
+          minimum: float() | nil,
+          maximum: float() | nil
         }
 
   def from_map(m) do
     %Limit{
-      maximum: m["maximum"],
       minimum: m["minimum"],
+      maximum: m["maximum"],
     }
   end
 
@@ -340,8 +340,8 @@ defmodule Limit do
 
   def to_map(struct) do
     %{
-      "maximum" => struct.maximum,
       "minimum" => struct.minimum,
+      "maximum" => struct.maximum,
     }
   end
 
@@ -526,25 +526,25 @@ defmodule VehicleType do
 end
 
 defmodule Vehicle do
-  defstruct [:brand, :id, :speed, :sub_module, :type, :year]
+  defstruct [:id, :type, :speed, :year, :brand, :sub_module]
 
   @type t :: %__MODULE__{
-          brand: String.t() | nil,
           id: String.t() | nil,
-          speed: Speed.t() | nil,
-          sub_module: boolean() | nil,
           type: VehicleType.t() | nil,
-          year: String.t() | nil
+          speed: Speed.t() | nil,
+          year: String.t() | nil,
+          brand: String.t() | nil,
+          sub_module: boolean() | nil
         }
 
   def from_map(m) do
     %Vehicle{
-      brand: m["brand"],
       id: m["id"],
-      speed: m["speed"] && Speed.from_map(m["speed"]),
-      sub_module: m["subModule"],
       type: m["type"] && VehicleType.from_map(m["type"]),
+      speed: m["speed"] && Speed.from_map(m["speed"]),
       year: m["year"],
+      brand: m["brand"],
+      sub_module: m["subModule"],
     }
   end
 
@@ -556,12 +556,12 @@ defmodule Vehicle do
 
   def to_map(struct) do
     %{
-      "brand" => struct.brand,
       "id" => struct.id,
-      "speed" => struct.speed && Speed.to_map(struct.speed),
-      "subModule" => struct.sub_module,
       "type" => struct.type && VehicleType.to_map(struct.type),
+      "speed" => struct.speed && Speed.to_map(struct.speed),
       "year" => struct.year,
+      "brand" => struct.brand,
+      "subModule" => struct.sub_module,
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.ex
index 43f4cff..df01c9d 100644
--- a/base/schema-elixir/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.ex
@@ -7,11 +7,11 @@
 
 defmodule NodeClass do
   @enforce_keys [:value]
-  defstruct [:next, :value]
+  defstruct [:value, :next]
 
   @type t :: %__MODULE__{
-          next: NodeClass.t() | nil | String.t() | nil,
-          value: String.t()
+          value: String.t(),
+          next: NodeClass.t() | nil | String.t() | nil
         }
 
   def decode_next(%{"value" => _,} = value), do: NodeClass.from_map(value)
@@ -26,8 +26,8 @@ defmodule NodeClass do
 
   def from_map(m) do
     %NodeClass{
-      next: decode_next(m["next"]),
       value: m["value"],
+      next: decode_next(m["next"]),
     }
   end
 
@@ -39,8 +39,8 @@ defmodule NodeClass do
 
   def to_map(struct) do
     %{
-      "next" => encode_next(struct.next),
       "value" => struct.value,
+      "next" => encode_next(struct.next),
     }
   end
 
@@ -53,11 +53,11 @@ end
 
 defmodule TopLevel do
   @enforce_keys [:value]
-  defstruct [:next, :value]
+  defstruct [:value, :next]
 
   @type t :: %__MODULE__{
-          next: NodeClass.t() | nil | String.t() | nil,
-          value: String.t()
+          value: String.t(),
+          next: NodeClass.t() | nil | String.t() | nil
         }
 
   def decode_next(%{"value" => _,} = value), do: NodeClass.from_map(value)
@@ -72,8 +72,8 @@ defmodule TopLevel do
 
   def from_map(m) do
     %TopLevel{
-      next: decode_next(m["next"]),
       value: m["value"],
+      next: decode_next(m["next"]),
     }
   end
 
@@ -85,8 +85,8 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "next" => encode_next(struct.next),
       "value" => struct.value,
+      "next" => encode_next(struct.next),
     }
   end
 
diff --git a/base/schema-elixir/test/inputs/schema/uuid.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/uuid.schema/default/QuickType.ex
index 602006f..c3e17f9 100644
--- a/base/schema-elixir/test/inputs/schema/uuid.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/uuid.schema/default/QuickType.ex
@@ -6,15 +6,15 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:nullable, :one, :union_with_enum]
-  defstruct [:arr_nullable, :arr_one, :nullable, :one, :optional, :union_with_enum]
+  @enforce_keys [:one, :nullable, :union_with_enum]
+  defstruct [:one, :optional, :nullable, :arr_one, :arr_nullable, :union_with_enum]
 
   @type t :: %__MODULE__{
-          arr_nullable: [nil | String.t()] | nil,
-          arr_one: [String.t()] | nil,
-          nullable: nil | String.t(),
           one: String.t(),
           optional: String.t() | nil,
+          nullable: nil | String.t(),
+          arr_one: [String.t()] | nil,
+          arr_nullable: [nil | String.t()] | nil,
           union_with_enum: String.t()
         }
 
@@ -28,11 +28,11 @@ defmodule TopLevel do
 
   def from_map(m) do
     %TopLevel{
-      arr_nullable: m["arrNullable"] && Enum.map(m["arrNullable"], &decode_arr_nullable_element/1),
-      arr_one: m["arrOne"],
-      nullable: m["nullable"],
       one: m["one"],
       optional: m["optional"],
+      nullable: m["nullable"],
+      arr_one: m["arrOne"],
+      arr_nullable: m["arrNullable"] && Enum.map(m["arrNullable"], &decode_arr_nullable_element/1),
       union_with_enum: m["unionWithEnum"],
     }
   end
@@ -45,11 +45,11 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
-      "arrNullable" => struct.arr_nullable && Enum.map(struct.arr_nullable, &encode_arr_nullable_element/1),
-      "arrOne" => struct.arr_one,
-      "nullable" => struct.nullable,
       "one" => struct.one,
       "optional" => struct.optional,
+      "nullable" => struct.nullable,
+      "arrOne" => struct.arr_one,
+      "arrNullable" => struct.arr_nullable && Enum.map(struct.arr_nullable, &encode_arr_nullable_element/1),
       "unionWithEnum" => struct.union_with_enum,
     }
   end
diff --git a/base/schema-elixir/test/inputs/schema/vega-lite.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/vega-lite.schema/default/QuickType.ex
index 0e82e11..6d4aa7e 100644
--- a/base/schema-elixir/test/inputs/schema/vega-lite.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/vega-lite.schema/default/QuickType.ex
@@ -602,8 +602,8 @@ defmodule MarkConfig do
   - `:dx` - The horizontal offset, in pixels, between the text label and its anchor point. The offsetis applied after rotation by the _angle_ property.
   - `:dy` - The vertical offset, in pixels, between the text label and its anchor point. The offsetis applied after rotation by the _angle_ property.
   - `:fill` - Default Fill Color.  This has higher precedence than config.color__Default value:__ (None)
-  - `:filled` - Whether the mark's color should be used as fill color instead of stroke color.__Default value:__ `true` for all marks except `point` and `false` for `point`.__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.__Note:__ This property cannot be used in a [style config](mark.html#style-config).
   - `:fill_opacity` - The fill opacity (value between [0,1]).__Default value:__ `1`
+  - `:filled` - Whether the mark's color should be used as fill color instead of stroke color.__Default value:__ `true` for all marks except `point` and `false` for `point`.__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.__Note:__ This property cannot be used in a [style config](mark.html#style-config).
   - `:font` - The typeface to set the text in (e.g., `"Helvetica Neue"`).
   - `:font_size` - The font size, in pixels.
   - `:font_style` - The font style (e.g., `"italic"`).
@@ -626,7 +626,7 @@ defmodule MarkConfig do
   - `:theta` - Polar coordinate angle, in radians, of the text label from the origin determined by the`x` and `y` properties. Values for `theta` follow the same convention of `arc` mark`startAngle` and `endAngle` properties: angles are measured in radians, with `0`indicating "north".
   """
 
-  defstruct [:align, :angle, :baseline, :color, :cursor, :dx, :dy, :fill, :filled, :fill_opacity, :font, :font_size, :font_style, :font_weight, :href, :interpolate, :limit, :opacity, :orient, :radius, :shape, :size, :stroke, :stroke_dash, :stroke_dash_offset, :stroke_opacity, :stroke_width, :tension, :text, :theta]
+  defstruct [:align, :angle, :baseline, :color, :cursor, :dx, :dy, :fill, :fill_opacity, :filled, :font, :font_size, :font_style, :font_weight, :href, :interpolate, :limit, :opacity, :orient, :radius, :shape, :size, :stroke, :stroke_dash, :stroke_dash_offset, :stroke_opacity, :stroke_width, :tension, :text, :theta]
 
   @type t :: %__MODULE__{
           align: HorizontalAlign.t() | nil,
@@ -637,8 +637,8 @@ defmodule MarkConfig do
           dx: float() | nil,
           dy: float() | nil,
           fill: String.t() | nil,
-          filled: boolean() | nil,
           fill_opacity: float() | nil,
+          filled: boolean() | nil,
           font: String.t() | nil,
           font_size: float() | nil,
           font_style: FontStyle.t() | nil,
@@ -683,8 +683,8 @@ defmodule MarkConfig do
       dx: m["dx"],
       dy: m["dy"],
       fill: m["fill"],
-      filled: m["filled"],
       fill_opacity: m["fillOpacity"],
+      filled: m["filled"],
       font: m["font"],
       font_size: m["fontSize"],
       font_style: m["fontStyle"] && FontStyle.decode(m["fontStyle"]),
@@ -724,8 +724,8 @@ defmodule MarkConfig do
       "dx" => struct.dx,
       "dy" => struct.dy,
       "fill" => struct.fill,
-      "filled" => struct.filled,
       "fillOpacity" => struct.fill_opacity,
+      "filled" => struct.filled,
       "font" => struct.font,
       "fontSize" => struct.font_size,
       "fontStyle" => struct.font_style && FontStyle.encode(struct.font_style),
@@ -831,9 +831,9 @@ defmodule AxisConfig do
   - `:short_time_labels` - Whether month names and weekday names should be abbreviated.__Default value:__  `false`
   - `:tick_color` - The color of the axis's tick.
   - `:tick_round` - Boolean flag indicating if pixel position values should be rounded to the nearest integer.
-  - `:ticks` - Boolean value that determines whether the axis should include ticks.
   - `:tick_size` - The size in pixels of axis ticks.
   - `:tick_width` - The width, in pixels, of ticks.
+  - `:ticks` - Boolean value that determines whether the axis should include ticks.
   - `:title_align` - Horizontal text alignment of axis titles.
   - `:title_angle` - Angle in degrees of axis titles.
   - `:title_baseline` - Vertical text baseline for axis titles.
@@ -848,7 +848,7 @@ defmodule AxisConfig do
   - `:title_y` - Y-coordinate of the axis title relative to the axis group.
   """
 
-  defstruct [:band_position, :domain, :domain_color, :domain_width, :grid, :grid_color, :grid_dash, :grid_opacity, :grid_width, :label_angle, :label_bound, :label_color, :label_flush, :label_font, :label_font_size, :label_limit, :label_overlap, :label_padding, :labels, :max_extent, :min_extent, :short_time_labels, :tick_color, :tick_round, :ticks, :tick_size, :tick_width, :title_align, :title_angle, :title_baseline, :title_color, :title_font, :title_font_size, :title_font_weight, :title_limit, :title_max_length, :title_padding, :title_x, :title_y]
+  defstruct [:band_position, :domain, :domain_color, :domain_width, :grid, :grid_color, :grid_dash, :grid_opacity, :grid_width, :label_angle, :label_bound, :label_color, :label_flush, :label_font, :label_font_size, :label_limit, :label_overlap, :label_padding, :labels, :max_extent, :min_extent, :short_time_labels, :tick_color, :tick_round, :tick_size, :tick_width, :ticks, :title_align, :title_angle, :title_baseline, :title_color, :title_font, :title_font_size, :title_font_weight, :title_limit, :title_max_length, :title_padding, :title_x, :title_y]
 
   @type t :: %__MODULE__{
           band_position: float() | nil,
@@ -875,9 +875,9 @@ defmodule AxisConfig do
           short_time_labels: boolean() | nil,
           tick_color: String.t() | nil,
           tick_round: boolean() | nil,
-          ticks: boolean() | nil,
           tick_size: float() | nil,
           tick_width: float() | nil,
+          ticks: boolean() | nil,
           title_align: String.t() | nil,
           title_angle: float() | nil,
           title_baseline: String.t() | nil,
@@ -928,9 +928,9 @@ defmodule AxisConfig do
       short_time_labels: m["shortTimeLabels"],
       tick_color: m["tickColor"],
       tick_round: m["tickRound"],
-      ticks: m["ticks"],
       tick_size: m["tickSize"],
       tick_width: m["tickWidth"],
+      ticks: m["ticks"],
       title_align: m["titleAlign"],
       title_angle: m["titleAngle"],
       title_baseline: m["titleBaseline"],
@@ -978,9 +978,9 @@ defmodule AxisConfig do
       "shortTimeLabels" => struct.short_time_labels,
       "tickColor" => struct.tick_color,
       "tickRound" => struct.tick_round,
-      "ticks" => struct.ticks,
       "tickSize" => struct.tick_size,
       "tickWidth" => struct.tick_width,
+      "ticks" => struct.ticks,
       "titleAlign" => struct.title_align,
       "titleAngle" => struct.title_angle,
       "titleBaseline" => struct.title_baseline,
@@ -1041,9 +1041,9 @@ defmodule VGAxisConfig do
   - `:min_extent` - The minimum extent in pixels that axis ticks and labels should use. This determines aminimum offset value for axis titles.__Default value:__ `30` for y-axis; `undefined` for x-axis.
   - `:tick_color` - The color of the axis's tick.
   - `:tick_round` - Boolean flag indicating if pixel position values should be rounded to the nearest integer.
-  - `:ticks` - Boolean value that determines whether the axis should include ticks.
   - `:tick_size` - The size in pixels of axis ticks.
   - `:tick_width` - The width, in pixels, of ticks.
+  - `:ticks` - Boolean value that determines whether the axis should include ticks.
   - `:title_align` - Horizontal text alignment of axis titles.
   - `:title_angle` - Angle in degrees of axis titles.
   - `:title_baseline` - Vertical text baseline for axis titles.
@@ -1058,7 +1058,7 @@ defmodule VGAxisConfig do
   - `:title_y` - Y-coordinate of the axis title relative to the axis group.
   """
 
-  defstruct [:band_position, :domain, :domain_color, :domain_width, :grid, :grid_color, :grid_dash, :grid_opacity, :grid_width, :label_angle, :label_bound, :label_color, :label_flush, :label_font, :label_font_size, :label_limit, :label_overlap, :label_padding, :labels, :max_extent, :min_extent, :tick_color, :tick_round, :ticks, :tick_size, :tick_width, :title_align, :title_angle, :title_baseline, :title_color, :title_font, :title_font_size, :title_font_weight, :title_limit, :title_max_length, :title_padding, :title_x, :title_y]
+  defstruct [:band_position, :domain, :domain_color, :domain_width, :grid, :grid_color, :grid_dash, :grid_opacity, :grid_width, :label_angle, :label_bound, :label_color, :label_flush, :label_font, :label_font_size, :label_limit, :label_overlap, :label_padding, :labels, :max_extent, :min_extent, :tick_color, :tick_round, :tick_size, :tick_width, :ticks, :title_align, :title_angle, :title_baseline, :title_color, :title_font, :title_font_size, :title_font_weight, :title_limit, :title_max_length, :title_padding, :title_x, :title_y]
 
   @type t :: %__MODULE__{
           band_position: float() | nil,
@@ -1084,9 +1084,9 @@ defmodule VGAxisConfig do
           min_extent: float() | nil,
           tick_color: String.t() | nil,
           tick_round: boolean() | nil,
-          ticks: boolean() | nil,
           tick_size: float() | nil,
           tick_width: float() | nil,
+          ticks: boolean() | nil,
           title_align: String.t() | nil,
           title_angle: float() | nil,
           title_baseline: String.t() | nil,
@@ -1136,9 +1136,9 @@ defmodule VGAxisConfig do
       min_extent: m["minExtent"],
       tick_color: m["tickColor"],
       tick_round: m["tickRound"],
-      ticks: m["ticks"],
       tick_size: m["tickSize"],
       tick_width: m["tickWidth"],
+      ticks: m["ticks"],
       title_align: m["titleAlign"],
       title_angle: m["titleAngle"],
       title_baseline: m["titleBaseline"],
@@ -1185,9 +1185,9 @@ defmodule VGAxisConfig do
       "minExtent" => struct.min_extent,
       "tickColor" => struct.tick_color,
       "tickRound" => struct.tick_round,
-      "ticks" => struct.ticks,
       "tickSize" => struct.tick_size,
       "tickWidth" => struct.tick_width,
+      "ticks" => struct.ticks,
       "titleAlign" => struct.title_align,
       "titleAngle" => struct.title_angle,
       "titleBaseline" => struct.title_baseline,
@@ -1224,8 +1224,8 @@ defmodule BarConfig do
   - `:dx` - The horizontal offset, in pixels, between the text label and its anchor point. The offsetis applied after rotation by the _angle_ property.
   - `:dy` - The vertical offset, in pixels, between the text label and its anchor point. The offsetis applied after rotation by the _angle_ property.
   - `:fill` - Default Fill Color.  This has higher precedence than config.color__Default value:__ (None)
-  - `:filled` - Whether the mark's color should be used as fill color instead of stroke color.__Default value:__ `true` for all marks except `point` and `false` for `point`.__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.__Note:__ This property cannot be used in a [style config](mark.html#style-config).
   - `:fill_opacity` - The fill opacity (value between [0,1]).__Default value:__ `1`
+  - `:filled` - Whether the mark's color should be used as fill color instead of stroke color.__Default value:__ `true` for all marks except `point` and `false` for `point`.__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.__Note:__ This property cannot be used in a [style config](mark.html#style-config).
   - `:font` - The typeface to set the text in (e.g., `"Helvetica Neue"`).
   - `:font_size` - The font size, in pixels.
   - `:font_style` - The font style (e.g., `"italic"`).
@@ -1248,7 +1248,7 @@ defmodule BarConfig do
   - `:theta` - Polar coordinate angle, in radians, of the text label from the origin determined by the`x` and `y` properties. Values for `theta` follow the same convention of `arc` mark`startAngle` and `endAngle` properties: angles are measured in radians, with `0`indicating "north".
   """
 
-  defstruct [:align, :angle, :baseline, :bin_spacing, :color, :continuous_band_size, :cursor, :discrete_band_size, :dx, :dy, :fill, :filled, :fill_opacity, :font, :font_size, :font_style, :font_weight, :href, :interpolate, :limit, :opacity, :orient, :radius, :shape, :size, :stroke, :stroke_dash, :stroke_dash_offset, :stroke_opacity, :stroke_width, :tension, :text, :theta]
+  defstruct [:align, :angle, :baseline, :bin_spacing, :color, :continuous_band_size, :cursor, :discrete_band_size, :dx, :dy, :fill, :fill_opacity, :filled, :font, :font_size, :font_style, :font_weight, :href, :interpolate, :limit, :opacity, :orient, :radius, :shape, :size, :stroke, :stroke_dash, :stroke_dash_offset, :stroke_opacity, :stroke_width, :tension, :text, :theta]
 
   @type t :: %__MODULE__{
           align: HorizontalAlign.t() | nil,
@@ -1262,8 +1262,8 @@ defmodule BarConfig do
           dx: float() | nil,
           dy: float() | nil,
           fill: String.t() | nil,
-          filled: boolean() | nil,
           fill_opacity: float() | nil,
+          filled: boolean() | nil,
           font: String.t() | nil,
           font_size: float() | nil,
           font_style: FontStyle.t() | nil,
@@ -1311,8 +1311,8 @@ defmodule BarConfig do
       dx: m["dx"],
       dy: m["dy"],
       fill: m["fill"],
-      filled: m["filled"],
       fill_opacity: m["fillOpacity"],
+      filled: m["filled"],
       font: m["font"],
       font_size: m["fontSize"],
       font_style: m["fontStyle"] && FontStyle.decode(m["fontStyle"]),
@@ -1355,8 +1355,8 @@ defmodule BarConfig do
       "dx" => struct.dx,
       "dy" => struct.dy,
       "fill" => struct.fill,
-      "filled" => struct.filled,
       "fillOpacity" => struct.fill_opacity,
+      "filled" => struct.filled,
       "font" => struct.font,
       "fontSize" => struct.font_size,
       "fontStyle" => struct.font_style && FontStyle.encode(struct.font_style),
@@ -2879,8 +2879,8 @@ defmodule TextConfig do
   - `:dx` - The horizontal offset, in pixels, between the text label and its anchor point. The offsetis applied after rotation by the _angle_ property.
   - `:dy` - The vertical offset, in pixels, between the text label and its anchor point. The offsetis applied after rotation by the _angle_ property.
   - `:fill` - Default Fill Color.  This has higher precedence than config.color__Default value:__ (None)
-  - `:filled` - Whether the mark's color should be used as fill color instead of stroke color.__Default value:__ `true` for all marks except `point` and `false` for `point`.__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.__Note:__ This property cannot be used in a [style config](mark.html#style-config).
   - `:fill_opacity` - The fill opacity (value between [0,1]).__Default value:__ `1`
+  - `:filled` - Whether the mark's color should be used as fill color instead of stroke color.__Default value:__ `true` for all marks except `point` and `false` for `point`.__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.__Note:__ This property cannot be used in a [style config](mark.html#style-config).
   - `:font` - The typeface to set the text in (e.g., `"Helvetica Neue"`).
   - `:font_size` - The font size, in pixels.
   - `:font_style` - The font style (e.g., `"italic"`).
@@ -2904,7 +2904,7 @@ defmodule TextConfig do
   - `:theta` - Polar coordinate angle, in radians, of the text label from the origin determined by the`x` and `y` properties. Values for `theta` follow the same convention of `arc` mark`startAngle` and `endAngle` properties: angles are measured in radians, with `0`indicating "north".
   """
 
-  defstruct [:align, :angle, :baseline, :color, :cursor, :dx, :dy, :fill, :filled, :fill_opacity, :font, :font_size, :font_style, :font_weight, :href, :interpolate, :limit, :opacity, :orient, :radius, :shape, :short_time_labels, :size, :stroke, :stroke_dash, :stroke_dash_offset, :stroke_opacity, :stroke_width, :tension, :text, :theta]
+  defstruct [:align, :angle, :baseline, :color, :cursor, :dx, :dy, :fill, :fill_opacity, :filled, :font, :font_size, :font_style, :font_weight, :href, :interpolate, :limit, :opacity, :orient, :radius, :shape, :short_time_labels, :size, :stroke, :stroke_dash, :stroke_dash_offset, :stroke_opacity, :stroke_width, :tension, :text, :theta]
 
   @type t :: %__MODULE__{
           align: HorizontalAlign.t() | nil,
@@ -2915,8 +2915,8 @@ defmodule TextConfig do
           dx: float() | nil,
           dy: float() | nil,
           fill: String.t() | nil,
-          filled: boolean() | nil,
           fill_opacity: float() | nil,
+          filled: boolean() | nil,
           font: String.t() | nil,
           font_size: float() | nil,
           font_style: FontStyle.t() | nil,
@@ -2962,8 +2962,8 @@ defmodule TextConfig do
       dx: m["dx"],
       dy: m["dy"],
       fill: m["fill"],
-      filled: m["filled"],
       fill_opacity: m["fillOpacity"],
+      filled: m["filled"],
       font: m["font"],
       font_size: m["fontSize"],
       font_style: m["fontStyle"] && FontStyle.decode(m["fontStyle"]),
@@ -3004,8 +3004,8 @@ defmodule TextConfig do
       "dx" => struct.dx,
       "dy" => struct.dy,
       "fill" => struct.fill,
-      "filled" => struct.filled,
       "fillOpacity" => struct.fill_opacity,
+      "filled" => struct.filled,
       "font" => struct.font,
       "fontSize" => struct.font_size,
       "fontStyle" => struct.font_style && FontStyle.encode(struct.font_style),
@@ -3049,8 +3049,8 @@ defmodule TickConfig do
   - `:dx` - The horizontal offset, in pixels, between the text label and its anchor point. The offsetis applied after rotation by the _angle_ property.
   - `:dy` - The vertical offset, in pixels, between the text label and its anchor point. The offsetis applied after rotation by the _angle_ property.
   - `:fill` - Default Fill Color.  This has higher precedence than config.color__Default value:__ (None)
-  - `:filled` - Whether the mark's color should be used as fill color instead of stroke color.__Default value:__ `true` for all marks except `point` and `false` for `point`.__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.__Note:__ This property cannot be used in a [style config](mark.html#style-config).
   - `:fill_opacity` - The fill opacity (value between [0,1]).__Default value:__ `1`
+  - `:filled` - Whether the mark's color should be used as fill color instead of stroke color.__Default value:__ `true` for all marks except `point` and `false` for `point`.__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.__Note:__ This property cannot be used in a [style config](mark.html#style-config).
   - `:font` - The typeface to set the text in (e.g., `"Helvetica Neue"`).
   - `:font_size` - The font size, in pixels.
   - `:font_style` - The font style (e.g., `"italic"`).
@@ -3074,7 +3074,7 @@ defmodule TickConfig do
   - `:thickness` - Thickness of the tick mark.__Default value:__  `1`
   """
 
-  defstruct [:align, :angle, :band_size, :baseline, :color, :cursor, :dx, :dy, :fill, :filled, :fill_opacity, :font, :font_size, :font_style, :font_weight, :href, :interpolate, :limit, :opacity, :orient, :radius, :shape, :size, :stroke, :stroke_dash, :stroke_dash_offset, :stroke_opacity, :stroke_width, :tension, :text, :theta, :thickness]
+  defstruct [:align, :angle, :band_size, :baseline, :color, :cursor, :dx, :dy, :fill, :fill_opacity, :filled, :font, :font_size, :font_style, :font_weight, :href, :interpolate, :limit, :opacity, :orient, :radius, :shape, :size, :stroke, :stroke_dash, :stroke_dash_offset, :stroke_opacity, :stroke_width, :tension, :text, :theta, :thickness]
 
   @type t :: %__MODULE__{
           align: HorizontalAlign.t() | nil,
@@ -3086,8 +3086,8 @@ defmodule TickConfig do
           dx: float() | nil,
           dy: float() | nil,
           fill: String.t() | nil,
-          filled: boolean() | nil,
           fill_opacity: float() | nil,
+          filled: boolean() | nil,
           font: String.t() | nil,
           font_size: float() | nil,
           font_style: FontStyle.t() | nil,
@@ -3134,8 +3134,8 @@ defmodule TickConfig do
       dx: m["dx"],
       dy: m["dy"],
       fill: m["fill"],
-      filled: m["filled"],
       fill_opacity: m["fillOpacity"],
+      filled: m["filled"],
       font: m["font"],
       font_size: m["fontSize"],
       font_style: m["fontStyle"] && FontStyle.decode(m["fontStyle"]),
@@ -3177,8 +3177,8 @@ defmodule TickConfig do
       "dx" => struct.dx,
       "dy" => struct.dy,
       "fill" => struct.fill,
-      "filled" => struct.filled,
       "fillOpacity" => struct.fill_opacity,
+      "filled" => struct.filled,
       "font" => struct.font,
       "fontSize" => struct.font_size,
       "fontStyle" => struct.font_style && FontStyle.encode(struct.font_style),
@@ -6443,8 +6443,8 @@ defmodule Axis do
   - `:orient` - The orientation of the axis. One of `"top"`, `"bottom"`, `"left"` or `"right"`. Theorientation can be used to further specialize the axis type (e.g., a y axis oriented forthe right edge of the chart).__Default value:__ `"bottom"` for x-axes and `"left"` for y-axes.
   - `:position` - The anchor position of the axis in pixels. For x-axis with top or bottom orientation,this sets the axis group x coordinate. For y-axis with left or right orientation, thissets the axis group y coordinate.__Default value__: `0`
   - `:tick_count` - A desired number of ticks, for axes visualizing quantitative scales. The resulting numbermay be different so that values are "nice" (multiples of 2, 5, 10) and lie within theunderlying scale's range.
-  - `:ticks` - Boolean value that determines whether the axis should include ticks.
   - `:tick_size` - The size in pixels of axis ticks.
+  - `:ticks` - Boolean value that determines whether the axis should include ticks.
   - `:title` - A title for the field. If `null`, the title will be removed.__Default value:__  derived from the field's name and transformation function(`aggregate`, `bin` and `timeUnit`).  If the field has an aggregate function, thefunction is displayed as a part of the title (e.g., `"Sum of Profit"`). If the field isbinned or has a time unit applied, the applied function will be denoted in parentheses(e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`).  Otherwise, the title issimply the field name.__Note__: You can customize the default field title format by providing the [`fieldTitle`property in the [config](config.html) or [`fieldTitle` function via the `compile`function's options](compile.html#field-title).
   - `:title_max_length` - Max length for axis title if the title is automatically generated from the field'sdescription.
   - `:title_padding` - The padding, in pixels, between title and axis.
@@ -6452,7 +6452,7 @@ defmodule Axis do
   - `:zindex` - A non-positive integer indicating z-index of the axis.If zindex is 0, axes should be drawn behind all chart elements.To put them in front, use `"zindex = 1"`.__Default value:__ `1` (in front of the marks) for actual axis and `0` (behind the marks)for grids.
   """
 
-  defstruct [:domain, :format, :grid, :label_angle, :label_bound, :label_flush, :label_overlap, :label_padding, :labels, :max_extent, :min_extent, :offset, :orient, :position, :tick_count, :ticks, :tick_size, :title, :title_max_length, :title_padding, :values, :zindex]
+  defstruct [:domain, :format, :grid, :label_angle, :label_bound, :label_flush, :label_overlap, :label_padding, :labels, :max_extent, :min_extent, :offset, :orient, :position, :tick_count, :tick_size, :ticks, :title, :title_max_length, :title_padding, :values, :zindex]
 
   @type t :: %__MODULE__{
           domain: boolean() | nil,
@@ -6470,8 +6470,8 @@ defmodule Axis do
           orient: TitleOrient.t() | nil,
           position: float() | nil,
           tick_count: float() | nil,
-          ticks: boolean() | nil,
           tick_size: float() | nil,
+          ticks: boolean() | nil,
           title: nil | String.t() | nil,
           title_max_length: float() | nil,
           title_padding: float() | nil,
@@ -6516,8 +6516,8 @@ defmodule Axis do
       orient: m["orient"] && TitleOrient.decode(m["orient"]),
       position: m["position"],
       tick_count: m["tickCount"],
-      ticks: m["ticks"],
       tick_size: m["tickSize"],
+      ticks: m["ticks"],
       title: m["title"],
       title_max_length: m["titleMaxLength"],
       title_padding: m["titlePadding"],
@@ -6549,8 +6549,8 @@ defmodule Axis do
       "orient" => struct.orient && TitleOrient.encode(struct.orient),
       "position" => struct.position,
       "tickCount" => struct.tick_count,
-      "ticks" => struct.ticks,
       "tickSize" => struct.tick_size,
+      "ticks" => struct.ticks,
       "title" => struct.title,
       "titleMaxLength" => struct.title_max_length,
       "titlePadding" => struct.title_padding,
@@ -7089,8 +7089,8 @@ defmodule MarkDef do
   - `:dx` - The horizontal offset, in pixels, between the text label and its anchor point. The offsetis applied after rotation by the _angle_ property.
   - `:dy` - The vertical offset, in pixels, between the text label and its anchor point. The offsetis applied after rotation by the _angle_ property.
   - `:fill` - Default Fill Color.  This has higher precedence than config.color__Default value:__ (None)
-  - `:filled` - Whether the mark's color should be used as fill color instead of stroke color.__Default value:__ `true` for all marks except `point` and `false` for `point`.__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.__Note:__ This property cannot be used in a [style config](mark.html#style-config).
   - `:fill_opacity` - The fill opacity (value between [0,1]).__Default value:__ `1`
+  - `:filled` - Whether the mark's color should be used as fill color instead of stroke color.__Default value:__ `true` for all marks except `point` and `false` for `point`.__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.__Note:__ This property cannot be used in a [style config](mark.html#style-config).
   - `:font` - The typeface to set the text in (e.g., `"Helvetica Neue"`).
   - `:font_size` - The font size, in pixels.
   - `:font_style` - The font style (e.g., `"italic"`).
@@ -7116,7 +7116,7 @@ defmodule MarkDef do
   """
 
   @enforce_keys [:type]
-  defstruct [:align, :angle, :baseline, :clip, :color, :cursor, :dx, :dy, :fill, :filled, :fill_opacity, :font, :font_size, :font_style, :font_weight, :href, :interpolate, :limit, :opacity, :orient, :radius, :shape, :size, :stroke, :stroke_dash, :stroke_dash_offset, :stroke_opacity, :stroke_width, :style, :tension, :text, :theta, :type]
+  defstruct [:align, :angle, :baseline, :clip, :color, :cursor, :dx, :dy, :fill, :fill_opacity, :filled, :font, :font_size, :font_style, :font_weight, :href, :interpolate, :limit, :opacity, :orient, :radius, :shape, :size, :stroke, :stroke_dash, :stroke_dash_offset, :stroke_opacity, :stroke_width, :style, :tension, :text, :theta, :type]
 
   @type t :: %__MODULE__{
           align: HorizontalAlign.t() | nil,
@@ -7128,8 +7128,8 @@ defmodule MarkDef do
           dx: float() | nil,
           dy: float() | nil,
           fill: String.t() | nil,
-          filled: boolean() | nil,
           fill_opacity: float() | nil,
+          filled: boolean() | nil,
           font: String.t() | nil,
           font_size: float() | nil,
           font_style: FontStyle.t() | nil,
@@ -7187,8 +7187,8 @@ defmodule MarkDef do
       dx: m["dx"],
       dy: m["dy"],
       fill: m["fill"],
-      filled: m["filled"],
       fill_opacity: m["fillOpacity"],
+      filled: m["filled"],
       font: m["font"],
       font_size: m["fontSize"],
       font_style: m["fontStyle"] && FontStyle.decode(m["fontStyle"]),
@@ -7231,8 +7231,8 @@ defmodule MarkDef do
       "dx" => struct.dx,
       "dy" => struct.dy,
       "fill" => struct.fill,
-      "filled" => struct.filled,
       "fillOpacity" => struct.fill_opacity,
+      "filled" => struct.filled,
       "font" => struct.font,
       "fontSize" => struct.font_size,
       "fontStyle" => struct.font_style && FontStyle.encode(struct.font_style),
diff --git a/base/schema-elm/test/inputs/schema/accessors.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/accessors.schema/default/QuickType.elm
index f2fb976..4f8695e 100644
--- a/base/schema-elm/test/inputs/schema/accessors.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/accessors.schema/default/QuickType.elm
@@ -25,10 +25,10 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { barre : String
+    { unionization : Union
     , enumerification : Enum
     , foo : String
-    , unionization : Union
+    , barre : String
     }
 
 type Enum
@@ -48,18 +48,18 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.required "bar" Jdec.string
+        |> Jpipe.required "union" union
         |> Jpipe.required "enum" enum
         |> Jpipe.required "foo" Jdec.string
-        |> Jpipe.required "union" union
+        |> Jpipe.required "bar" Jdec.string
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("bar", Jenc.string x.barre)
+        [ ("union", encodeUnion x.unionization)
         , ("enum", encodeEnum x.enumerification)
         , ("foo", Jenc.string x.foo)
-        , ("union", encodeUnion x.unionization)
+        , ("bar", Jenc.string x.barre)
         ]
 
 enum : Jdec.Decoder Enum
diff --git a/base/schema-elm/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.elm
index 4d9a171..2d6f611 100644
--- a/base/schema-elm/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.elm
@@ -27,8 +27,8 @@ import Dict exposing (Dict)
 type alias QuickType =
     { amount : Float
     , frequency : Frequency
-    , description : Maybe String
     , quickTypeType : Type
+    , description : Maybe String
     }
 
 type Frequency
@@ -50,16 +50,16 @@ quickType =
     Jdec.succeed QuickType
         |> Jpipe.required "amount" Jdec.float
         |> Jpipe.required "frequency" frequency
-        |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.required "type" purpleType
+        |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
         [ ("amount", Jenc.float x.amount)
         , ("frequency", encodeFrequency x.frequency)
-        , ("description", makeNullableEncoder Jenc.string x.description)
         , ("type", encodeType x.quickTypeType)
+        , ("description", makeNullableEncoder Jenc.string x.description)
         ]
 
 frequency : Jdec.Decoder Frequency
diff --git a/base/schema-elm/test/inputs/schema/bool-string.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/bool-string.schema/default/QuickType.elm
index b71a28c..413c17b 100644
--- a/base/schema-elm/test/inputs/schema/bool-string.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/bool-string.schema/default/QuickType.elm
@@ -24,11 +24,11 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { arrNullable : Maybe (List (Maybe String))
-    , arrOne : Maybe (List String)
-    , nullable : Maybe String
-    , one : String
+    { one : String
     , optional : Maybe String
+    , nullable : Maybe String
+    , arrOne : Maybe (List String)
+    , arrNullable : Maybe (List (Maybe String))
     , unionWithBool : UnionWithBool
     , unionWithBoolAndEnum : UnionWithBool
     }
@@ -45,22 +45,22 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing
-        |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.required "one" Jdec.string
         |> Jpipe.optional "optional" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing
         |> Jpipe.required "unionWithBool" unionWithBool
         |> Jpipe.required "unionWithBoolAndEnum" unionWithBool
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("arrNullable", makeNullableEncoder (Jenc.list (makeNullableEncoder Jenc.string)) x.arrNullable)
-        , ("arrOne", makeNullableEncoder (Jenc.list Jenc.string) x.arrOne)
-        , ("nullable", makeNullableEncoder Jenc.string x.nullable)
-        , ("one", Jenc.string x.one)
+        [ ("one", Jenc.string x.one)
         , ("optional", makeNullableEncoder Jenc.string x.optional)
+        , ("nullable", makeNullableEncoder Jenc.string x.nullable)
+        , ("arrOne", makeNullableEncoder (Jenc.list Jenc.string) x.arrOne)
+        , ("arrNullable", makeNullableEncoder (Jenc.list (makeNullableEncoder Jenc.string)) x.arrNullable)
         , ("unionWithBool", encodeUnionWithBool x.unionWithBool)
         , ("unionWithBoolAndEnum", encodeUnionWithBool x.unionWithBoolAndEnum)
         ]
diff --git a/base/schema-elm/test/inputs/schema/boolean-subschema.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/boolean-subschema.schema/default/QuickType.elm
index fb77fb7..aece8f6 100644
--- a/base/schema-elm/test/inputs/schema/boolean-subschema.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/boolean-subschema.schema/default/QuickType.elm
@@ -23,9 +23,9 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { disallowed : Maybe Jdec.Value
+    { foo : String
+    , disallowed : Maybe Jdec.Value
     , empty : List Jdec.Value
-    , foo : String
     , impossible : Maybe Jdec.Value
     }
 
@@ -37,17 +37,17 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
+        |> Jpipe.required "foo" Jdec.string
         |> Jpipe.optional "disallowed" (Jdec.nullable Jdec.value) Nothing
         |> Jpipe.required "empty" (Jdec.list Jdec.value)
-        |> Jpipe.required "foo" Jdec.string
         |> Jpipe.optional "impossible" (Jdec.nullable Jdec.value) Nothing
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("disallowed", makeNullableEncoder identity x.disallowed)
+        [ ("foo", Jenc.string x.foo)
+        , ("disallowed", makeNullableEncoder identity x.disallowed)
         , ("empty", Jenc.list identity x.empty)
-        , ("foo", Jenc.string x.foo)
         , ("impossible", makeNullableEncoder identity x.impossible)
         ]
 
diff --git a/base/schema-elm/test/inputs/schema/comment-injection.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/comment-injection.schema/default/QuickType.elm
index 5f65cb7..3cf8e91 100644
--- a/base/schema-elm/test/inputs/schema/comment-injection.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/comment-injection.schema/default/QuickType.elm
@@ -35,15 +35,6 @@ import Dict exposing (Dict)
 }
 }
 
-trailingBackslash:
-Ends with a backslash \
-
-trailingQuote:
-Ends with a quote "
-
-trailingTripleQuote:
-Ends with a triple quote """
-
 value:
 Property delimiters:
 */
@@ -57,12 +48,21 @@ Property delimiters:
 }
 }
 }
+
+trailingBackslash:
+Ends with a backslash \
+
+trailingQuote:
+Ends with a quote "
+
+trailingTripleQuote:
+Ends with a triple quote """
 -}
 type alias QuickType =
-    { trailingBackslash : Maybe String
+    { value : String
+    , trailingBackslash : Maybe String
     , trailingQuote : Maybe String
     , trailingTripleQuote : Maybe String
-    , value : String
     }
 
 -- decoders and encoders
@@ -73,18 +73,18 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
+        |> Jpipe.required "value" Jdec.string
         |> Jpipe.optional "trailingBackslash" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.optional "trailingQuote" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.optional "trailingTripleQuote" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.required "value" Jdec.string
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("trailingBackslash", makeNullableEncoder Jenc.string x.trailingBackslash)
+        [ ("value", Jenc.string x.value)
+        , ("trailingBackslash", makeNullableEncoder Jenc.string x.trailingBackslash)
         , ("trailingQuote", makeNullableEncoder Jenc.string x.trailingQuote)
         , ("trailingTripleQuote", makeNullableEncoder Jenc.string x.trailingTripleQuote)
-        , ("value", Jenc.string x.value)
         ]
 
 --- encoder helpers
diff --git a/base/schema-elm/test/inputs/schema/const-non-string.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/const-non-string.schema/default/QuickType.elm
index 6303317..8aa53f3 100644
--- a/base/schema-elm/test/inputs/schema/const-non-string.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/const-non-string.schema/default/QuickType.elm
@@ -24,11 +24,11 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { amount : Int
+    { version : Float
+    , amount : Int
+    , ratio : Float
     , enabled : Bool
     , kind : Kind
-    , ratio : Float
-    , version : Float
     }
 
 type Kind
@@ -42,20 +42,20 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
+        |> Jpipe.required "version" Jdec.float
         |> Jpipe.required "amount" Jdec.int
+        |> Jpipe.required "ratio" Jdec.float
         |> Jpipe.required "enabled" Jdec.bool
         |> Jpipe.required "kind" kind
-        |> Jpipe.required "ratio" Jdec.float
-        |> Jpipe.required "version" Jdec.float
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("amount", Jenc.int x.amount)
+        [ ("version", Jenc.float x.version)
+        , ("amount", Jenc.int x.amount)
+        , ("ratio", Jenc.float x.ratio)
         , ("enabled", Jenc.bool x.enabled)
         , ("kind", encodeKind x.kind)
-        , ("ratio", Jenc.float x.ratio)
-        , ("version", Jenc.float x.version)
         ]
 
 kind : Jdec.Decoder Kind
diff --git a/base/schema-elm/test/inputs/schema/date-time-or-string.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/date-time-or-string.schema/default/QuickType.elm
index ab86de8..886cf07 100644
--- a/base/schema-elm/test/inputs/schema/date-time-or-string.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/date-time-or-string.schema/default/QuickType.elm
@@ -23,8 +23,8 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { bar : String
-    , foo : String
+    { foo : String
+    , bar : String
     }
 
 -- decoders and encoders
@@ -35,14 +35,14 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.required "bar" Jdec.string
         |> Jpipe.required "foo" Jdec.string
+        |> Jpipe.required "bar" Jdec.string
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("bar", Jenc.string x.bar)
-        , ("foo", Jenc.string x.foo)
+        [ ("foo", Jenc.string x.foo)
+        , ("bar", Jenc.string x.bar)
         ]
 
 --- encoder helpers
diff --git a/base/schema-elm/test/inputs/schema/date-time.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/date-time.schema/default/QuickType.elm
index ba670b3..fcc1944 100644
--- a/base/schema-elm/test/inputs/schema/date-time.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/date-time.schema/default/QuickType.elm
@@ -24,11 +24,11 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { complexUnionArray : List ComplexUnionArray
-    , date : String
-    , dateTime : String
+    { date : String
     , time : String
+    , dateTime : String
     , unionArray : List String
+    , complexUnionArray : List ComplexUnionArray
     }
 
 type ComplexUnionArray
@@ -43,20 +43,20 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.required "complex-union-array" (Jdec.list complexUnionArray)
         |> Jpipe.required "date" Jdec.string
-        |> Jpipe.required "date-time" Jdec.string
         |> Jpipe.required "time" Jdec.string
+        |> Jpipe.required "date-time" Jdec.string
         |> Jpipe.required "union-array" (Jdec.list Jdec.string)
+        |> Jpipe.required "complex-union-array" (Jdec.list complexUnionArray)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("complex-union-array", Jenc.list encodeComplexUnionArray x.complexUnionArray)
-        , ("date", Jenc.string x.date)
-        , ("date-time", Jenc.string x.dateTime)
+        [ ("date", Jenc.string x.date)
         , ("time", Jenc.string x.time)
+        , ("date-time", Jenc.string x.dateTime)
         , ("union-array", Jenc.list Jenc.string x.unionArray)
+        , ("complex-union-array", Jenc.list encodeComplexUnionArray x.complexUnionArray)
         ]
 
 complexUnionArray : Jdec.Decoder ComplexUnionArray
diff --git a/base/schema-elm/test/inputs/schema/description.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/description.schema/default/QuickType.elm
index c235a93..132ded9 100644
--- a/base/schema-elm/test/inputs/schema/description.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/description.schema/default/QuickType.elm
@@ -29,21 +29,21 @@ import Dict exposing (Dict)
 {-| The top-level class.
 Its description has two lines.
 
-bar:
-A pretty boolean
+union:
+Either a number or a string
 
 enum:
 An enumeration
 
-union:
-Either a number or a string
+bar:
+A pretty boolean
 -}
 type alias QuickType =
-    { bar : Maybe Bool
+    { union : Union
     , enum : Enum
     , foo : Maybe Float
+    , bar : Maybe Bool
     , objectOrString : ObjectOrStringUnion
-    , union : Union
     }
 
 {-| An enumeration -}
@@ -77,20 +77,20 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "bar" (Jdec.nullable Jdec.bool) Nothing
+        |> Jpipe.required "union" union
         |> Jpipe.required "enum" enum
         |> Jpipe.optional "foo" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.optional "bar" (Jdec.nullable Jdec.bool) Nothing
         |> Jpipe.required "object-or-string" objectOrStringUnion
-        |> Jpipe.required "union" union
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("bar", makeNullableEncoder Jenc.bool x.bar)
+        [ ("union", encodeUnion x.union)
         , ("enum", encodeEnum x.enum)
         , ("foo", makeNullableEncoder Jenc.float x.foo)
+        , ("bar", makeNullableEncoder Jenc.bool x.bar)
         , ("object-or-string", encodeObjectOrStringUnion x.objectOrString)
-        , ("union", encodeUnion x.union)
         ]
 
 enum : Jdec.Decoder Enum
diff --git a/base/schema-elm/test/inputs/schema/direct-union.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/direct-union.schema/default/QuickType.elm
index fa51c66..b94e75e 100644
--- a/base/schema-elm/test/inputs/schema/direct-union.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/direct-union.schema/default/QuickType.elm
@@ -29,8 +29,8 @@ type alias QuickType =
     }
 
 type alias Thing =
-    { optional : Maybe Anything
-    , required : Anything
+    { required : Anything
+    , optional : Maybe Anything
     }
 
 type Anything
@@ -61,14 +61,14 @@ encodeQuickType x =
 thing : Jdec.Decoder Thing
 thing =
     Jdec.succeed Thing
-        |> Jpipe.optional "optional" (Jdec.nullable anything) Nothing
         |> Jpipe.required "required" anything
+        |> Jpipe.optional "optional" (Jdec.nullable anything) Nothing
 
 encodeThing : Thing -> Jenc.Value
 encodeThing x =
     Jenc.object
-        [ ("optional", makeNullableEncoder encodeAnything x.optional)
-        , ("required", encodeAnything x.required)
+        [ ("required", encodeAnything x.required)
+        , ("optional", makeNullableEncoder encodeAnything x.optional)
         ]
 
 anything : Jdec.Decoder Anything
diff --git a/base/schema-elm/test/inputs/schema/enum.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/enum.schema/default/QuickType.elm
index d413658..030f11f 100644
--- a/base/schema-elm/test/inputs/schema/enum.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/enum.schema/default/QuickType.elm
@@ -27,11 +27,11 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { arr : Maybe (List Arr)
-    , for : Maybe String
+    { lvc : Maybe Lvc
     , gve : Gve
-    , lvc : Maybe Lvc
+    , arr : Maybe (List Arr)
     , otherArr : Maybe (List OtherArr)
+    , for : Maybe String
     }
 
 type Arr
@@ -61,20 +61,20 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "arr" (Jdec.nullable (Jdec.list arr)) Nothing
-        |> Jpipe.optional "for" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.required "gve" gve
         |> Jpipe.optional "lvc" (Jdec.nullable lvc) Nothing
+        |> Jpipe.required "gve" gve
+        |> Jpipe.optional "arr" (Jdec.nullable (Jdec.list arr)) Nothing
         |> Jpipe.optional "otherArr" (Jdec.nullable (Jdec.list otherArr)) Nothing
+        |> Jpipe.optional "for" (Jdec.nullable Jdec.string) Nothing
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("arr", makeNullableEncoder (Jenc.list encodeArr) x.arr)
-        , ("for", makeNullableEncoder Jenc.string x.for)
+        [ ("lvc", makeNullableEncoder encodeLvc x.lvc)
         , ("gve", encodeGve x.gve)
-        , ("lvc", makeNullableEncoder encodeLvc x.lvc)
+        , ("arr", makeNullableEncoder (Jenc.list encodeArr) x.arr)
         , ("otherArr", makeNullableEncoder (Jenc.list encodeOtherArr) x.otherArr)
+        , ("for", makeNullableEncoder Jenc.string x.for)
         ]
 
 arr : Jdec.Decoder Arr
diff --git a/base/schema-elm/test/inputs/schema/integer-string.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/integer-string.schema/default/QuickType.elm
index 9de3975..7e54370 100644
--- a/base/schema-elm/test/inputs/schema/integer-string.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/integer-string.schema/default/QuickType.elm
@@ -24,11 +24,11 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { arrNullable : Maybe (List (Maybe String))
-    , arrOne : Maybe (List String)
-    , nullable : Maybe String
-    , one : String
+    { one : String
     , optional : Maybe String
+    , nullable : Maybe String
+    , arrOne : Maybe (List String)
+    , arrNullable : Maybe (List (Maybe String))
     , unionWithInt : UnionWithInt
     , unionWithIntAndEnum : UnionWithInt
     }
@@ -45,22 +45,22 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing
-        |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.required "one" Jdec.string
         |> Jpipe.optional "optional" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing
         |> Jpipe.required "unionWithInt" unionWithInt
         |> Jpipe.required "unionWithIntAndEnum" unionWithInt
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("arrNullable", makeNullableEncoder (Jenc.list (makeNullableEncoder Jenc.string)) x.arrNullable)
-        , ("arrOne", makeNullableEncoder (Jenc.list Jenc.string) x.arrOne)
-        , ("nullable", makeNullableEncoder Jenc.string x.nullable)
-        , ("one", Jenc.string x.one)
+        [ ("one", Jenc.string x.one)
         , ("optional", makeNullableEncoder Jenc.string x.optional)
+        , ("nullable", makeNullableEncoder Jenc.string x.nullable)
+        , ("arrOne", makeNullableEncoder (Jenc.list Jenc.string) x.arrOne)
+        , ("arrNullable", makeNullableEncoder (Jenc.list (makeNullableEncoder Jenc.string)) x.arrNullable)
         , ("unionWithInt", encodeUnionWithInt x.unionWithInt)
         , ("unionWithIntAndEnum", encodeUnionWithInt x.unionWithIntAndEnum)
         ]
diff --git a/base/schema-elm/test/inputs/schema/integer-type.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/integer-type.schema/default/QuickType.elm
index c7ecdaf..1fd884c 100644
--- a/base/schema-elm/test/inputs/schema/integer-type.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/integer-type.schema/default/QuickType.elm
@@ -23,15 +23,15 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { aboveI32Max : Int
-    , belowI32Min : Int
+    { smallPositive : Int
+    , smallNegative : Int
     , i32Range : Int
-    , largeBounds : Int
-    , onlyMaximum : Int
+    , aboveI32Max : Int
+    , belowI32Min : Int
     , onlyMinimum : Int
-    , smallNegative : Int
-    , smallPositive : Int
+    , onlyMaximum : Int
     , unbounded : Int
+    , largeBounds : Int
     }
 
 -- decoders and encoders
@@ -42,28 +42,28 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
+        |> Jpipe.required "small_positive" Jdec.int
+        |> Jpipe.required "small_negative" Jdec.int
+        |> Jpipe.required "i32_range" Jdec.int
         |> Jpipe.required "above_i32_max" Jdec.int
         |> Jpipe.required "below_i32_min" Jdec.int
-        |> Jpipe.required "i32_range" Jdec.int
-        |> Jpipe.required "large_bounds" Jdec.int
-        |> Jpipe.required "only_maximum" Jdec.int
         |> Jpipe.required "only_minimum" Jdec.int
-        |> Jpipe.required "small_negative" Jdec.int
-        |> Jpipe.required "small_positive" Jdec.int
+        |> Jpipe.required "only_maximum" Jdec.int
         |> Jpipe.required "unbounded" Jdec.int
+        |> Jpipe.required "large_bounds" Jdec.int
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("above_i32_max", Jenc.int x.aboveI32Max)
-        , ("below_i32_min", Jenc.int x.belowI32Min)
+        [ ("small_positive", Jenc.int x.smallPositive)
+        , ("small_negative", Jenc.int x.smallNegative)
         , ("i32_range", Jenc.int x.i32Range)
-        , ("large_bounds", Jenc.int x.largeBounds)
-        , ("only_maximum", Jenc.int x.onlyMaximum)
+        , ("above_i32_max", Jenc.int x.aboveI32Max)
+        , ("below_i32_min", Jenc.int x.belowI32Min)
         , ("only_minimum", Jenc.int x.onlyMinimum)
-        , ("small_negative", Jenc.int x.smallNegative)
-        , ("small_positive", Jenc.int x.smallPositive)
+        , ("only_maximum", Jenc.int x.onlyMaximum)
         , ("unbounded", Jenc.int x.unbounded)
+        , ("large_bounds", Jenc.int x.largeBounds)
         ]
 
 --- encoder helpers
diff --git a/base/schema-elm/test/inputs/schema/light.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/light.schema/default/QuickType.elm
index 8c5a0fb..f70e04d 100644
--- a/base/schema-elm/test/inputs/schema/light.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/light.schema/default/QuickType.elm
@@ -28,8 +28,8 @@ type alias QuickType =
     }
 
 type alias LightParams =
-    { appID : String
-    , outletID : String
+    { outletID : String
+    , appID : String
     , rgba : String
     }
 
@@ -52,15 +52,15 @@ encodeQuickType x =
 lightParams : Jdec.Decoder LightParams
 lightParams =
     Jdec.succeed LightParams
-        |> Jpipe.required "app_id" Jdec.string
         |> Jpipe.required "outlet_id" Jdec.string
+        |> Jpipe.required "app_id" Jdec.string
         |> Jpipe.required "rgba" Jdec.string
 
 encodeLightParams : LightParams -> Jenc.Value
 encodeLightParams x =
     Jenc.object
-        [ ("app_id", Jenc.string x.appID)
-        , ("outlet_id", Jenc.string x.outletID)
+        [ ("outlet_id", Jenc.string x.outletID)
+        , ("app_id", Jenc.string x.appID)
         , ("rgba", Jenc.string x.rgba)
         ]
 
diff --git a/base/schema-elm/test/inputs/schema/min-max-items.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/min-max-items.schema/default/QuickType.elm
index d1c787a..accf761 100644
--- a/base/schema-elm/test/inputs/schema/min-max-items.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/min-max-items.schema/default/QuickType.elm
@@ -24,9 +24,9 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { maxOnly : List Int
+    { minOnly : List String
+    , maxOnly : List Int
     , minAndMax : List Float
-    , minOnly : List String
     , plain : List String
     , unionItems : List UnionItem
     }
@@ -43,18 +43,18 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
+        |> Jpipe.required "minOnly" (Jdec.list Jdec.string)
         |> Jpipe.required "maxOnly" (Jdec.list Jdec.int)
         |> Jpipe.required "minAndMax" (Jdec.list Jdec.float)
-        |> Jpipe.required "minOnly" (Jdec.list Jdec.string)
         |> Jpipe.required "plain" (Jdec.list Jdec.string)
         |> Jpipe.required "unionItems" (Jdec.list unionItem)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("maxOnly", Jenc.list Jenc.int x.maxOnly)
+        [ ("minOnly", Jenc.list Jenc.string x.minOnly)
+        , ("maxOnly", Jenc.list Jenc.int x.maxOnly)
         , ("minAndMax", Jenc.list Jenc.float x.minAndMax)
-        , ("minOnly", Jenc.list Jenc.string x.minOnly)
         , ("plain", Jenc.list Jenc.string x.plain)
         , ("unionItems", Jenc.list encodeUnionItem x.unionItems)
         ]
diff --git a/base/schema-elm/test/inputs/schema/minmax-integer.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/minmax-integer.schema/default/QuickType.elm
index 3b875d5..aab1fe2 100644
--- a/base/schema-elm/test/inputs/schema/minmax-integer.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/minmax-integer.schema/default/QuickType.elm
@@ -24,13 +24,13 @@ import Dict exposing (Dict)
 
 type alias QuickType =
     { free : Int
-    , intersection : Int
-    , max : Int
     , min : Int
+    , max : Int
     , minmax : Int
-    , minMaxIntersection : Int
-    , minMaxUnion : Int
     , union : Int
+    , minMaxUnion : Int
+    , intersection : Int
+    , minMaxIntersection : Int
     }
 
 -- decoders and encoders
@@ -42,25 +42,25 @@ quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
         |> Jpipe.required "free" Jdec.int
-        |> Jpipe.required "intersection" Jdec.int
-        |> Jpipe.required "max" Jdec.int
         |> Jpipe.required "min" Jdec.int
+        |> Jpipe.required "max" Jdec.int
         |> Jpipe.required "minmax" Jdec.int
-        |> Jpipe.required "minMaxIntersection" Jdec.int
-        |> Jpipe.required "minMaxUnion" Jdec.int
         |> Jpipe.required "union" Jdec.int
+        |> Jpipe.required "minMaxUnion" Jdec.int
+        |> Jpipe.required "intersection" Jdec.int
+        |> Jpipe.required "minMaxIntersection" Jdec.int
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
         [ ("free", Jenc.int x.free)
-        , ("intersection", Jenc.int x.intersection)
-        , ("max", Jenc.int x.max)
         , ("min", Jenc.int x.min)
+        , ("max", Jenc.int x.max)
         , ("minmax", Jenc.int x.minmax)
-        , ("minMaxIntersection", Jenc.int x.minMaxIntersection)
-        , ("minMaxUnion", Jenc.int x.minMaxUnion)
         , ("union", Jenc.int x.union)
+        , ("minMaxUnion", Jenc.int x.minMaxUnion)
+        , ("intersection", Jenc.int x.intersection)
+        , ("minMaxIntersection", Jenc.int x.minMaxIntersection)
         ]
 
 --- encoder helpers
diff --git a/base/schema-elm/test/inputs/schema/minmax.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/minmax.schema/default/QuickType.elm
index 1ca34e4..95b87d8 100644
--- a/base/schema-elm/test/inputs/schema/minmax.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/minmax.schema/default/QuickType.elm
@@ -24,13 +24,13 @@ import Dict exposing (Dict)
 
 type alias QuickType =
     { free : Float
-    , intersection : Float
-    , max : Float
     , min : Float
+    , max : Float
     , minmax : Float
-    , minMaxIntersection : Float
-    , minMaxUnion : Float
     , union : Float
+    , minMaxUnion : Float
+    , intersection : Float
+    , minMaxIntersection : Float
     }
 
 -- decoders and encoders
@@ -42,25 +42,25 @@ quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
         |> Jpipe.required "free" Jdec.float
-        |> Jpipe.required "intersection" Jdec.float
-        |> Jpipe.required "max" Jdec.float
         |> Jpipe.required "min" Jdec.float
+        |> Jpipe.required "max" Jdec.float
         |> Jpipe.required "minmax" Jdec.float
-        |> Jpipe.required "minMaxIntersection" Jdec.float
-        |> Jpipe.required "minMaxUnion" Jdec.float
         |> Jpipe.required "union" Jdec.float
+        |> Jpipe.required "minMaxUnion" Jdec.float
+        |> Jpipe.required "intersection" Jdec.float
+        |> Jpipe.required "minMaxIntersection" Jdec.float
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
         [ ("free", Jenc.float x.free)
-        , ("intersection", Jenc.float x.intersection)
-        , ("max", Jenc.float x.max)
         , ("min", Jenc.float x.min)
+        , ("max", Jenc.float x.max)
         , ("minmax", Jenc.float x.minmax)
-        , ("minMaxIntersection", Jenc.float x.minMaxIntersection)
-        , ("minMaxUnion", Jenc.float x.minMaxUnion)
         , ("union", Jenc.float x.union)
+        , ("minMaxUnion", Jenc.float x.minMaxUnion)
+        , ("intersection", Jenc.float x.intersection)
+        , ("minMaxIntersection", Jenc.float x.minMaxIntersection)
         ]
 
 --- encoder helpers
diff --git a/base/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm
index 725e5bd..634144b 100644
--- a/base/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm
@@ -24,14 +24,14 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { intersection : String
-    , inUnion : InUnion
+    { minlength : String
     , maxlength : String
-    , minlength : String
-    , minMaxIntersection : String
     , minmaxlength : String
-    , minMaxUnion : String
     , union : String
+    , inUnion : InUnion
+    , minMaxUnion : String
+    , intersection : String
+    , minMaxIntersection : String
     }
 
 type InUnion
@@ -46,26 +46,26 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.required "intersection" Jdec.string
-        |> Jpipe.required "inUnion" inUnion
-        |> Jpipe.required "maxlength" Jdec.string
         |> Jpipe.required "minlength" Jdec.string
-        |> Jpipe.required "minMaxIntersection" Jdec.string
+        |> Jpipe.required "maxlength" Jdec.string
         |> Jpipe.required "minmaxlength" Jdec.string
-        |> Jpipe.required "minMaxUnion" Jdec.string
         |> Jpipe.required "union" Jdec.string
+        |> Jpipe.required "inUnion" inUnion
+        |> Jpipe.required "minMaxUnion" Jdec.string
+        |> Jpipe.required "intersection" Jdec.string
+        |> Jpipe.required "minMaxIntersection" Jdec.string
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("intersection", Jenc.string x.intersection)
-        , ("inUnion", encodeInUnion x.inUnion)
+        [ ("minlength", Jenc.string x.minlength)
         , ("maxlength", Jenc.string x.maxlength)
-        , ("minlength", Jenc.string x.minlength)
-        , ("minMaxIntersection", Jenc.string x.minMaxIntersection)
         , ("minmaxlength", Jenc.string x.minmaxlength)
-        , ("minMaxUnion", Jenc.string x.minMaxUnion)
         , ("union", Jenc.string x.union)
+        , ("inUnion", encodeInUnion x.inUnion)
+        , ("minMaxUnion", Jenc.string x.minMaxUnion)
+        , ("intersection", Jenc.string x.intersection)
+        , ("minMaxIntersection", Jenc.string x.minMaxIntersection)
         ]
 
 inUnion : Jdec.Decoder InUnion
diff --git a/base/schema-elm/test/inputs/schema/non-standard-ref.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/non-standard-ref.schema/default/QuickType.elm
index 9c4f0f3..0a1de08 100644
--- a/base/schema-elm/test/inputs/schema/non-standard-ref.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/non-standard-ref.schema/default/QuickType.elm
@@ -23,8 +23,8 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { bar : Int
-    , foo : Int
+    { foo : Int
+    , bar : Int
     , quux : Bool
     }
 
@@ -36,15 +36,15 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.required "bar" Jdec.int
         |> Jpipe.required "foo" Jdec.int
+        |> Jpipe.required "bar" Jdec.int
         |> Jpipe.required "quux" Jdec.bool
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("bar", Jenc.int x.bar)
-        , ("foo", Jenc.int x.foo)
+        [ ("foo", Jenc.int x.foo)
+        , ("bar", Jenc.int x.bar)
         , ("quux", Jenc.bool x.quux)
         ]
 
diff --git a/base/schema-elm/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.elm
index 2332f08..f9b0f3a 100644
--- a/base/schema-elm/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.elm
@@ -24,8 +24,8 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { b : Maybe String
-    , kind : Kind
+    { kind : Kind
+    , b : Maybe String
     }
 
 type Kind
@@ -40,14 +40,14 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "b" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.required "kind" kind
+        |> Jpipe.optional "b" (Jdec.nullable Jdec.string) Nothing
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("b", makeNullableEncoder Jenc.string x.b)
-        , ("kind", encodeKind x.kind)
+        [ ("kind", encodeKind x.kind)
+        , ("b", makeNullableEncoder Jenc.string x.b)
         ]
 
 kind : Jdec.Decoder Kind
diff --git a/base/schema-elm/test/inputs/schema/optional-any.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/optional-any.schema/default/QuickType.elm
index 6d4f255..291cd86 100644
--- a/base/schema-elm/test/inputs/schema/optional-any.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/optional-any.schema/default/QuickType.elm
@@ -23,8 +23,8 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { bar : Bool
-    , foo : Maybe Jdec.Value
+    { foo : Maybe Jdec.Value
+    , bar : Bool
     }
 
 -- decoders and encoders
@@ -35,14 +35,14 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.required "bar" Jdec.bool
         |> Jpipe.optional "foo" (Jdec.nullable Jdec.value) Nothing
+        |> Jpipe.required "bar" Jdec.bool
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("bar", Jenc.bool x.bar)
-        , ("foo", makeNullableEncoder identity x.foo)
+        [ ("foo", makeNullableEncoder identity x.foo)
+        , ("bar", Jenc.bool x.bar)
         ]
 
 --- encoder helpers
diff --git a/base/schema-elm/test/inputs/schema/optional-const-ref.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/optional-const-ref.schema/default/QuickType.elm
index 12131e2..0798213 100644
--- a/base/schema-elm/test/inputs/schema/optional-const-ref.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/optional-const-ref.schema/default/QuickType.elm
@@ -25,12 +25,12 @@ import Dict exposing (Dict)
 
 type alias QuickType =
     { coordinates : Maybe (List Coordinate)
-    , count : Maybe Int
-    , label : Maybe String
     , requiredCoordinates : List Coordinate
+    , count : Maybe Int
     , requiredCount : Int
-    , requiredLabel : String
     , weight : Maybe Float
+    , label : Maybe String
+    , requiredLabel : String
     }
 
 type alias Coordinate =
@@ -47,23 +47,23 @@ quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
         |> Jpipe.optional "coordinates" (Jdec.nullable (Jdec.list coordinate)) Nothing
-        |> Jpipe.optional "count" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "label" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.required "requiredCoordinates" (Jdec.list coordinate)
+        |> Jpipe.optional "count" (Jdec.nullable Jdec.int) Nothing
         |> Jpipe.required "requiredCount" Jdec.int
-        |> Jpipe.required "requiredLabel" Jdec.string
         |> Jpipe.optional "weight" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.optional "label" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.required "requiredLabel" Jdec.string
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
         [ ("coordinates", makeNullableEncoder (Jenc.list encodeCoordinate) x.coordinates)
-        , ("count", makeNullableEncoder Jenc.int x.count)
-        , ("label", makeNullableEncoder Jenc.string x.label)
         , ("requiredCoordinates", Jenc.list encodeCoordinate x.requiredCoordinates)
+        , ("count", makeNullableEncoder Jenc.int x.count)
         , ("requiredCount", Jenc.int x.requiredCount)
-        , ("requiredLabel", Jenc.string x.requiredLabel)
         , ("weight", makeNullableEncoder Jenc.float x.weight)
+        , ("label", makeNullableEncoder Jenc.string x.label)
+        , ("requiredLabel", Jenc.string x.requiredLabel)
         ]
 
 coordinate : Jdec.Decoder Coordinate
diff --git a/base/schema-elm/test/inputs/schema/optional-constraints.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/optional-constraints.schema/default/QuickType.elm
index 0264f3e..947cf6a 100644
--- a/base/schema-elm/test/inputs/schema/optional-constraints.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/optional-constraints.schema/default/QuickType.elm
@@ -23,11 +23,11 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { optDouble : Maybe Float
+    { reqZeroMin : Int
     , optInt : Maybe Int
-    , optPattern : Maybe String
+    , optDouble : Maybe Float
     , optString : Maybe String
-    , reqZeroMin : Int
+    , optPattern : Maybe String
     }
 
 -- decoders and encoders
@@ -38,20 +38,20 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "optDouble" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.required "reqZeroMin" Jdec.int
         |> Jpipe.optional "optInt" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "optPattern" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "optDouble" (Jdec.nullable Jdec.float) Nothing
         |> Jpipe.optional "optString" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.required "reqZeroMin" Jdec.int
+        |> Jpipe.optional "optPattern" (Jdec.nullable Jdec.string) Nothing
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("optDouble", makeNullableEncoder Jenc.float x.optDouble)
+        [ ("reqZeroMin", Jenc.int x.reqZeroMin)
         , ("optInt", makeNullableEncoder Jenc.int x.optInt)
-        , ("optPattern", makeNullableEncoder Jenc.string x.optPattern)
+        , ("optDouble", makeNullableEncoder Jenc.float x.optDouble)
         , ("optString", makeNullableEncoder Jenc.string x.optString)
-        , ("reqZeroMin", Jenc.int x.reqZeroMin)
+        , ("optPattern", makeNullableEncoder Jenc.string x.optPattern)
         ]
 
 --- encoder helpers
diff --git a/base/schema-elm/test/inputs/schema/optional-date-time.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/optional-date-time.schema/default/QuickType.elm
index a6b2e76..f4547b6 100644
--- a/base/schema-elm/test/inputs/schema/optional-date-time.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/optional-date-time.schema/default/QuickType.elm
@@ -23,12 +23,12 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { optionalDate : Maybe String
-    , optionalDateTime : Maybe String
-    , optionalTime : Maybe String
-    , requiredDate : String
-    , requiredDateTime : String
+    { requiredDate : String
     , requiredTime : String
+    , requiredDateTime : String
+    , optionalDate : Maybe String
+    , optionalTime : Maybe String
+    , optionalDateTime : Maybe String
     }
 
 -- decoders and encoders
@@ -39,22 +39,22 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "optional-date" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "optional-date-time" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "optional-time" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.required "required-date" Jdec.string
-        |> Jpipe.required "required-date-time" Jdec.string
         |> Jpipe.required "required-time" Jdec.string
+        |> Jpipe.required "required-date-time" Jdec.string
+        |> Jpipe.optional "optional-date" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "optional-time" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "optional-date-time" (Jdec.nullable Jdec.string) Nothing
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("optional-date", makeNullableEncoder Jenc.string x.optionalDate)
-        , ("optional-date-time", makeNullableEncoder Jenc.string x.optionalDateTime)
-        , ("optional-time", makeNullableEncoder Jenc.string x.optionalTime)
-        , ("required-date", Jenc.string x.requiredDate)
-        , ("required-date-time", Jenc.string x.requiredDateTime)
+        [ ("required-date", Jenc.string x.requiredDate)
         , ("required-time", Jenc.string x.requiredTime)
+        , ("required-date-time", Jenc.string x.requiredDateTime)
+        , ("optional-date", makeNullableEncoder Jenc.string x.optionalDate)
+        , ("optional-time", makeNullableEncoder Jenc.string x.optionalTime)
+        , ("optional-date-time", makeNullableEncoder Jenc.string x.optionalDateTime)
         ]
 
 --- encoder helpers
diff --git a/base/schema-elm/test/inputs/schema/prefix-items.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/prefix-items.schema/default/QuickType.elm
index bcf7c51..4b0390f 100644
--- a/base/schema-elm/test/inputs/schema/prefix-items.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/prefix-items.schema/default/QuickType.elm
@@ -24,8 +24,8 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { open : List Open
-    , tuple : List Open
+    { tuple : List Open
+    , open : List Open
     }
 
 type Open
@@ -40,14 +40,14 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.required "open" (Jdec.list open)
         |> Jpipe.required "tuple" (Jdec.list open)
+        |> Jpipe.required "open" (Jdec.list open)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("open", Jenc.list encodeOpen x.open)
-        , ("tuple", Jenc.list encodeOpen x.tuple)
+        [ ("tuple", Jenc.list encodeOpen x.tuple)
+        , ("open", Jenc.list encodeOpen x.open)
         ]
 
 open : Jdec.Decoder Open
diff --git a/head/schema-elm/test/inputs/schema/property-order.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/property-order.schema/default/QuickType.elm
new file mode 100644
index 0000000..383541b
--- /dev/null
+++ b/head/schema-elm/test/inputs/schema/property-order.schema/default/QuickType.elm
@@ -0,0 +1,88 @@
+-- To decode the JSON data, add this file to your project, run
+--
+--     elm install NoRedInk/elm-json-decode-pipeline
+--
+-- add these imports
+--
+--     import Json.Decode exposing (decodeString)
+--     import QuickType exposing (quickType)
+--
+-- and you're off to the races with
+--
+--     decodeString quickType myJsonString
+
+module QuickType exposing
+    ( QuickType
+    , quickTypeToString
+    , quickType
+    , Ordered
+    )
+
+import Json.Decode as Jdec
+import Json.Decode.Pipeline as Jpipe
+import Json.Encode as Jenc
+import Dict exposing (Dict)
+
+type alias QuickType =
+    { zebra : String
+    , mango : Float
+    , apple : Bool
+    , delta : String
+    , banana : Int
+    , ordered : Ordered
+    }
+
+type alias Ordered =
+    { mango : Float
+    , zebra : String
+    , apple : Bool
+    }
+
+-- decoders and encoders
+
+quickTypeToString : QuickType -> String
+quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
+
+quickType : Jdec.Decoder QuickType
+quickType =
+    Jdec.succeed QuickType
+        |> Jpipe.required "zebra" Jdec.string
+        |> Jpipe.required "mango" Jdec.float
+        |> Jpipe.required "apple" Jdec.bool
+        |> Jpipe.required "delta" Jdec.string
+        |> Jpipe.required "banana" Jdec.int
+        |> Jpipe.required "ordered" ordered
+
+encodeQuickType : QuickType -> Jenc.Value
+encodeQuickType x =
+    Jenc.object
+        [ ("zebra", Jenc.string x.zebra)
+        , ("mango", Jenc.float x.mango)
+        , ("apple", Jenc.bool x.apple)
+        , ("delta", Jenc.string x.delta)
+        , ("banana", Jenc.int x.banana)
+        , ("ordered", encodeOrdered x.ordered)
+        ]
+
+ordered : Jdec.Decoder Ordered
+ordered =
+    Jdec.succeed Ordered
+        |> Jpipe.required "mango" Jdec.float
+        |> Jpipe.required "zebra" Jdec.string
+        |> Jpipe.required "apple" Jdec.bool
+
+encodeOrdered : Ordered -> Jenc.Value
+encodeOrdered x =
+    Jenc.object
+        [ ("mango", Jenc.float x.mango)
+        , ("zebra", Jenc.string x.zebra)
+        , ("apple", Jenc.bool x.apple)
+        ]
+
+--- encoder helpers
+
+makeNullableEncoder : (a -> Jenc.Value) -> Maybe a -> Jenc.Value
+makeNullableEncoder f m =
+    case m of
+    Just x -> f x
+    Nothing -> Jenc.null
diff --git a/base/schema-elm/test/inputs/schema/renaming-bug.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/renaming-bug.schema/default/QuickType.elm
index ef2f9f0..68b147f 100644
--- a/base/schema-elm/test/inputs/schema/renaming-bug.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/renaming-bug.schema/default/QuickType.elm
@@ -45,13 +45,13 @@ type alias QuickType =
 
 type alias Fruit =
     { apple : Maybe Bool
-    , berries : Maybe (List Berry)
     , orange : Maybe Bool
+    , berries : Maybe (List Berry)
     }
 
 type alias Berry =
-    { color : Maybe Color
-    , name : Maybe String
+    { name : Maybe String
+    , color : Maybe Color
     , shapes : Maybe (List Shape)
     }
 
@@ -60,8 +60,8 @@ type alias Color =
     }
 
 type alias Shape =
-    { geometry : Maybe Geometry
-    , history : Maybe History
+    { history : Maybe History
+    , geometry : Maybe Geometry
     }
 
 type alias Geometry =
@@ -78,9 +78,9 @@ type alias RectShape =
     }
 
 type alias Part =
-    { depth : Maybe String
-    , length : Maybe String
+    { length : Maybe String
     , width : Maybe String
+    , depth : Maybe String
     }
 
 type alias History =
@@ -88,12 +88,12 @@ type alias History =
     }
 
 type alias Vehicle =
-    { brand : Maybe String
-    , id : Maybe String
-    , speed : Maybe Speed
-    , subModule : Maybe Bool
+    { id : Maybe String
     , vehicleType : Maybe VehicleType
+    , speed : Maybe Speed
     , year : Maybe String
+    , brand : Maybe String
+    , subModule : Maybe Bool
     }
 
 type alias Speed =
@@ -101,8 +101,8 @@ type alias Speed =
     }
 
 type alias Limit =
-    { maximum : Maybe Float
-    , minimum : Maybe Float
+    { minimum : Maybe Float
+    , maximum : Maybe Float
     }
 
 type alias VehicleType =
@@ -154,29 +154,29 @@ fruit : Jdec.Decoder Fruit
 fruit =
     Jdec.succeed Fruit
         |> Jpipe.optional "apple" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "berries" (Jdec.nullable (Jdec.list berry)) Nothing
         |> Jpipe.optional "orange" (Jdec.nullable Jdec.bool) Nothing
+        |> Jpipe.optional "berries" (Jdec.nullable (Jdec.list berry)) Nothing
 
 encodeFruit : Fruit -> Jenc.Value
 encodeFruit x =
     Jenc.object
         [ ("apple", makeNullableEncoder Jenc.bool x.apple)
-        , ("berries", makeNullableEncoder (Jenc.list encodeBerry) x.berries)
         , ("orange", makeNullableEncoder Jenc.bool x.orange)
+        , ("berries", makeNullableEncoder (Jenc.list encodeBerry) x.berries)
         ]
 
 berry : Jdec.Decoder Berry
 berry =
     Jdec.succeed Berry
-        |> Jpipe.optional "color" (Jdec.nullable color) Nothing
         |> Jpipe.optional "name" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "color" (Jdec.nullable color) Nothing
         |> Jpipe.optional "shapes" (Jdec.nullable (Jdec.list shape)) Nothing
 
 encodeBerry : Berry -> Jenc.Value
 encodeBerry x =
     Jenc.object
-        [ ("color", makeNullableEncoder encodeColor x.color)
-        , ("name", makeNullableEncoder Jenc.string x.name)
+        [ ("name", makeNullableEncoder Jenc.string x.name)
+        , ("color", makeNullableEncoder encodeColor x.color)
         , ("shapes", makeNullableEncoder (Jenc.list encodeShape) x.shapes)
         ]
 
@@ -194,14 +194,14 @@ encodeColor x =
 shape : Jdec.Decoder Shape
 shape =
     Jdec.succeed Shape
-        |> Jpipe.optional "geometry" (Jdec.nullable geometry) Nothing
         |> Jpipe.optional "history" (Jdec.nullable history) Nothing
+        |> Jpipe.optional "geometry" (Jdec.nullable geometry) Nothing
 
 encodeShape : Shape -> Jenc.Value
 encodeShape x =
     Jenc.object
-        [ ("geometry", makeNullableEncoder encodeGeometry x.geometry)
-        , ("history", makeNullableEncoder encodeHistory x.history)
+        [ ("history", makeNullableEncoder encodeHistory x.history)
+        , ("geometry", makeNullableEncoder encodeGeometry x.geometry)
         ]
 
 geometry : Jdec.Decoder Geometry
@@ -242,16 +242,16 @@ encodeRectShape x =
 part : Jdec.Decoder Part
 part =
     Jdec.succeed Part
-        |> Jpipe.optional "depth" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.optional "length" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.optional "width" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "depth" (Jdec.nullable Jdec.string) Nothing
 
 encodePart : Part -> Jenc.Value
 encodePart x =
     Jenc.object
-        [ ("depth", makeNullableEncoder Jenc.string x.depth)
-        , ("length", makeNullableEncoder Jenc.string x.length)
+        [ ("length", makeNullableEncoder Jenc.string x.length)
         , ("width", makeNullableEncoder Jenc.string x.width)
+        , ("depth", makeNullableEncoder Jenc.string x.depth)
         ]
 
 history : Jdec.Decoder History
@@ -268,22 +268,22 @@ encodeHistory x =
 vehicle : Jdec.Decoder Vehicle
 vehicle =
     Jdec.succeed Vehicle
-        |> Jpipe.optional "brand" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.optional "id" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "speed" (Jdec.nullable speed) Nothing
-        |> Jpipe.optional "subModule" (Jdec.nullable Jdec.bool) Nothing
         |> Jpipe.optional "type" (Jdec.nullable vehicleType) Nothing
+        |> Jpipe.optional "speed" (Jdec.nullable speed) Nothing
         |> Jpipe.optional "year" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "brand" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "subModule" (Jdec.nullable Jdec.bool) Nothing
 
 encodeVehicle : Vehicle -> Jenc.Value
 encodeVehicle x =
     Jenc.object
-        [ ("brand", makeNullableEncoder Jenc.string x.brand)
-        , ("id", makeNullableEncoder Jenc.string x.id)
-        , ("speed", makeNullableEncoder encodeSpeed x.speed)
-        , ("subModule", makeNullableEncoder Jenc.bool x.subModule)
+        [ ("id", makeNullableEncoder Jenc.string x.id)
         , ("type", makeNullableEncoder encodeVehicleType x.vehicleType)
+        , ("speed", makeNullableEncoder encodeSpeed x.speed)
         , ("year", makeNullableEncoder Jenc.string x.year)
+        , ("brand", makeNullableEncoder Jenc.string x.brand)
+        , ("subModule", makeNullableEncoder Jenc.bool x.subModule)
         ]
 
 speed : Jdec.Decoder Speed
@@ -300,14 +300,14 @@ encodeSpeed x =
 limit : Jdec.Decoder Limit
 limit =
     Jdec.succeed Limit
-        |> Jpipe.optional "maximum" (Jdec.nullable Jdec.float) Nothing
         |> Jpipe.optional "minimum" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.optional "maximum" (Jdec.nullable Jdec.float) Nothing
 
 encodeLimit : Limit -> Jenc.Value
 encodeLimit x =
     Jenc.object
-        [ ("maximum", makeNullableEncoder Jenc.float x.maximum)
-        , ("minimum", makeNullableEncoder Jenc.float x.minimum)
+        [ ("minimum", makeNullableEncoder Jenc.float x.minimum)
+        , ("maximum", makeNullableEncoder Jenc.float x.maximum)
         ]
 
 vehicleType : Jdec.Decoder VehicleType
diff --git a/base/schema-elm/test/inputs/schema/uuid.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/uuid.schema/default/QuickType.elm
index 2e9b62c..5a98d38 100644
--- a/base/schema-elm/test/inputs/schema/uuid.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/uuid.schema/default/QuickType.elm
@@ -23,11 +23,11 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { arrNullable : Maybe (List (Maybe String))
-    , arrOne : Maybe (List String)
-    , nullable : Maybe String
-    , one : String
+    { one : String
     , optional : Maybe String
+    , nullable : Maybe String
+    , arrOne : Maybe (List String)
+    , arrNullable : Maybe (List (Maybe String))
     , unionWithEnum : String
     }
 
@@ -39,21 +39,21 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing
-        |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing
         |> Jpipe.required "one" Jdec.string
         |> Jpipe.optional "optional" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing
         |> Jpipe.required "unionWithEnum" Jdec.string
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("arrNullable", makeNullableEncoder (Jenc.list (makeNullableEncoder Jenc.string)) x.arrNullable)
-        , ("arrOne", makeNullableEncoder (Jenc.list Jenc.string) x.arrOne)
-        , ("nullable", makeNullableEncoder Jenc.string x.nullable)
-        , ("one", Jenc.string x.one)
+        [ ("one", Jenc.string x.one)
         , ("optional", makeNullableEncoder Jenc.string x.optional)
+        , ("nullable", makeNullableEncoder Jenc.string x.nullable)
+        , ("arrOne", makeNullableEncoder (Jenc.list Jenc.string) x.arrOne)
+        , ("arrNullable", makeNullableEncoder (Jenc.list (makeNullableEncoder Jenc.string)) x.arrNullable)
         , ("unionWithEnum", Jenc.string x.unionWithEnum)
         ]
 
diff --git a/base/schema-flow/test/inputs/schema/accessors.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/accessors.schema/default/TopLevel.js
index 1a525b0..52a7b5f 100644
--- a/base/schema-flow/test/inputs/schema/accessors.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/accessors.schema/default/TopLevel.js
@@ -10,10 +10,10 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    bar:   string;
+    union: Union;
     enum:  Enum;
     foo:   string;
-    union: Union;
+    bar:   string;
 };
 
 export type Enum =
@@ -188,10 +188,10 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: "" },
+        { json: "union", js: "union", typ: u(true, 3.14) },
         { json: "enum", js: "enum", typ: r("Enum") },
         { json: "foo", js: "foo", typ: "" },
-        { json: "union", js: "union", typ: u(true, 3.14) },
+        { json: "bar", js: "bar", typ: "" },
     ], false),
     "Enum": [
         "red",
diff --git a/base/schema-flow/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
index e946dd4..64e3dc5 100644
--- a/base/schema-flow/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
@@ -12,8 +12,8 @@
 export type TopLevel = {
     amount:       number;
     frequency:    Frequency;
-    description?: string;
     type:         Type;
+    description?: string;
 };
 
 export type Frequency =
@@ -192,8 +192,8 @@ const typeMap: any = {
     "TopLevel": o([
         { json: "amount", js: "amount", typ: 3.14 },
         { json: "frequency", js: "frequency", typ: r("Frequency") },
-        { json: "description", js: "description", typ: u(undefined, "") },
         { json: "type", js: "type", typ: r("Type") },
+        { json: "description", js: "description", typ: u(undefined, "") },
     ], false),
     "Frequency": [
         "Weekly",
diff --git a/base/schema-flow/test/inputs/schema/bool-string.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/bool-string.schema/default/TopLevel.js
index 50e4bc5..d85c927 100644
--- a/base/schema-flow/test/inputs/schema/bool-string.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/bool-string.schema/default/TopLevel.js
@@ -10,11 +10,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    arrNullable?:         (null | string)[];
-    arrOne?:              string[];
-    nullable:             null | string;
     one:                  string;
     optional?:            string;
+    nullable:             null | string;
+    arrOne?:              string[];
+    arrNullable?:         (null | string)[];
     unionWithBool:        UnionWithBool;
     unionWithBoolAndEnum: UnionWithBool;
     [property: string]: mixed;
@@ -187,11 +187,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
-        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
-        { json: "nullable", js: "nullable", typ: u(null, "") },
         { json: "one", js: "one", typ: "" },
         { json: "optional", js: "optional", typ: u(undefined, "") },
+        { json: "nullable", js: "nullable", typ: u(null, "") },
+        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
+        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
         { json: "unionWithBool", js: "unionWithBool", typ: u(true, "") },
         { json: "unionWithBoolAndEnum", js: "unionWithBoolAndEnum", typ: u(true, "") },
     ], "any"),
diff --git a/base/schema-flow/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
index f805a63..8d99d5f 100644
--- a/base/schema-flow/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
@@ -10,9 +10,9 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
+    foo:         string;
     disallowed?: mixed;
     empty:       mixed[];
-    foo:         string;
     impossible?: mixed;
 };
 
@@ -181,9 +181,9 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "foo", js: "foo", typ: "" },
         { json: "disallowed", js: "disallowed", typ: u(undefined, "any") },
         { json: "empty", js: "empty", typ: a("any") },
-        { json: "foo", js: "foo", typ: "" },
         { json: "impossible", js: "impossible", typ: u(undefined, "any") },
     ], false),
 };
diff --git a/base/schema-flow/test/inputs/schema/comment-injection.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/comment-injection.schema/default/TopLevel.js
index 7a47d60..de92c5a 100644
--- a/base/schema-flow/test/inputs/schema/comment-injection.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/comment-injection.schema/default/TopLevel.js
@@ -24,18 +24,6 @@
  * }
  */
 export type TopLevel = {
-    /**
-     * Ends with a backslash \
-     */
-    trailingBackslash?: string;
-    /**
-     * Ends with a quote "
-     */
-    trailingQuote?: string;
-    /**
-     * Ends with a triple quote """
-     */
-    trailingTripleQuote?: string;
     /**
      * Property delimiters:
      * * /
@@ -51,6 +39,18 @@ export type TopLevel = {
      * }
      */
     value: string;
+    /**
+     * Ends with a backslash \
+     */
+    trailingBackslash?: string;
+    /**
+     * Ends with a quote "
+     */
+    trailingQuote?: string;
+    /**
+     * Ends with a triple quote """
+     */
+    trailingTripleQuote?: string;
 };
 
 // Converts JSON strings to/from your types
@@ -218,10 +218,10 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "value", js: "value", typ: "" },
         { json: "trailingBackslash", js: "trailingBackslash", typ: u(undefined, "") },
         { json: "trailingQuote", js: "trailingQuote", typ: u(undefined, "") },
         { json: "trailingTripleQuote", js: "trailingTripleQuote", typ: u(undefined, "") },
-        { json: "value", js: "value", typ: "" },
     ], false),
 };
 
diff --git a/base/schema-flow/test/inputs/schema/const-non-string.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/const-non-string.schema/default/TopLevel.js
index 2922ce8..2ba823c 100644
--- a/base/schema-flow/test/inputs/schema/const-non-string.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/const-non-string.schema/default/TopLevel.js
@@ -10,11 +10,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
+    version: number;
     amount:  number;
+    ratio:   number;
     enabled: boolean;
     kind:    Kind;
-    ratio:   number;
-    version: number;
     [property: string]: mixed;
 };
 
@@ -186,11 +186,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "version", js: "version", typ: 3.14 },
         { json: "amount", js: "amount", typ: 0 },
+        { json: "ratio", js: "ratio", typ: 3.14 },
         { json: "enabled", js: "enabled", typ: true },
         { json: "kind", js: "kind", typ: r("Kind") },
-        { json: "ratio", js: "ratio", typ: 3.14 },
-        { json: "version", js: "version", typ: 3.14 },
     ], "any"),
     "Kind": [
         "widget",
diff --git a/base/schema-flow/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
index c62808d..065cb7e 100644
--- a/base/schema-flow/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
@@ -10,8 +10,8 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    bar: BarUnion;
     foo: string;
+    bar: BarUnion;
     [property: string]: mixed;
 };
 
@@ -185,8 +185,8 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: u(Date, r("BarEnum")) },
         { json: "foo", js: "foo", typ: "" },
+        { json: "bar", js: "bar", typ: u(Date, r("BarEnum")) },
     ], "any"),
     "BarEnum": [
         "quux",
diff --git a/base/schema-flow/test/inputs/schema/date-time.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/date-time.schema/default/TopLevel.js
index 42d8e36..7901262 100644
--- a/base/schema-flow/test/inputs/schema/date-time.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/date-time.schema/default/TopLevel.js
@@ -10,11 +10,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    "complex-union-array": ComplexUnionArrayElement[];
     date:                  Date;
-    "date-time":           Date;
     time:                  string;
+    "date-time":           Date;
     "union-array":         string[];
+    "complex-union-array": ComplexUnionArrayElement[];
 };
 
 export type ComplexUnionArrayElement = Date | ComplexUnionArrayEnum | number;
@@ -188,11 +188,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "complex-union-array", js: "complex-union-array", typ: a(u(Date, r("ComplexUnionArrayEnum"), 0)) },
         { json: "date", js: "date", typ: Date },
-        { json: "date-time", js: "date-time", typ: Date },
         { json: "time", js: "time", typ: "" },
+        { json: "date-time", js: "date-time", typ: Date },
         { json: "union-array", js: "union-array", typ: a("") },
+        { json: "complex-union-array", js: "complex-union-array", typ: a(u(Date, r("ComplexUnionArrayEnum"), 0)) },
     ], false),
     "ComplexUnionArrayEnum": [
         "foo",
diff --git a/base/schema-flow/test/inputs/schema/description.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/description.schema/default/TopLevel.js
index 7e92f34..70cf98b 100644
--- a/base/schema-flow/test/inputs/schema/description.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/description.schema/default/TopLevel.js
@@ -15,19 +15,19 @@
  */
 export type TopLevel = {
     /**
-     * A pretty boolean
+     * Either a number or a string
      */
-    bar?: boolean;
+    union: Union;
     /**
      * An enumeration
      */
-    enum:               Enum;
-    foo?:               number;
-    "object-or-string": ObjectOrStringUnion;
+    enum: Enum;
+    foo?: number;
     /**
-     * Either a number or a string
+     * A pretty boolean
      */
-    union: Union;
+    bar?:               boolean;
+    "object-or-string": ObjectOrStringUnion;
 };
 
 /**
@@ -217,11 +217,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: u(undefined, true) },
+        { json: "union", js: "union", typ: u(3.14, "") },
         { json: "enum", js: "enum", typ: r("Enum") },
         { json: "foo", js: "foo", typ: u(undefined, 3.14) },
+        { json: "bar", js: "bar", typ: u(undefined, true) },
         { json: "object-or-string", js: "object-or-string", typ: u(r("ObjectOrStringObject"), "") },
-        { json: "union", js: "union", typ: u(3.14, "") },
     ], false),
     "ObjectOrStringObject": o([
         { json: "prop", js: "prop", typ: 3.14 },
diff --git a/base/schema-flow/test/inputs/schema/direct-union.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/direct-union.schema/default/TopLevel.js
index 9aeb8d9..ec72b5c 100644
--- a/base/schema-flow/test/inputs/schema/direct-union.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/direct-union.schema/default/TopLevel.js
@@ -14,8 +14,8 @@ export type TopLevel = {
 };
 
 export type Thing = {
-    optional?: Anything;
     required:  Anything;
+    optional?: Anything;
 };
 
 export type Anything = mixed[] | boolean | number | number | { [key: string]: mixed } | null | string;
@@ -188,8 +188,8 @@ const typeMap: any = {
         { json: "stuff", js: "stuff", typ: m(r("Thing")) },
     ], false),
     "Thing": o([
-        { json: "optional", js: "optional", typ: u(undefined, u(a("any"), true, 3.14, 0, m("any"), null, "")) },
         { json: "required", js: "required", typ: u(a("any"), true, 3.14, 0, m("any"), null, "") },
+        { json: "optional", js: "optional", typ: u(undefined, u(a("any"), true, 3.14, 0, m("any"), null, "")) },
     ], false),
 };
 
diff --git a/base/schema-flow/test/inputs/schema/enum.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/enum.schema/default/TopLevel.js
index 8a5e3fb..b7d2421 100644
--- a/base/schema-flow/test/inputs/schema/enum.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/enum.schema/default/TopLevel.js
@@ -10,11 +10,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    arr?:      Arr[];
-    for?:      string;
-    gve:       Gve;
     lvc?:      Lvc;
+    gve:       Gve;
+    arr?:      Arr[];
     otherArr?: OtherArr[];
+    for?:      string;
     [property: string]: mixed;
 };
 
@@ -200,11 +200,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "arr", js: "arr", typ: u(undefined, a(u(r("OtherArr"), 0))) },
-        { json: "for", js: "for", typ: u(undefined, "") },
-        { json: "gve", js: "gve", typ: r("Gve") },
         { json: "lvc", js: "lvc", typ: u(undefined, r("Lvc")) },
+        { json: "gve", js: "gve", typ: r("Gve") },
+        { json: "arr", js: "arr", typ: u(undefined, a(u(r("OtherArr"), 0))) },
         { json: "otherArr", js: "otherArr", typ: u(undefined, a(r("OtherArr"))) },
+        { json: "for", js: "for", typ: u(undefined, "") },
     ], "any"),
     "OtherArr": [
         "foo",
diff --git a/base/schema-flow/test/inputs/schema/integer-string.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/integer-string.schema/default/TopLevel.js
index 13d8444..08d9b96 100644
--- a/base/schema-flow/test/inputs/schema/integer-string.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/integer-string.schema/default/TopLevel.js
@@ -10,11 +10,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    arrNullable?:        (null | string)[];
-    arrOne?:             string[];
-    nullable:            null | string;
     one:                 string;
     optional?:           string;
+    nullable:            null | string;
+    arrOne?:             string[];
+    arrNullable?:        (null | string)[];
     unionWithInt:        UnionWithInt;
     unionWithIntAndEnum: UnionWithInt;
     [property: string]: mixed;
@@ -187,11 +187,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
-        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
-        { json: "nullable", js: "nullable", typ: u(null, "") },
         { json: "one", js: "one", typ: "" },
         { json: "optional", js: "optional", typ: u(undefined, "") },
+        { json: "nullable", js: "nullable", typ: u(null, "") },
+        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
+        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
         { json: "unionWithInt", js: "unionWithInt", typ: u(0, "") },
         { json: "unionWithIntAndEnum", js: "unionWithIntAndEnum", typ: u(0, "") },
     ], "any"),
diff --git a/base/schema-flow/test/inputs/schema/integer-type.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/integer-type.schema/default/TopLevel.js
index 02449eb..55fa559 100644
--- a/base/schema-flow/test/inputs/schema/integer-type.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/integer-type.schema/default/TopLevel.js
@@ -10,15 +10,15 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
+    small_positive: number;
+    small_negative: number;
+    i32_range:      number;
     above_i32_max:  number;
     below_i32_min:  number;
-    i32_range:      number;
-    large_bounds:   number;
-    only_maximum:   number;
     only_minimum:   number;
-    small_negative: number;
-    small_positive: number;
+    only_maximum:   number;
     unbounded:      number;
+    large_bounds:   number;
     [property: string]: mixed;
 };
 
@@ -187,15 +187,15 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "small_positive", js: "small_positive", typ: 0 },
+        { json: "small_negative", js: "small_negative", typ: 0 },
+        { json: "i32_range", js: "i32_range", typ: 0 },
         { json: "above_i32_max", js: "above_i32_max", typ: 0 },
         { json: "below_i32_min", js: "below_i32_min", typ: 0 },
-        { json: "i32_range", js: "i32_range", typ: 0 },
-        { json: "large_bounds", js: "large_bounds", typ: 0 },
-        { json: "only_maximum", js: "only_maximum", typ: 0 },
         { json: "only_minimum", js: "only_minimum", typ: 0 },
-        { json: "small_negative", js: "small_negative", typ: 0 },
-        { json: "small_positive", js: "small_positive", typ: 0 },
+        { json: "only_maximum", js: "only_maximum", typ: 0 },
         { json: "unbounded", js: "unbounded", typ: 0 },
+        { json: "large_bounds", js: "large_bounds", typ: 0 },
     ], "any"),
 };
 
diff --git a/base/schema-flow/test/inputs/schema/light.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/light.schema/default/TopLevel.js
index 29356ea..ea1c866 100644
--- a/base/schema-flow/test/inputs/schema/light.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/light.schema/default/TopLevel.js
@@ -14,8 +14,8 @@ export type TopLevel = {
 };
 
 export type LightParams = {
-    app_id:    string;
     outlet_id: string;
+    app_id:    string;
     rgba:      string;
 };
 
@@ -187,8 +187,8 @@ const typeMap: any = {
         { json: "LightParams", js: "LightParams", typ: r("LightParams") },
     ], false),
     "LightParams": o([
-        { json: "app_id", js: "app_id", typ: "" },
         { json: "outlet_id", js: "outlet_id", typ: "" },
+        { json: "app_id", js: "app_id", typ: "" },
         { json: "rgba", js: "rgba", typ: "" },
     ], false),
 };
diff --git a/base/schema-flow/test/inputs/schema/min-max-items.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/min-max-items.schema/default/TopLevel.js
index 024f0f0..fd06f79 100644
--- a/base/schema-flow/test/inputs/schema/min-max-items.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/min-max-items.schema/default/TopLevel.js
@@ -10,9 +10,9 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
+    minOnly:    string[];
     maxOnly:    number[];
     minAndMax:  number[];
-    minOnly:    string[];
     plain:      string[];
     unionItems: UnionItem[];
     [property: string]: mixed;
@@ -185,9 +185,9 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "minOnly", js: "minOnly", typ: a("") },
         { json: "maxOnly", js: "maxOnly", typ: a(0) },
         { json: "minAndMax", js: "minAndMax", typ: a(3.14) },
-        { json: "minOnly", js: "minOnly", typ: a("") },
         { json: "plain", js: "plain", typ: a("") },
         { json: "unionItems", js: "unionItems", typ: a(u(0, "")) },
     ], "any"),
diff --git a/base/schema-flow/test/inputs/schema/minmax-integer.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
index 96a8d7e..1a15ccc 100644
--- a/base/schema-flow/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
@@ -11,13 +11,13 @@
 
 export type TopLevel = {
     free:               number;
-    intersection:       number;
-    max:                number;
     min:                number;
+    max:                number;
     minmax:             number;
-    minMaxIntersection: number;
-    minMaxUnion:        number;
     union:              number;
+    minMaxUnion:        number;
+    intersection:       number;
+    minMaxIntersection: number;
     [property: string]: mixed;
 };
 
@@ -187,13 +187,13 @@ function r(name: string) {
 const typeMap: any = {
     "TopLevel": o([
         { json: "free", js: "free", typ: 0 },
-        { json: "intersection", js: "intersection", typ: 0 },
-        { json: "max", js: "max", typ: 0 },
         { json: "min", js: "min", typ: 0 },
+        { json: "max", js: "max", typ: 0 },
         { json: "minmax", js: "minmax", typ: 0 },
-        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 0 },
-        { json: "minMaxUnion", js: "minMaxUnion", typ: 0 },
         { json: "union", js: "union", typ: 0 },
+        { json: "minMaxUnion", js: "minMaxUnion", typ: 0 },
+        { json: "intersection", js: "intersection", typ: 0 },
+        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 0 },
     ], "any"),
 };
 
diff --git a/base/schema-flow/test/inputs/schema/minmax.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/minmax.schema/default/TopLevel.js
index 164d438..c3934b7 100644
--- a/base/schema-flow/test/inputs/schema/minmax.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/minmax.schema/default/TopLevel.js
@@ -11,13 +11,13 @@
 
 export type TopLevel = {
     free:               number;
-    intersection:       number;
-    max:                number;
     min:                number;
+    max:                number;
     minmax:             number;
-    minMaxIntersection: number;
-    minMaxUnion:        number;
     union:              number;
+    minMaxUnion:        number;
+    intersection:       number;
+    minMaxIntersection: number;
     [property: string]: mixed;
 };
 
@@ -187,13 +187,13 @@ function r(name: string) {
 const typeMap: any = {
     "TopLevel": o([
         { json: "free", js: "free", typ: 3.14 },
-        { json: "intersection", js: "intersection", typ: 3.14 },
-        { json: "max", js: "max", typ: 3.14 },
         { json: "min", js: "min", typ: 3.14 },
+        { json: "max", js: "max", typ: 3.14 },
         { json: "minmax", js: "minmax", typ: 3.14 },
-        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 3.14 },
-        { json: "minMaxUnion", js: "minMaxUnion", typ: 3.14 },
         { json: "union", js: "union", typ: 3.14 },
+        { json: "minMaxUnion", js: "minMaxUnion", typ: 3.14 },
+        { json: "intersection", js: "intersection", typ: 3.14 },
+        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 3.14 },
     ], "any"),
 };
 
diff --git a/base/schema-flow/test/inputs/schema/minmaxlength.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
index 0e076f8..d2ba20d 100644
--- a/base/schema-flow/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
@@ -10,14 +10,14 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    intersection:       string;
-    inUnion:            InUnion;
-    maxlength:          string;
     minlength:          string;
-    minMaxIntersection: string;
+    maxlength:          string;
     minmaxlength:       string;
-    minMaxUnion:        string;
     union:              string;
+    inUnion:            InUnion;
+    minMaxUnion:        string;
+    intersection:       string;
+    minMaxIntersection: string;
     [property: string]: mixed;
 };
 
@@ -188,14 +188,14 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "intersection", js: "intersection", typ: "" },
-        { json: "inUnion", js: "inUnion", typ: u(3.14, "") },
-        { json: "maxlength", js: "maxlength", typ: "" },
         { json: "minlength", js: "minlength", typ: "" },
-        { json: "minMaxIntersection", js: "minMaxIntersection", typ: "" },
+        { json: "maxlength", js: "maxlength", typ: "" },
         { json: "minmaxlength", js: "minmaxlength", typ: "" },
-        { json: "minMaxUnion", js: "minMaxUnion", typ: "" },
         { json: "union", js: "union", typ: "" },
+        { json: "inUnion", js: "inUnion", typ: u(3.14, "") },
+        { json: "minMaxUnion", js: "minMaxUnion", typ: "" },
+        { json: "intersection", js: "intersection", typ: "" },
+        { json: "minMaxIntersection", js: "minMaxIntersection", typ: "" },
     ], "any"),
 };
 
diff --git a/base/schema-flow/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
index ca68812..af889b6 100644
--- a/base/schema-flow/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
@@ -10,8 +10,8 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    bar:  number;
     foo:  number;
+    bar:  number;
     quux: boolean;
     [property: string]: mixed;
 };
@@ -181,8 +181,8 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: 0 },
         { json: "foo", js: "foo", typ: 0 },
+        { json: "bar", js: "bar", typ: 0 },
         { json: "quux", js: "quux", typ: true },
     ], "any"),
 };
diff --git a/base/schema-flow/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
index e5e3d2f..ac6382b 100644
--- a/base/schema-flow/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
@@ -10,8 +10,8 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    b?:   null | string;
     kind: Kind;
+    b?:   null | string;
     [property: string]: mixed;
 };
 
@@ -184,8 +184,8 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "b", js: "b", typ: u(undefined, u(null, "")) },
         { json: "kind", js: "kind", typ: r("Kind") },
+        { json: "b", js: "b", typ: u(undefined, u(null, "")) },
     ], "any"),
     "Kind": [
         "one",
diff --git a/base/schema-flow/test/inputs/schema/optional-any.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/optional-any.schema/default/TopLevel.js
index 71be7e6..f844f1f 100644
--- a/base/schema-flow/test/inputs/schema/optional-any.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/optional-any.schema/default/TopLevel.js
@@ -10,8 +10,8 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    bar:  boolean;
     foo?: mixed;
+    bar:  boolean;
 };
 
 // Converts JSON strings to/from your types
@@ -179,8 +179,8 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: true },
         { json: "foo", js: "foo", typ: u(undefined, "any") },
+        { json: "bar", js: "bar", typ: true },
     ], false),
 };
 
diff --git a/base/schema-flow/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
index 11dea9c..2b34c5e 100644
--- a/base/schema-flow/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
@@ -11,12 +11,12 @@
 
 export type TopLevel = {
     coordinates?:        Coordinate[];
-    count?:              number;
-    label?:              string;
     requiredCoordinates: Coordinate[];
+    count?:              number;
     requiredCount:       number;
-    requiredLabel:       string;
     weight?:             number;
+    label?:              string;
+    requiredLabel:       string;
 };
 
 export type Coordinate = {
@@ -190,12 +190,12 @@ function r(name: string) {
 const typeMap: any = {
     "TopLevel": o([
         { json: "coordinates", js: "coordinates", typ: u(undefined, a(r("Coordinate"))) },
-        { json: "count", js: "count", typ: u(undefined, 0) },
-        { json: "label", js: "label", typ: u(undefined, "") },
         { json: "requiredCoordinates", js: "requiredCoordinates", typ: a(r("Coordinate")) },
+        { json: "count", js: "count", typ: u(undefined, 0) },
         { json: "requiredCount", js: "requiredCount", typ: 0 },
-        { json: "requiredLabel", js: "requiredLabel", typ: "" },
         { json: "weight", js: "weight", typ: u(undefined, 3.14) },
+        { json: "label", js: "label", typ: u(undefined, "") },
+        { json: "requiredLabel", js: "requiredLabel", typ: "" },
     ], false),
     "Coordinate": o([
         { json: "latitude", js: "latitude", typ: 3.14 },
diff --git a/base/schema-flow/test/inputs/schema/optional-constraints.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
index d293411..8d9d63f 100644
--- a/base/schema-flow/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
@@ -10,11 +10,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    optDouble?:  number;
+    reqZeroMin:  number;
     optInt?:     number;
-    optPattern?: string;
+    optDouble?:  number;
     optString?:  string;
-    reqZeroMin:  number;
+    optPattern?: string;
     [property: string]: mixed;
 };
 
@@ -183,11 +183,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "optDouble", js: "optDouble", typ: u(undefined, 3.14) },
+        { json: "reqZeroMin", js: "reqZeroMin", typ: 0 },
         { json: "optInt", js: "optInt", typ: u(undefined, 0) },
-        { json: "optPattern", js: "optPattern", typ: u(undefined, "") },
+        { json: "optDouble", js: "optDouble", typ: u(undefined, 3.14) },
         { json: "optString", js: "optString", typ: u(undefined, "") },
-        { json: "reqZeroMin", js: "reqZeroMin", typ: 0 },
+        { json: "optPattern", js: "optPattern", typ: u(undefined, "") },
     ], "any"),
 };
 
diff --git a/base/schema-flow/test/inputs/schema/optional-date-time.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
index 87bb1f7..940c162 100644
--- a/base/schema-flow/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
@@ -10,12 +10,12 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    "optional-date"?:      Date;
-    "optional-date-time"?: Date;
-    "optional-time"?:      string;
     "required-date":       Date;
-    "required-date-time":  Date;
     "required-time":       string;
+    "required-date-time":  Date;
+    "optional-date"?:      Date;
+    "optional-time"?:      string;
+    "optional-date-time"?: Date;
 };
 
 // Converts JSON strings to/from your types
@@ -183,12 +183,12 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "optional-date", js: "optional-date", typ: u(undefined, Date) },
-        { json: "optional-date-time", js: "optional-date-time", typ: u(undefined, Date) },
-        { json: "optional-time", js: "optional-time", typ: u(undefined, "") },
         { json: "required-date", js: "required-date", typ: Date },
-        { json: "required-date-time", js: "required-date-time", typ: Date },
         { json: "required-time", js: "required-time", typ: "" },
+        { json: "required-date-time", js: "required-date-time", typ: Date },
+        { json: "optional-date", js: "optional-date", typ: u(undefined, Date) },
+        { json: "optional-time", js: "optional-time", typ: u(undefined, "") },
+        { json: "optional-date-time", js: "optional-date-time", typ: u(undefined, Date) },
     ], false),
 };
 
diff --git a/base/schema-flow/test/inputs/schema/prefix-items.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/prefix-items.schema/default/TopLevel.js
index 5286426..a4dc494 100644
--- a/base/schema-flow/test/inputs/schema/prefix-items.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/prefix-items.schema/default/TopLevel.js
@@ -10,8 +10,8 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    open:  Open[];
     tuple: Open[];
+    open:  Open[];
     [property: string]: mixed;
 };
 
@@ -182,8 +182,8 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "open", js: "open", typ: a(u(true, 0)) },
         { json: "tuple", js: "tuple", typ: a(u(true, 0)) },
+        { json: "open", js: "open", typ: a(u(true, 0)) },
     ], "any"),
 };
 
diff --git a/head/schema-flow/test/inputs/schema/property-order.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/property-order.schema/default/TopLevel.js
new file mode 100644
index 0000000..8364b82
--- /dev/null
+++ b/head/schema-flow/test/inputs/schema/property-order.schema/default/TopLevel.js
@@ -0,0 +1,209 @@
+// @flow
+
+// To parse this data:
+//
+//   const Convert = require("./TopLevel");
+//
+//   const topLevel = Convert.toTopLevel(json);
+//
+// These functions will throw an error if the JSON doesn't
+// match the expected interface, even if the JSON is valid.
+
+export type TopLevel = {
+    zebra:   string;
+    mango:   number;
+    apple:   boolean;
+    delta:   string;
+    banana:  number;
+    ordered: Ordered;
+};
+
+export type Ordered = {
+    mango: number;
+    zebra: string;
+    apple: boolean;
+};
+
+// Converts JSON strings to/from your types
+// and asserts the results of JSON.parse at runtime
+function toTopLevel(json: string): TopLevel {
+    return cast(JSON.parse(json), r("TopLevel"));
+}
+
+function topLevelToJson(value: TopLevel): string {
+    return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
+}
+
+function invalidValue(typ: any, val: any, key: any, parent: any = '') {
+    const prettyTyp = prettyTypeName(typ);
+    const parentText = parent ? ` on ${parent}` : '';
+    const keyText = key ? ` for key "${key}"` : '';
+    throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
+}
+
+function prettyTypeName(typ: any): string {
+    if (Array.isArray(typ)) {
+        if (typ.length === 2 && typ[0] === undefined) {
+            return `an optional ${prettyTypeName(typ[1])}`;
+        } else {
+            return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
+        }
+    } else if (typeof typ === "object" && typ.literal !== undefined) {
+        return typ.literal;
+    } else {
+        return typeof typ;
+    }
+}
+
+function jsonToJSProps(typ: any): any {
+    if (typ.jsonToJS === undefined) {
+        const map: any = {};
+        typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });
+        typ.jsonToJS = map;
+    }
+    return typ.jsonToJS;
+}
+
+function jsToJSONProps(typ: any): any {
+    if (typ.jsToJSON === undefined) {
+        const map: any = {};
+        typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });
+        typ.jsToJSON = map;
+    }
+    return typ.jsToJSON;
+}
+
+function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any {
+    function transformPrimitive(typ: string, val: any): any {
+        if (typeof typ === typeof val) return val;
+        return invalidValue(typ, val, key, parent);
+    }
+
+    function transformUnion(typs: any[], val: any): any {
+        // val must validate against one typ in typs
+        const l = typs.length;
+        for (let i = 0; i < l; i++) {
+            const typ = typs[i];
+            try {
+                return transform(val, typ, getProps);
+            } catch (_) {}
+        }
+        return invalidValue(typs, val, key, parent);
+    }
+
+    function transformEnum(cases: string[], val: any): any {
+        if (cases.indexOf(val) !== -1) return val;
+        return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
+    }
+
+    function transformArray(typ: any, val: any): any {
+        // val must be an array with no invalid elements
+        if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
+        return val.map(el => transform(el, typ, getProps));
+    }
+
+    function transformDate(val: any): any {
+        if (val === null) {
+            return null;
+        }
+        const d = new Date(val);
+        if (isNaN(d.valueOf())) {
+            return invalidValue(l("Date"), val, key, parent);
+        }
+        return d;
+    }
+
+    function transformObject(props: { [k: string]: any }, additional: any, val: any): any {
+        if (val === null || typeof val !== "object" || Array.isArray(val)) {
+            return invalidValue(l(ref || "object"), val, key, parent);
+        }
+        const result: any = {};
+        Object.getOwnPropertyNames(props).forEach(key => {
+            const prop = props[key];
+            const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
+            result[prop.key] = transform(v, prop.typ, getProps, key, ref);
+        });
+        Object.getOwnPropertyNames(val).forEach(key => {
+            if (!Object.prototype.hasOwnProperty.call(props, key)) {
+                result[key] = transform(val[key], additional, getProps, key, ref);
+            }
+        });
+        return result;
+    }
+
+    if (typ === "any") return val;
+    if (typ === null) {
+        if (val === null) return val;
+        return invalidValue(typ, val, key, parent);
+    }
+    if (typ === false) return invalidValue(typ, val, key, parent);
+    let ref: any = undefined;
+    while (typeof typ === "object" && typ.ref !== undefined) {
+        ref = typ.ref;
+        typ = typeMap[typ.ref];
+    }
+    if (Array.isArray(typ)) return transformEnum(typ, val);
+    if (typeof typ === "object") {
+        return typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
+            : typ.hasOwnProperty("arrayItems")    ? transformArray(typ.arrayItems, val)
+            : typ.hasOwnProperty("props")         ? transformObject(getProps(typ), typ.additional, val)
+            : invalidValue(typ, val, key, parent);
+    }
+    // Numbers can be parsed by Date but shouldn't be.
+    if (typ === Date && typeof val !== "number") return transformDate(val);
+    return transformPrimitive(typ, val);
+}
+
+function cast<T>(val: any, typ: any): T {
+    return transform(val, typ, jsonToJSProps);
+}
+
+function uncast<T>(val: T, typ: any): any {
+    return transform(val, typ, jsToJSONProps);
+}
+
+function l(typ: any) {
+    return { literal: typ };
+}
+
+function a(typ: any) {
+    return { arrayItems: typ };
+}
+
+function u(...typs: any[]) {
+    return { unionMembers: typs };
+}
+
+function o(props: any[], additional: any) {
+    return { props, additional };
+}
+
+function m(additional: any) {
+    const props: any[] = [];
+    return { props, additional };
+}
+
+function r(name: string) {
+    return { ref: name };
+}
+
+const typeMap: any = {
+    "TopLevel": o([
+        { json: "zebra", js: "zebra", typ: "" },
+        { json: "mango", js: "mango", typ: 3.14 },
+        { json: "apple", js: "apple", typ: true },
+        { json: "delta", js: "delta", typ: "" },
+        { json: "banana", js: "banana", typ: 0 },
+        { json: "ordered", js: "ordered", typ: r("Ordered") },
+    ], false),
+    "Ordered": o([
+        { json: "mango", js: "mango", typ: 3.14 },
+        { json: "zebra", js: "zebra", typ: "" },
+        { json: "apple", js: "apple", typ: true },
+    ], false),
+};
+
+module.exports = {
+    "topLevelToJson": topLevelToJson,
+    "toTopLevel": toTopLevel,
+};
diff --git a/base/schema-flow/test/inputs/schema/renaming-bug.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
index 83e57f2..f1a49e2 100644
--- a/base/schema-flow/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
@@ -18,14 +18,14 @@ export type TopLevel = {
 
 export type Fruit = {
     apple?:   boolean;
-    berries?: Berry[];
     orange?:  boolean;
+    berries?: Berry[];
     [property: string]: mixed;
 };
 
 export type Berry = {
-    color?:  Color;
     name?:   string;
+    color?:  Color;
     shapes?: Shape[];
     [property: string]: mixed;
 };
@@ -36,8 +36,8 @@ export type Color = {
 };
 
 export type Shape = {
-    geometry?: Geometry;
     history?:  History;
+    geometry?: Geometry;
     [property: string]: mixed;
 };
 
@@ -58,9 +58,9 @@ export type RectShape = {
 };
 
 export type Part = {
-    depth?:  string;
     length?: string;
     width?:  string;
+    depth?:  string;
     [property: string]: mixed;
 };
 
@@ -70,12 +70,12 @@ export type History = {
 };
 
 export type Vehicle = {
-    brand?:     string;
     id?:        string;
-    speed?:     Speed;
-    subModule?: boolean;
     type?:      VehicleType;
+    speed?:     Speed;
     year?:      string;
+    brand?:     string;
+    subModule?: boolean;
     [property: string]: mixed;
 };
 
@@ -85,8 +85,8 @@ export type Speed = {
 };
 
 export type Limit = {
-    maximum?: number;
     minimum?: number;
+    maximum?: number;
     [property: string]: mixed;
 };
 
@@ -287,20 +287,20 @@ const typeMap: any = {
     ], "any"),
     "Fruit": o([
         { json: "apple", js: "apple", typ: u(undefined, true) },
-        { json: "berries", js: "berries", typ: u(undefined, a(r("Berry"))) },
         { json: "orange", js: "orange", typ: u(undefined, true) },
+        { json: "berries", js: "berries", typ: u(undefined, a(r("Berry"))) },
     ], "any"),
     "Berry": o([
-        { json: "color", js: "color", typ: u(undefined, r("Color")) },
         { json: "name", js: "name", typ: u(undefined, "") },
+        { json: "color", js: "color", typ: u(undefined, r("Color")) },
         { json: "shapes", js: "shapes", typ: u(undefined, a(r("Shape"))) },
     ], "any"),
     "Color": o([
         { json: "rgb", js: "rgb", typ: u(undefined, 3.14) },
     ], "any"),
     "Shape": o([
-        { json: "geometry", js: "geometry", typ: u(undefined, r("Geometry")) },
         { json: "history", js: "history", typ: u(undefined, r("History")) },
+        { json: "geometry", js: "geometry", typ: u(undefined, r("Geometry")) },
     ], "any"),
     "Geometry": o([
         { json: "rectShape", js: "rectShape", typ: u(undefined, r("RectShape")) },
@@ -313,27 +313,27 @@ const typeMap: any = {
         { json: "parts", js: "parts", typ: u(undefined, a(r("Part"))) },
     ], "any"),
     "Part": o([
-        { json: "depth", js: "depth", typ: u(undefined, "") },
         { json: "length", js: "length", typ: u(undefined, "") },
         { json: "width", js: "width", typ: u(undefined, "") },
+        { json: "depth", js: "depth", typ: u(undefined, "") },
     ], "any"),
     "History": o([
         { json: "class", js: "class", typ: u(undefined, "") },
     ], "any"),
     "Vehicle": o([
-        { json: "brand", js: "brand", typ: u(undefined, "") },
         { json: "id", js: "id", typ: u(undefined, "") },
-        { json: "speed", js: "speed", typ: u(undefined, r("Speed")) },
-        { json: "subModule", js: "subModule", typ: u(undefined, true) },
         { json: "type", js: "type", typ: u(undefined, r("VehicleType")) },
+        { json: "speed", js: "speed", typ: u(undefined, r("Speed")) },
         { json: "year", js: "year", typ: u(undefined, "") },
+        { json: "brand", js: "brand", typ: u(undefined, "") },
+        { json: "subModule", js: "subModule", typ: u(undefined, true) },
     ], "any"),
     "Speed": o([
         { json: "velocity", js: "velocity", typ: u(undefined, r("Limit")) },
     ], "any"),
     "Limit": o([
-        { json: "maximum", js: "maximum", typ: u(undefined, 3.14) },
         { json: "minimum", js: "minimum", typ: u(undefined, 3.14) },
+        { json: "maximum", js: "maximum", typ: u(undefined, 3.14) },
     ], "any"),
     "VehicleType": o([
         { json: "name", js: "name", typ: u(undefined, r("Name")) },
diff --git a/base/schema-flow/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
index 87dc243..435aada 100644
--- a/base/schema-flow/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
@@ -10,14 +10,14 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    next?: Next;
     value: string;
+    next?: Next;
     [property: string]: mixed;
 };
 
 export type Node = {
-    next?: Next;
     value: string;
+    next?: Next;
     [property: string]: mixed;
 };
 
@@ -188,12 +188,12 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
         { json: "value", js: "value", typ: "" },
+        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
     ], "any"),
     "Node": o([
-        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
         { json: "value", js: "value", typ: "" },
+        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
     ], "any"),
 };
 
diff --git a/base/schema-flow/test/inputs/schema/uuid.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/uuid.schema/default/TopLevel.js
index 8c524ac..44f9c26 100644
--- a/base/schema-flow/test/inputs/schema/uuid.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/uuid.schema/default/TopLevel.js
@@ -10,11 +10,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
-    arrNullable?:  (null | string)[];
-    arrOne?:       string[];
-    nullable:      null | string;
     one:           string;
     optional?:     string;
+    nullable:      null | string;
+    arrOne?:       string[];
+    arrNullable?:  (null | string)[];
     unionWithEnum: string;
     [property: string]: mixed;
 };
@@ -184,11 +184,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
-        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
-        { json: "nullable", js: "nullable", typ: u(null, "") },
         { json: "one", js: "one", typ: "" },
         { json: "optional", js: "optional", typ: u(undefined, "") },
+        { json: "nullable", js: "nullable", typ: u(null, "") },
+        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
+        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
         { json: "unionWithEnum", js: "unionWithEnum", typ: "" },
     ], "any"),
 };
diff --git a/base/schema-flow/test/inputs/schema/vega-lite.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/vega-lite.schema/default/TopLevel.js
index 988f4c8..dcd4a30 100644
--- a/base/schema-flow/test/inputs/schema/vega-lite.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/vega-lite.schema/default/TopLevel.js
@@ -503,6 +503,12 @@ export type MarkConfig = {
      * __Default value:__ (None)
      */
     fill?: string;
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    fillOpacity?: number;
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -513,12 +519,6 @@ export type MarkConfig = {
      * __Note:__ This property cannot be used in a [style config](mark.html#style-config).
      */
     filled?: boolean;
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    fillOpacity?: number;
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -924,10 +924,6 @@ export type AxisConfig = {
      * Boolean flag indicating if pixel position values should be rounded to the nearest integer.
      */
     tickRound?: boolean;
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    ticks?: boolean;
     /**
      * The size in pixels of axis ticks.
      */
@@ -936,6 +932,10 @@ export type AxisConfig = {
      * The width, in pixels, of ticks.
      */
     tickWidth?: number;
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    ticks?: boolean;
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1174,10 +1174,6 @@ export type VGAxisConfig = {
      * Boolean flag indicating if pixel position values should be rounded to the nearest integer.
      */
     tickRound?: boolean;
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    ticks?: boolean;
     /**
      * The size in pixels of axis ticks.
      */
@@ -1186,6 +1182,10 @@ export type VGAxisConfig = {
      * The width, in pixels, of ticks.
      */
     tickWidth?: number;
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    ticks?: boolean;
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1303,6 +1303,12 @@ export type BarConfig = {
      * __Default value:__ (None)
      */
     fill?: string;
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    fillOpacity?: number;
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -1313,12 +1319,6 @@ export type BarConfig = {
      * __Note:__ This property cannot be used in a [style config](mark.html#style-config).
      */
     filled?: boolean;
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    fillOpacity?: number;
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -2525,6 +2525,12 @@ export type TextConfig = {
      * __Default value:__ (None)
      */
     fill?: string;
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    fillOpacity?: number;
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -2535,12 +2541,6 @@ export type TextConfig = {
      * __Note:__ This property cannot be used in a [style config](mark.html#style-config).
      */
     filled?: boolean;
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    fillOpacity?: number;
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -2725,6 +2725,12 @@ export type TickConfig = {
      * __Default value:__ (None)
      */
     fill?: string;
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    fillOpacity?: number;
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -2735,12 +2741,6 @@ export type TickConfig = {
      * __Note:__ This property cannot be used in a [style config](mark.html#style-config).
      */
     filled?: boolean;
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    fillOpacity?: number;
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -5025,14 +5025,14 @@ export type Axis = {
      * underlying scale's range.
      */
     tickCount?: number;
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    ticks?: boolean;
     /**
      * The size in pixels of axis ticks.
      */
     tickSize?: number;
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    ticks?: boolean;
     /**
      * A title for the field. If `null`, the title will be removed.
      *
@@ -5523,6 +5523,12 @@ export type MarkDef = {
      * __Default value:__ (None)
      */
     fill?: string;
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    fillOpacity?: number;
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -5533,12 +5539,6 @@ export type MarkDef = {
      * __Note:__ This property cannot be used in a [style config](mark.html#style-config).
      */
     filled?: boolean;
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    fillOpacity?: number;
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -6347,8 +6347,8 @@ const typeMap: any = {
         { json: "dx", js: "dx", typ: u(undefined, 3.14) },
         { json: "dy", js: "dy", typ: u(undefined, 3.14) },
         { json: "fill", js: "fill", typ: u(undefined, "") },
-        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "fillOpacity", js: "fillOpacity", typ: u(undefined, 3.14) },
+        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "font", js: "font", typ: u(undefined, "") },
         { json: "fontSize", js: "fontSize", typ: u(undefined, 3.14) },
         { json: "fontStyle", js: "fontStyle", typ: u(undefined, r("FontStyle")) },
@@ -6395,9 +6395,9 @@ const typeMap: any = {
         { json: "shortTimeLabels", js: "shortTimeLabels", typ: u(undefined, true) },
         { json: "tickColor", js: "tickColor", typ: u(undefined, "") },
         { json: "tickRound", js: "tickRound", typ: u(undefined, true) },
-        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "tickSize", js: "tickSize", typ: u(undefined, 3.14) },
         { json: "tickWidth", js: "tickWidth", typ: u(undefined, 3.14) },
+        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "titleAlign", js: "titleAlign", typ: u(undefined, "") },
         { json: "titleAngle", js: "titleAngle", typ: u(undefined, 3.14) },
         { json: "titleBaseline", js: "titleBaseline", typ: u(undefined, "") },
@@ -6435,9 +6435,9 @@ const typeMap: any = {
         { json: "minExtent", js: "minExtent", typ: u(undefined, 3.14) },
         { json: "tickColor", js: "tickColor", typ: u(undefined, "") },
         { json: "tickRound", js: "tickRound", typ: u(undefined, true) },
-        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "tickSize", js: "tickSize", typ: u(undefined, 3.14) },
         { json: "tickWidth", js: "tickWidth", typ: u(undefined, 3.14) },
+        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "titleAlign", js: "titleAlign", typ: u(undefined, "") },
         { json: "titleAngle", js: "titleAngle", typ: u(undefined, 3.14) },
         { json: "titleBaseline", js: "titleBaseline", typ: u(undefined, "") },
@@ -6463,8 +6463,8 @@ const typeMap: any = {
         { json: "dx", js: "dx", typ: u(undefined, 3.14) },
         { json: "dy", js: "dy", typ: u(undefined, 3.14) },
         { json: "fill", js: "fill", typ: u(undefined, "") },
-        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "fillOpacity", js: "fillOpacity", typ: u(undefined, 3.14) },
+        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "font", js: "font", typ: u(undefined, "") },
         { json: "fontSize", js: "fontSize", typ: u(undefined, 3.14) },
         { json: "fontStyle", js: "fontStyle", typ: u(undefined, r("FontStyle")) },
@@ -6680,8 +6680,8 @@ const typeMap: any = {
         { json: "dx", js: "dx", typ: u(undefined, 3.14) },
         { json: "dy", js: "dy", typ: u(undefined, 3.14) },
         { json: "fill", js: "fill", typ: u(undefined, "") },
-        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "fillOpacity", js: "fillOpacity", typ: u(undefined, 3.14) },
+        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "font", js: "font", typ: u(undefined, "") },
         { json: "fontSize", js: "fontSize", typ: u(undefined, 3.14) },
         { json: "fontStyle", js: "fontStyle", typ: u(undefined, r("FontStyle")) },
@@ -6714,8 +6714,8 @@ const typeMap: any = {
         { json: "dx", js: "dx", typ: u(undefined, 3.14) },
         { json: "dy", js: "dy", typ: u(undefined, 3.14) },
         { json: "fill", js: "fill", typ: u(undefined, "") },
-        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "fillOpacity", js: "fillOpacity", typ: u(undefined, 3.14) },
+        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "font", js: "font", typ: u(undefined, "") },
         { json: "fontSize", js: "fontSize", typ: u(undefined, 3.14) },
         { json: "fontStyle", js: "fontStyle", typ: u(undefined, r("FontStyle")) },
@@ -7011,8 +7011,8 @@ const typeMap: any = {
         { json: "orient", js: "orient", typ: u(undefined, r("TitleOrient")) },
         { json: "position", js: "position", typ: u(undefined, 3.14) },
         { json: "tickCount", js: "tickCount", typ: u(undefined, 3.14) },
-        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "tickSize", js: "tickSize", typ: u(undefined, 3.14) },
+        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "title", js: "title", typ: u(undefined, u(null, "")) },
         { json: "titleMaxLength", js: "titleMaxLength", typ: u(undefined, 3.14) },
         { json: "titlePadding", js: "titlePadding", typ: u(undefined, 3.14) },
@@ -7091,8 +7091,8 @@ const typeMap: any = {
         { json: "dx", js: "dx", typ: u(undefined, 3.14) },
         { json: "dy", js: "dy", typ: u(undefined, 3.14) },
         { json: "fill", js: "fill", typ: u(undefined, "") },
-        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "fillOpacity", js: "fillOpacity", typ: u(undefined, 3.14) },
+        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "font", js: "font", typ: u(undefined, "") },
         { json: "fontSize", js: "fontSize", typ: u(undefined, 3.14) },
         { json: "fontStyle", js: "fontStyle", typ: u(undefined, r("FontStyle")) },
diff --git a/base/schema-golang/test/inputs/schema/accessors.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/accessors.schema/default/quicktype.go
index 42ade3d..f46b1ac 100644
--- a/base/schema-golang/test/inputs/schema/accessors.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/accessors.schema/default/quicktype.go
@@ -22,10 +22,10 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	Bah             string `json:"bar"`
+	Unionization    *Union `json:"union"`
 	Enumerification Enum   `json:"enum"`
 	Foo             string `json:"foo"`
-	Unionization    *Union `json:"union"`
+	Bah             string `json:"bar"`
 }
 
 type Enum string
diff --git a/base/schema-golang/test/inputs/schema/all-of-additional-properties-false.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/all-of-additional-properties-false.schema/default/quicktype.go
index a8021b8..2e0afe9 100644
--- a/base/schema-golang/test/inputs/schema/all-of-additional-properties-false.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/all-of-additional-properties-false.schema/default/quicktype.go
@@ -21,8 +21,8 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 type TopLevel struct {
 	Amount      float64   `json:"amount"`
 	Frequency   Frequency `json:"frequency"`
-	Description *string   `json:"description,omitempty"`
 	Type        Type      `json:"type"`
+	Description *string   `json:"description,omitempty"`
 }
 
 type Frequency string
diff --git a/base/schema-golang/test/inputs/schema/bool-string.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/bool-string.schema/default/quicktype.go
index 81d5fa1..8bbd8c5 100644
--- a/base/schema-golang/test/inputs/schema/bool-string.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/bool-string.schema/default/quicktype.go
@@ -22,11 +22,11 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	ArrNullable          []*string      `json:"arrNullable,omitempty"`
-	ArrOne               []string       `json:"arrOne,omitempty"`
-	Nullable             *string        `json:"nullable"`
 	One                  string         `json:"one"`
 	Optional             *string        `json:"optional,omitempty"`
+	Nullable             *string        `json:"nullable"`
+	ArrOne               []string       `json:"arrOne,omitempty"`
+	ArrNullable          []*string      `json:"arrNullable,omitempty"`
 	UnionWithBool        *UnionWithBool `json:"unionWithBool"`
 	UnionWithBoolAndEnum *UnionWithBool `json:"unionWithBoolAndEnum"`
 }
diff --git a/base/schema-golang/test/inputs/schema/boolean-subschema.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/boolean-subschema.schema/default/quicktype.go
index f7dba63..02916ce 100644
--- a/base/schema-golang/test/inputs/schema/boolean-subschema.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/boolean-subschema.schema/default/quicktype.go
@@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
+	Foo        string        `json:"foo"`
 	Disallowed interface{}   `json:"disallowed"`
 	Empty      []interface{} `json:"empty"`
-	Foo        string        `json:"foo"`
 	Impossible interface{}   `json:"impossible"`
 }
diff --git a/base/schema-golang/test/inputs/schema/comment-injection.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/comment-injection.schema/default/quicktype.go
index 85628b4..2853860 100644
--- a/base/schema-golang/test/inputs/schema/comment-injection.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/comment-injection.schema/default/quicktype.go
@@ -31,12 +31,6 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 // }
 // }
 type TopLevel struct {
-	// Ends with a backslash \             
-	TrailingBackslash              *string `json:"trailingBackslash,omitempty"`
-	// Ends with a quote "                 
-	TrailingQuote                  *string `json:"trailingQuote,omitempty"`
-	// Ends with a triple quote """        
-	TrailingTripleQuote            *string `json:"trailingTripleQuote,omitempty"`
 	// Property delimiters:                
 	// */                                  
 	// /*                                  
@@ -50,4 +44,10 @@ type TopLevel struct {
 	// }                                   
 	// }                                   
 	Value                          string  `json:"value"`
+	// Ends with a backslash \             
+	TrailingBackslash              *string `json:"trailingBackslash,omitempty"`
+	// Ends with a quote "                 
+	TrailingQuote                  *string `json:"trailingQuote,omitempty"`
+	// Ends with a triple quote """        
+	TrailingTripleQuote            *string `json:"trailingTripleQuote,omitempty"`
 }
diff --git a/base/schema-golang/test/inputs/schema/const-non-string.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/const-non-string.schema/default/quicktype.go
index 9d49607..2672c9d 100644
--- a/base/schema-golang/test/inputs/schema/const-non-string.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/const-non-string.schema/default/quicktype.go
@@ -19,11 +19,11 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
+	Version float64 `json:"version"`
 	Amount  int64   `json:"amount"`
+	Ratio   float64 `json:"ratio"`
 	Enabled bool    `json:"enabled"`
 	Kind    Kind    `json:"kind"`
-	Ratio   float64 `json:"ratio"`
-	Version float64 `json:"version"`
 }
 
 type Kind string
diff --git a/base/schema-golang/test/inputs/schema/date-time-or-string.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/date-time-or-string.schema/default/quicktype.go
index 3980ab4..4a995a9 100644
--- a/base/schema-golang/test/inputs/schema/date-time-or-string.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/date-time-or-string.schema/default/quicktype.go
@@ -23,8 +23,8 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	Bar *BarUnion `json:"bar"`
 	Foo string    `json:"foo"`
+	Bar *BarUnion `json:"bar"`
 }
 
 type BarEnum string
diff --git a/base/schema-golang/test/inputs/schema/date-time.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/date-time.schema/default/quicktype.go
index 6053f35..a41e28d 100644
--- a/base/schema-golang/test/inputs/schema/date-time.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/date-time.schema/default/quicktype.go
@@ -23,11 +23,11 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	ComplexUnionArray []ComplexUnionArrayElement `json:"complex-union-array"`
 	Date              string                     `json:"date"`
-	DateTime          time.Time                  `json:"date-time"`
 	Time              string                     `json:"time"`
+	DateTime          time.Time                  `json:"date-time"`
 	UnionArray        []string                   `json:"union-array"`
+	ComplexUnionArray []ComplexUnionArrayElement `json:"complex-union-array"`
 }
 
 type ComplexUnionArrayEnum string
diff --git a/base/schema-golang/test/inputs/schema/description.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/description.schema/default/quicktype.go
index 4a4ddaa..cf47d33 100644
--- a/base/schema-golang/test/inputs/schema/description.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/description.schema/default/quicktype.go
@@ -24,14 +24,14 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 // The top-level class.
 // Its description has two lines.
 type TopLevel struct {
-	// A pretty boolean                                
-	Bar                           *bool                `json:"bar,omitempty"`
+	// Either a number or a string                     
+	Union                         *Union               `json:"union"`
 	// An enumeration                                  
 	Enum                          Enum                 `json:"enum"`
 	Foo                           *float64             `json:"foo,omitempty"`
+	// A pretty boolean                                
+	Bar                           *bool                `json:"bar,omitempty"`
 	ObjectOrString                *ObjectOrStringUnion `json:"object-or-string"`
-	// Either a number or a string                     
-	Union                         *Union               `json:"union"`
 }
 
 type ObjectOrStringClass struct {
diff --git a/base/schema-golang/test/inputs/schema/direct-union.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/direct-union.schema/default/quicktype.go
index 5110587..edfefa5 100644
--- a/base/schema-golang/test/inputs/schema/direct-union.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/direct-union.schema/default/quicktype.go
@@ -26,8 +26,8 @@ type TopLevel struct {
 }
 
 type Thing struct {
-	Optional *Anything `json:"optional"`
 	Required *Anything `json:"required"`
+	Optional *Anything `json:"optional"`
 }
 
 type Anything struct {
diff --git a/base/schema-golang/test/inputs/schema/enum.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/enum.schema/default/quicktype.go
index ceb7479..a8aedb5 100644
--- a/base/schema-golang/test/inputs/schema/enum.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/enum.schema/default/quicktype.go
@@ -22,11 +22,11 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	Arr      []Arr      `json:"arr,omitempty"`
-	For      *string    `json:"for,omitempty"`
-	Gve      Gve        `json:"gve"`
 	Lvc      *Lvc       `json:"lvc,omitempty"`
+	Gve      Gve        `json:"gve"`
+	Arr      []Arr      `json:"arr,omitempty"`
 	OtherArr []OtherArr `json:"otherArr,omitempty"`
+	For      *string    `json:"for,omitempty"`
 }
 
 type OtherArr string
diff --git a/base/schema-golang/test/inputs/schema/integer-string.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/integer-string.schema/default/quicktype.go
index 1f277a6..3f6b733 100644
--- a/base/schema-golang/test/inputs/schema/integer-string.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/integer-string.schema/default/quicktype.go
@@ -22,11 +22,11 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	ArrNullable         []*string     `json:"arrNullable,omitempty"`
-	ArrOne              []string      `json:"arrOne,omitempty"`
-	Nullable            *string       `json:"nullable"`
 	One                 string        `json:"one"`
 	Optional            *string       `json:"optional,omitempty"`
+	Nullable            *string       `json:"nullable"`
+	ArrOne              []string      `json:"arrOne,omitempty"`
+	ArrNullable         []*string     `json:"arrNullable,omitempty"`
 	UnionWithInt        *UnionWithInt `json:"unionWithInt"`
 	UnionWithIntAndEnum *UnionWithInt `json:"unionWithIntAndEnum"`
 }
diff --git a/base/schema-golang/test/inputs/schema/integer-type.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/integer-type.schema/default/quicktype.go
index fb01841..5f712ab 100644
--- a/base/schema-golang/test/inputs/schema/integer-type.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/integer-type.schema/default/quicktype.go
@@ -19,13 +19,13 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
+	SmallPositive int64 `json:"small_positive"`
+	SmallNegative int64 `json:"small_negative"`
+	I32Range      int64 `json:"i32_range"`
 	AboveI32Max   int64 `json:"above_i32_max"`
 	BelowI32Min   int64 `json:"below_i32_min"`
-	I32Range      int64 `json:"i32_range"`
-	LargeBounds   int64 `json:"large_bounds"`
-	OnlyMaximum   int64 `json:"only_maximum"`
 	OnlyMinimum   int64 `json:"only_minimum"`
-	SmallNegative int64 `json:"small_negative"`
-	SmallPositive int64 `json:"small_positive"`
+	OnlyMaximum   int64 `json:"only_maximum"`
 	Unbounded     int64 `json:"unbounded"`
+	LargeBounds   int64 `json:"large_bounds"`
 }
diff --git a/base/schema-golang/test/inputs/schema/keyword-unions.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/keyword-unions.schema/default/quicktype.go
index 11adc3d..d3f932c 100644
--- a/base/schema-golang/test/inputs/schema/keyword-unions.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/keyword-unions.schema/default/quicktype.go
@@ -98,7 +98,6 @@ type TopLevel struct {
 	DidSet                   *UnionDidSet                   `json:"didSet"`
 	Do                       *UnionDo                       `json:"do"`
 	Double                   *UnionDouble                   `json:"double"`
-	Dummy                    *float64                       `json:"dummy,omitempty"`
 	Dynamic                  *UnionDynamic                  `json:"dynamic"`
 	DynamicCast              *UnionDynamicCast              `json:"dynamic_cast"`
 	Elif                     *UnionElif                     `json:"elif"`
@@ -151,8 +150,8 @@ type TopLevel struct {
 	Int                      *UnionInt                      `json:"int"`
 	Interface                *UnionInterface                `json:"interface"`
 	Internal                 *UnionInternal                 `json:"internal"`
-	Is                       *UnionIs                       `json:"is"`
 	Iterable                 *UnionIterable                 `json:"iterable"`
+	Is                       *UnionIs                       `json:"is"`
 	Jdec                     *UnionJdec                     `json:"jdec"`
 	Jenc                     *UnionJenc                     `json:"jenc"`
 	Jpipe                    *UnionJpipe                    `json:"jpipe"`
@@ -299,6 +298,7 @@ type TopLevel struct {
 	XorEq                    *UnionXorEq                    `json:"xor_eq"`
 	Yes                      *UnionYES                      `json:"YES"`
 	Yield                    *UnionYield                    `json:"yield"`
+	Dummy                    *float64                       `json:"dummy,omitempty"`
 }
 
 type ASM struct {
diff --git a/base/schema-golang/test/inputs/schema/light.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/light.schema/default/quicktype.go
index 1cf85a9..a3ef24c 100644
--- a/base/schema-golang/test/inputs/schema/light.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/light.schema/default/quicktype.go
@@ -23,7 +23,7 @@ type TopLevel struct {
 }
 
 type LightParams struct {
-	AppID    string `json:"app_id"`
 	OutletID string `json:"outlet_id"`
+	AppID    string `json:"app_id"`
 	RGBA     string `json:"rgba"`
 }
diff --git a/base/schema-golang/test/inputs/schema/min-max-items.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/min-max-items.schema/default/quicktype.go
index b504e22..3d8dec0 100644
--- a/base/schema-golang/test/inputs/schema/min-max-items.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/min-max-items.schema/default/quicktype.go
@@ -22,9 +22,9 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
+	MinOnly    []string    `json:"minOnly"`
 	MaxOnly    []int64     `json:"maxOnly"`
 	MinAndMax  []float64   `json:"minAndMax"`
-	MinOnly    []string    `json:"minOnly"`
 	Plain      []string    `json:"plain"`
 	UnionItems []UnionItem `json:"unionItems"`
 }
diff --git a/base/schema-golang/test/inputs/schema/minmax-integer.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/minmax-integer.schema/default/quicktype.go
index 18dca4e..92aa4c6 100644
--- a/base/schema-golang/test/inputs/schema/minmax-integer.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/minmax-integer.schema/default/quicktype.go
@@ -20,11 +20,11 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 
 type TopLevel struct {
 	Free               int64 `json:"free"`
-	Intersection       int64 `json:"intersection"`
-	Max                int64 `json:"max"`
 	Min                int64 `json:"min"`
+	Max                int64 `json:"max"`
 	Minmax             int64 `json:"minmax"`
-	MinMaxIntersection int64 `json:"minMaxIntersection"`
-	MinMaxUnion        int64 `json:"minMaxUnion"`
 	Union              int64 `json:"union"`
+	MinMaxUnion        int64 `json:"minMaxUnion"`
+	Intersection       int64 `json:"intersection"`
+	MinMaxIntersection int64 `json:"minMaxIntersection"`
 }
diff --git a/base/schema-golang/test/inputs/schema/minmax.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/minmax.schema/default/quicktype.go
index b9c52ea..3d1acf3 100644
--- a/base/schema-golang/test/inputs/schema/minmax.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/minmax.schema/default/quicktype.go
@@ -20,11 +20,11 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 
 type TopLevel struct {
 	Free               float64 `json:"free"`
-	Intersection       float64 `json:"intersection"`
-	Max                float64 `json:"max"`
 	Min                float64 `json:"min"`
+	Max                float64 `json:"max"`
 	Minmax             float64 `json:"minmax"`
-	MinMaxIntersection float64 `json:"minMaxIntersection"`
-	MinMaxUnion        float64 `json:"minMaxUnion"`
 	Union              float64 `json:"union"`
+	MinMaxUnion        float64 `json:"minMaxUnion"`
+	Intersection       float64 `json:"intersection"`
+	MinMaxIntersection float64 `json:"minMaxIntersection"`
 }
diff --git a/base/schema-golang/test/inputs/schema/minmaxlength.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/minmaxlength.schema/default/quicktype.go
index f5f4367..17bbe6f 100644
--- a/base/schema-golang/test/inputs/schema/minmaxlength.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/minmaxlength.schema/default/quicktype.go
@@ -22,14 +22,14 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	Intersection       string   `json:"intersection"`
-	InUnion            *InUnion `json:"inUnion"`
-	Maxlength          string   `json:"maxlength"`
 	Minlength          string   `json:"minlength"`
-	MinMaxIntersection string   `json:"minMaxIntersection"`
+	Maxlength          string   `json:"maxlength"`
 	Minmaxlength       string   `json:"minmaxlength"`
-	MinMaxUnion        string   `json:"minMaxUnion"`
 	Union              string   `json:"union"`
+	InUnion            *InUnion `json:"inUnion"`
+	MinMaxUnion        string   `json:"minMaxUnion"`
+	Intersection       string   `json:"intersection"`
+	MinMaxIntersection string   `json:"minMaxIntersection"`
 }
 
 type InUnion struct {
diff --git a/base/schema-golang/test/inputs/schema/non-standard-ref.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/non-standard-ref.schema/default/quicktype.go
index d41deae..d4f8509 100644
--- a/base/schema-golang/test/inputs/schema/non-standard-ref.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/non-standard-ref.schema/default/quicktype.go
@@ -19,7 +19,7 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	Bar  int64 `json:"bar"`
 	Foo  int64 `json:"foo"`
+	Bar  int64 `json:"bar"`
 	Quux bool  `json:"quux"`
 }
diff --git a/base/schema-golang/test/inputs/schema/nullable-optional-one-of.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/nullable-optional-one-of.schema/default/quicktype.go
index 5d72775..bdcbfa2 100644
--- a/base/schema-golang/test/inputs/schema/nullable-optional-one-of.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/nullable-optional-one-of.schema/default/quicktype.go
@@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	B    *string `json:"b"`
 	Kind Kind    `json:"kind"`
+	B    *string `json:"b"`
 }
 
 type Kind string
diff --git a/base/schema-golang/test/inputs/schema/nullable-optional-one-of.schema/omit-empty-true--1b4b28fcc762/quicktype.go b/head/schema-golang/test/inputs/schema/nullable-optional-one-of.schema/omit-empty-true--1b4b28fcc762/quicktype.go
index 5d72775..bdcbfa2 100644
--- a/base/schema-golang/test/inputs/schema/nullable-optional-one-of.schema/omit-empty-true--1b4b28fcc762/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/nullable-optional-one-of.schema/omit-empty-true--1b4b28fcc762/quicktype.go
@@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	B    *string `json:"b"`
 	Kind Kind    `json:"kind"`
+	B    *string `json:"b"`
 }
 
 type Kind string
diff --git a/base/schema-golang/test/inputs/schema/optional-any.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/optional-any.schema/default/quicktype.go
index 12ab777..4548e9d 100644
--- a/base/schema-golang/test/inputs/schema/optional-any.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/optional-any.schema/default/quicktype.go
@@ -19,6 +19,6 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	Bar bool        `json:"bar"`
 	Foo interface{} `json:"foo"`
+	Bar bool        `json:"bar"`
 }
diff --git a/base/schema-golang/test/inputs/schema/optional-const-ref.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/optional-const-ref.schema/default/quicktype.go
index fffd0e2..181aff5 100644
--- a/base/schema-golang/test/inputs/schema/optional-const-ref.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/optional-const-ref.schema/default/quicktype.go
@@ -20,12 +20,12 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 
 type TopLevel struct {
 	Coordinates         []Coordinate `json:"coordinates,omitempty"`
-	Count               *int64       `json:"count,omitempty"`
-	Label               *string      `json:"label,omitempty"`
 	RequiredCoordinates []Coordinate `json:"requiredCoordinates"`
+	Count               *int64       `json:"count,omitempty"`
 	RequiredCount       int64        `json:"requiredCount"`
-	RequiredLabel       string       `json:"requiredLabel"`
 	Weight              *float64     `json:"weight,omitempty"`
+	Label               *string      `json:"label,omitempty"`
+	RequiredLabel       string       `json:"requiredLabel"`
 }
 
 type Coordinate struct {
diff --git a/base/schema-golang/test/inputs/schema/optional-constraints.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/optional-constraints.schema/default/quicktype.go
index 4b23815..be28788 100644
--- a/base/schema-golang/test/inputs/schema/optional-constraints.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/optional-constraints.schema/default/quicktype.go
@@ -19,9 +19,9 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	OptDouble  *float64 `json:"optDouble,omitempty"`
+	ReqZeroMin int64    `json:"reqZeroMin"`
 	OptInt     *int64   `json:"optInt,omitempty"`
-	OptPattern *string  `json:"optPattern,omitempty"`
+	OptDouble  *float64 `json:"optDouble,omitempty"`
 	OptString  *string  `json:"optString,omitempty"`
-	ReqZeroMin int64    `json:"reqZeroMin"`
+	OptPattern *string  `json:"optPattern,omitempty"`
 }
diff --git a/base/schema-golang/test/inputs/schema/optional-date-time.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/optional-date-time.schema/default/quicktype.go
index 54b0348..afe22a0 100644
--- a/base/schema-golang/test/inputs/schema/optional-date-time.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/optional-date-time.schema/default/quicktype.go
@@ -21,10 +21,10 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	OptionalDate     *string    `json:"optional-date,omitempty"`
-	OptionalDateTime *time.Time `json:"optional-date-time,omitempty"`
-	OptionalTime     *string    `json:"optional-time,omitempty"`
 	RequiredDate     string     `json:"required-date"`
-	RequiredDateTime time.Time  `json:"required-date-time"`
 	RequiredTime     string     `json:"required-time"`
+	RequiredDateTime time.Time  `json:"required-date-time"`
+	OptionalDate     *string    `json:"optional-date,omitempty"`
+	OptionalTime     *string    `json:"optional-time,omitempty"`
+	OptionalDateTime *time.Time `json:"optional-date-time,omitempty"`
 }
diff --git a/base/schema-golang/test/inputs/schema/prefix-items.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/prefix-items.schema/default/quicktype.go
index 3d21ed6..9e21dcc 100644
--- a/base/schema-golang/test/inputs/schema/prefix-items.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/prefix-items.schema/default/quicktype.go
@@ -22,8 +22,8 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	Open  []Open `json:"open"`
 	Tuple []Open `json:"tuple"`
+	Open  []Open `json:"open"`
 }
 
 type Open struct {
diff --git a/head/schema-golang/test/inputs/schema/property-order.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/property-order.schema/default/quicktype.go
new file mode 100644
index 0000000..feb0d21
--- /dev/null
+++ b/head/schema-golang/test/inputs/schema/property-order.schema/default/quicktype.go
@@ -0,0 +1,34 @@
+// Code generated from JSON Schema using quicktype. DO NOT EDIT.
+// To parse and unparse this JSON data, add this code to your project and do:
+//
+//    topLevel, err := UnmarshalTopLevel(bytes)
+//    bytes, err = topLevel.Marshal()
+
+package main
+
+import "encoding/json"
+
+func UnmarshalTopLevel(data []byte) (TopLevel, error) {
+	var r TopLevel
+	err := json.Unmarshal(data, &r)
+	return r, err
+}
+
+func (r *TopLevel) Marshal() ([]byte, error) {
+	return json.Marshal(r)
+}
+
+type TopLevel struct {
+	Zebra   string  `json:"zebra"`
+	Mango   float64 `json:"mango"`
+	Apple   bool    `json:"apple"`
+	Delta   string  `json:"delta"`
+	Banana  int64   `json:"banana"`
+	Ordered Ordered `json:"ordered"`
+}
+
+type Ordered struct {
+	Mango float64 `json:"mango"`
+	Zebra string  `json:"zebra"`
+	Apple bool    `json:"apple"`
+}
diff --git a/base/schema-golang/test/inputs/schema/renaming-bug.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/renaming-bug.schema/default/quicktype.go
index a98901b..f2181ab 100644
--- a/base/schema-golang/test/inputs/schema/renaming-bug.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/renaming-bug.schema/default/quicktype.go
@@ -26,13 +26,13 @@ type TopLevel struct {
 
 type Fruit struct {
 	Apple   *bool   `json:"apple,omitempty"`
-	Berries []Berry `json:"berries,omitempty"`
 	Orange  *bool   `json:"orange,omitempty"`
+	Berries []Berry `json:"berries,omitempty"`
 }
 
 type Berry struct {
-	Color  *Color  `json:"color,omitempty"`
 	Name   *string `json:"name,omitempty"`
+	Color  *Color  `json:"color,omitempty"`
 	Shapes []Shape `json:"shapes,omitempty"`
 }
 
@@ -41,8 +41,8 @@ type Color struct {
 }
 
 type Shape struct {
-	Geometry *Geometry `json:"geometry,omitempty"`
 	History  *History  `json:"history,omitempty"`
+	Geometry *Geometry `json:"geometry,omitempty"`
 }
 
 type Geometry struct {
@@ -59,9 +59,9 @@ type RectShape struct {
 }
 
 type Part struct {
-	Depth  *string `json:"depth,omitempty"`
 	Length *string `json:"length,omitempty"`
 	Width  *string `json:"width,omitempty"`
+	Depth  *string `json:"depth,omitempty"`
 }
 
 type History struct {
@@ -69,12 +69,12 @@ type History struct {
 }
 
 type Vehicle struct {
-	Brand     *string      `json:"brand,omitempty"`
 	ID        *string      `json:"id,omitempty"`
-	Speed     *Speed       `json:"speed,omitempty"`
-	SubModule *bool        `json:"subModule,omitempty"`
 	Type      *VehicleType `json:"type,omitempty"`
+	Speed     *Speed       `json:"speed,omitempty"`
 	Year      *string      `json:"year,omitempty"`
+	Brand     *string      `json:"brand,omitempty"`
+	SubModule *bool        `json:"subModule,omitempty"`
 }
 
 type Speed struct {
@@ -82,8 +82,8 @@ type Speed struct {
 }
 
 type Limit struct {
-	Maximum *float64 `json:"maximum,omitempty"`
 	Minimum *float64 `json:"minimum,omitempty"`
+	Maximum *float64 `json:"maximum,omitempty"`
 }
 
 type VehicleType struct {
diff --git a/base/schema-golang/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.go
index 72242de..668effd 100644
--- a/base/schema-golang/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.go
@@ -22,13 +22,13 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	Next  *Next  `json:"next"`
 	Value string `json:"value"`
+	Next  *Next  `json:"next"`
 }
 
 type Node struct {
-	Next  *Next  `json:"next"`
 	Value string `json:"value"`
+	Next  *Next  `json:"next"`
 }
 
 type Next struct {
diff --git a/base/schema-golang/test/inputs/schema/uuid.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/uuid.schema/default/quicktype.go
index f9ce2dc..705a8d4 100644
--- a/base/schema-golang/test/inputs/schema/uuid.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/uuid.schema/default/quicktype.go
@@ -19,10 +19,10 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	ArrNullable   []*string `json:"arrNullable,omitempty"`
-	ArrOne        []string  `json:"arrOne,omitempty"`
-	Nullable      *string   `json:"nullable"`
 	One           string    `json:"one"`
 	Optional      *string   `json:"optional,omitempty"`
+	Nullable      *string   `json:"nullable"`
+	ArrOne        []string  `json:"arrOne,omitempty"`
+	ArrNullable   []*string `json:"arrNullable,omitempty"`
 	UnionWithEnum string    `json:"unionWithEnum"`
 }
diff --git a/base/schema-golang/test/inputs/schema/vega-lite.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/vega-lite.schema/default/quicktype.go
index fc334b8..7e41c31 100644
--- a/base/schema-golang/test/inputs/schema/vega-lite.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/vega-lite.schema/default/quicktype.go
@@ -333,6 +333,10 @@ type MarkConfig struct {
 	//                                                                                                            
 	// __Default value:__ (None)                                                                                  
 	Fill                                                                                         *string          `json:"fill,omitempty"`
+	// The fill opacity (value between [0,1]).                                                                    
+	//                                                                                                            
+	// __Default value:__ `1`                                                                                     
+	FillOpacity                                                                                  *float64         `json:"fillOpacity,omitempty"`
 	// Whether the mark's color should be used as fill color instead of stroke color.                             
 	//                                                                                                            
 	// __Default value:__ `true` for all marks except `point` and `false` for `point`.                            
@@ -341,10 +345,6 @@ type MarkConfig struct {
 	//                                                                                                            
 	// __Note:__ This property cannot be used in a [style config](mark.html#style-config).                        
 	Filled                                                                                       *bool            `json:"filled,omitempty"`
-	// The fill opacity (value between [0,1]).                                                                    
-	//                                                                                                            
-	// __Default value:__ `1`                                                                                     
-	FillOpacity                                                                                  *float64         `json:"fillOpacity,omitempty"`
 	// The typeface to set the text in (e.g., `"Helvetica Neue"`).                                                
 	Font                                                                                         *string          `json:"font,omitempty"`
 	// The font size, in pixels.                                                                                  
@@ -530,12 +530,12 @@ type AxisConfig struct {
 	TickColor                                                                                    *string            `json:"tickColor,omitempty"`
 	// Boolean flag indicating if pixel position values should be rounded to the nearest integer.                   
 	TickRound                                                                                    *bool              `json:"tickRound,omitempty"`
-	// Boolean value that determines whether the axis should include ticks.                                         
-	Ticks                                                                                        *bool              `json:"ticks,omitempty"`
 	// The size in pixels of axis ticks.                                                                            
 	TickSize                                                                                     *float64           `json:"tickSize,omitempty"`
 	// The width, in pixels, of ticks.                                                                              
 	TickWidth                                                                                    *float64           `json:"tickWidth,omitempty"`
+	// Boolean value that determines whether the axis should include ticks.                                         
+	Ticks                                                                                        *bool              `json:"ticks,omitempty"`
 	// Horizontal text alignment of axis titles.                                                                    
 	TitleAlign                                                                                   *string            `json:"titleAlign,omitempty"`
 	// Angle in degrees of axis titles.                                                                             
@@ -668,12 +668,12 @@ type VGAxisConfig struct {
 	TickColor                                                                                    *string            `json:"tickColor,omitempty"`
 	// Boolean flag indicating if pixel position values should be rounded to the nearest integer.                   
 	TickRound                                                                                    *bool              `json:"tickRound,omitempty"`
-	// Boolean value that determines whether the axis should include ticks.                                         
-	Ticks                                                                                        *bool              `json:"ticks,omitempty"`
 	// The size in pixels of axis ticks.                                                                            
 	TickSize                                                                                     *float64           `json:"tickSize,omitempty"`
 	// The width, in pixels, of ticks.                                                                              
 	TickWidth                                                                                    *float64           `json:"tickWidth,omitempty"`
+	// Boolean value that determines whether the axis should include ticks.                                         
+	Ticks                                                                                        *bool              `json:"ticks,omitempty"`
 	// Horizontal text alignment of axis titles.                                                                    
 	TitleAlign                                                                                   *string            `json:"titleAlign,omitempty"`
 	// Angle in degrees of axis titles.                                                                             
@@ -743,6 +743,10 @@ type BarConfig struct {
 	//                                                                                                            
 	// __Default value:__ (None)                                                                                  
 	Fill                                                                                         *string          `json:"fill,omitempty"`
+	// The fill opacity (value between [0,1]).                                                                    
+	//                                                                                                            
+	// __Default value:__ `1`                                                                                     
+	FillOpacity                                                                                  *float64         `json:"fillOpacity,omitempty"`
 	// Whether the mark's color should be used as fill color instead of stroke color.                             
 	//                                                                                                            
 	// __Default value:__ `true` for all marks except `point` and `false` for `point`.                            
@@ -751,10 +755,6 @@ type BarConfig struct {
 	//                                                                                                            
 	// __Note:__ This property cannot be used in a [style config](mark.html#style-config).                        
 	Filled                                                                                       *bool            `json:"filled,omitempty"`
-	// The fill opacity (value between [0,1]).                                                                    
-	//                                                                                                            
-	// __Default value:__ `1`                                                                                     
-	FillOpacity                                                                                  *float64         `json:"fillOpacity,omitempty"`
 	// The typeface to set the text in (e.g., `"Helvetica Neue"`).                                                
 	Font                                                                                         *string          `json:"font,omitempty"`
 	// The font size, in pixels.                                                                                  
@@ -1422,6 +1422,10 @@ type TextConfig struct {
 	//                                                                                                            
 	// __Default value:__ (None)                                                                                  
 	Fill                                                                                         *string          `json:"fill,omitempty"`
+	// The fill opacity (value between [0,1]).                                                                    
+	//                                                                                                            
+	// __Default value:__ `1`                                                                                     
+	FillOpacity                                                                                  *float64         `json:"fillOpacity,omitempty"`
 	// Whether the mark's color should be used as fill color instead of stroke color.                             
 	//                                                                                                            
 	// __Default value:__ `true` for all marks except `point` and `false` for `point`.                            
@@ -1430,10 +1434,6 @@ type TextConfig struct {
 	//                                                                                                            
 	// __Note:__ This property cannot be used in a [style config](mark.html#style-config).                        
 	Filled                                                                                       *bool            `json:"filled,omitempty"`
-	// The fill opacity (value between [0,1]).                                                                    
-	//                                                                                                            
-	// __Default value:__ `1`                                                                                     
-	FillOpacity                                                                                  *float64         `json:"fillOpacity,omitempty"`
 	// The typeface to set the text in (e.g., `"Helvetica Neue"`).                                                
 	Font                                                                                         *string          `json:"font,omitempty"`
 	// The font size, in pixels.                                                                                  
@@ -1556,6 +1556,10 @@ type TickConfig struct {
 	//                                                                                                            
 	// __Default value:__ (None)                                                                                  
 	Fill                                                                                         *string          `json:"fill,omitempty"`
+	// The fill opacity (value between [0,1]).                                                                    
+	//                                                                                                            
+	// __Default value:__ `1`                                                                                     
+	FillOpacity                                                                                  *float64         `json:"fillOpacity,omitempty"`
 	// Whether the mark's color should be used as fill color instead of stroke color.                             
 	//                                                                                                            
 	// __Default value:__ `true` for all marks except `point` and `false` for `point`.                            
@@ -1564,10 +1568,6 @@ type TickConfig struct {
 	//                                                                                                            
 	// __Note:__ This property cannot be used in a [style config](mark.html#style-config).                        
 	Filled                                                                                       *bool            `json:"filled,omitempty"`
-	// The fill opacity (value between [0,1]).                                                                    
-	//                                                                                                            
-	// __Default value:__ `1`                                                                                     
-	FillOpacity                                                                                  *float64         `json:"fillOpacity,omitempty"`
 	// The typeface to set the text in (e.g., `"Helvetica Neue"`).                                                
 	Font                                                                                         *string          `json:"font,omitempty"`
 	// The font size, in pixels.                                                                                  
@@ -2962,10 +2962,10 @@ type Axis struct {
 	// may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the                       
 	// underlying scale's range.                                                                                   
 	TickCount                                                                                   *float64           `json:"tickCount,omitempty"`
-	// Boolean value that determines whether the axis should include ticks.                                        
-	Ticks                                                                                       *bool              `json:"ticks,omitempty"`
 	// The size in pixels of axis ticks.                                                                           
 	TickSize                                                                                    *float64           `json:"tickSize,omitempty"`
+	// Boolean value that determines whether the axis should include ticks.                                        
+	Ticks                                                                                       *bool              `json:"ticks,omitempty"`
 	// A title for the field. If `null`, the title will be removed.                                                
 	//                                                                                                             
 	// __Default value:__  derived from the field's name and transformation function                               
@@ -3304,6 +3304,10 @@ type MarkDef struct {
 	//                                                                                                            
 	// __Default value:__ (None)                                                                                  
 	Fill                                                                                         *string          `json:"fill,omitempty"`
+	// The fill opacity (value between [0,1]).                                                                    
+	//                                                                                                            
+	// __Default value:__ `1`                                                                                     
+	FillOpacity                                                                                  *float64         `json:"fillOpacity,omitempty"`
 	// Whether the mark's color should be used as fill color instead of stroke color.                             
 	//                                                                                                            
 	// __Default value:__ `true` for all marks except `point` and `false` for `point`.                            
@@ -3312,10 +3316,6 @@ type MarkDef struct {
 	//                                                                                                            
 	// __Note:__ This property cannot be used in a [style config](mark.html#style-config).                        
 	Filled                                                                                       *bool            `json:"filled,omitempty"`
-	// The fill opacity (value between [0,1]).                                                                    
-	//                                                                                                            
-	// __Default value:__ `1`                                                                                     
-	FillOpacity                                                                                  *float64         `json:"fillOpacity,omitempty"`
 	// The typeface to set the text in (e.g., `"Helvetica Neue"`).                                                
 	Font                                                                                         *string          `json:"font,omitempty"`
 	// The font size, in pixels.                                                                                  
diff --git a/base/schema-golang-leading-comments/test/inputs/schema/date-time.schema/default/multi/TopLevel.go b/head/schema-golang-leading-comments/test/inputs/schema/date-time.schema/default/multi/TopLevel.go
index e01fa21..fd155ed 100644
--- a/base/schema-golang-leading-comments/test/inputs/schema/date-time.schema/default/multi/TopLevel.go
+++ b/head/schema-golang-leading-comments/test/inputs/schema/date-time.schema/default/multi/TopLevel.go
@@ -14,9 +14,9 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	ComplexUnionArray []ComplexUnionArrayElement `json:"complex-union-array"`
 	Date              string                     `json:"date"`
-	DateTime          time.Time                  `json:"date-time"`
 	Time              string                     `json:"time"`
+	DateTime          time.Time                  `json:"date-time"`
 	UnionArray        []string                   `json:"union-array"`
+	ComplexUnionArray []ComplexUnionArrayElement `json:"complex-union-array"`
 }
diff --git a/base/schema-golang-leading-comments/test/inputs/schema/date-time.schema/default/quicktype.go b/head/schema-golang-leading-comments/test/inputs/schema/date-time.schema/default/quicktype.go
index 02c9ed5..93cd898 100644
--- a/base/schema-golang-leading-comments/test/inputs/schema/date-time.schema/default/quicktype.go
+++ b/head/schema-golang-leading-comments/test/inputs/schema/date-time.schema/default/quicktype.go
@@ -17,11 +17,11 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
-	ComplexUnionArray []ComplexUnionArrayElement `json:"complex-union-array"`
 	Date              string                     `json:"date"`
-	DateTime          time.Time                  `json:"date-time"`
 	Time              string                     `json:"time"`
+	DateTime          time.Time                  `json:"date-time"`
 	UnionArray        []string                   `json:"union-array"`
+	ComplexUnionArray []ComplexUnionArrayElement `json:"complex-union-array"`
 }
 
 type ComplexUnionArrayEnum string
diff --git a/base/schema-haskell/test/inputs/schema/accessors.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/accessors.schema/default/QuickType.hs
index 59e3955..e9a2cfc 100644
--- a/base/schema-haskell/test/inputs/schema/accessors.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/accessors.schema/default/QuickType.hs
@@ -15,10 +15,10 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { barreQuickType :: Text
+    { unionizationQuickType :: Union
     , enumerificationQuickType :: EnumEnum
     , fooQuickType :: Text
-    , unionizationQuickType :: Union
+    , barreQuickType :: Text
     } deriving (Show)
 
 data EnumEnum
@@ -36,20 +36,20 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType barreQuickType enumerificationQuickType fooQuickType unionizationQuickType) =
+    toJSON (QuickType unionizationQuickType enumerificationQuickType fooQuickType barreQuickType) =
         object
-        [ "bar" .= barreQuickType
+        [ "union" .= unionizationQuickType
         , "enum" .= enumerificationQuickType
         , "foo" .= fooQuickType
-        , "union" .= unionizationQuickType
+        , "bar" .= barreQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .: "bar"
+        <$> v .: "union"
         <*> v .: "enum"
         <*> v .: "foo"
-        <*> v .: "union"
+        <*> v .: "bar"
 
 instance ToJSON EnumEnum where
     toJSON FireEnumEnum = "red"
diff --git a/base/schema-haskell/test/inputs/schema/bool-string.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/bool-string.schema/default/QuickType.hs
index bfaf2e7..fa635c7 100644
--- a/base/schema-haskell/test/inputs/schema/bool-string.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/bool-string.schema/default/QuickType.hs
@@ -14,11 +14,11 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { arrNullableQuickType :: Maybe ([(Maybe Text)])
-    , arrOneQuickType :: Maybe ([Text])
-    , nullableQuickType :: Maybe Text
-    , oneQuickType :: Text
+    { oneQuickType :: Text
     , optionalQuickType :: Maybe Text
+    , nullableQuickType :: Maybe Text
+    , arrOneQuickType :: Maybe ([Text])
+    , arrNullableQuickType :: Maybe ([(Maybe Text)])
     , unionWithBoolQuickType :: UnionWithBool
     , unionWithBoolAndEnumQuickType :: UnionWithBool
     } deriving (Show)
@@ -32,24 +32,24 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType arrNullableQuickType arrOneQuickType nullableQuickType oneQuickType optionalQuickType unionWithBoolQuickType unionWithBoolAndEnumQuickType) =
+    toJSON (QuickType oneQuickType optionalQuickType nullableQuickType arrOneQuickType arrNullableQuickType unionWithBoolQuickType unionWithBoolAndEnumQuickType) =
         object
-        [ "arrNullable" .= arrNullableQuickType
-        , "arrOne" .= arrOneQuickType
-        , "nullable" .= nullableQuickType
-        , "one" .= oneQuickType
+        [ "one" .= oneQuickType
         , "optional" .= optionalQuickType
+        , "nullable" .= nullableQuickType
+        , "arrOne" .= arrOneQuickType
+        , "arrNullable" .= arrNullableQuickType
         , "unionWithBool" .= unionWithBoolQuickType
         , "unionWithBoolAndEnum" .= unionWithBoolAndEnumQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .:? "arrNullable"
-        <*> v .:? "arrOne"
-        <*> v .: "nullable"
-        <*> v .: "one"
+        <$> v .: "one"
         <*> v .:? "optional"
+        <*> v .: "nullable"
+        <*> v .:? "arrOne"
+        <*> v .:? "arrNullable"
         <*> v .: "unionWithBool"
         <*> v .: "unionWithBoolAndEnum"
 
diff --git a/base/schema-haskell/test/inputs/schema/comment-injection.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/comment-injection.schema/default/QuickType.hs
index bbf6ef1..5d288da 100644
--- a/base/schema-haskell/test/inputs/schema/comment-injection.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/comment-injection.schema/default/QuickType.hs
@@ -25,15 +25,6 @@ import Data.Text (Text)
 }
 }
 
-trailingBackslash:
-Ends with a backslash \
-
-trailingQuote:
-Ends with a quote "
-
-trailingTripleQuote:
-Ends with a triple quote """
-
 value:
 Property delimiters:
 */
@@ -47,29 +38,38 @@ Property delimiters:
 }
 }
 }
+
+trailingBackslash:
+Ends with a backslash \
+
+trailingQuote:
+Ends with a quote "
+
+trailingTripleQuote:
+Ends with a triple quote """
 -}
 data QuickType = QuickType
-    { trailingBackslashQuickType :: Maybe Text
+    { valueQuickType :: Text
+    , trailingBackslashQuickType :: Maybe Text
     , trailingQuoteQuickType :: Maybe Text
     , trailingTripleQuoteQuickType :: Maybe Text
-    , valueQuickType :: Text
     } deriving (Show)
 
 decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType trailingBackslashQuickType trailingQuoteQuickType trailingTripleQuoteQuickType valueQuickType) =
+    toJSON (QuickType valueQuickType trailingBackslashQuickType trailingQuoteQuickType trailingTripleQuoteQuickType) =
         object
-        [ "trailingBackslash" .= trailingBackslashQuickType
+        [ "value" .= valueQuickType
+        , "trailingBackslash" .= trailingBackslashQuickType
         , "trailingQuote" .= trailingQuoteQuickType
         , "trailingTripleQuote" .= trailingTripleQuoteQuickType
-        , "value" .= valueQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .:? "trailingBackslash"
+        <$> v .: "value"
+        <*> v .:? "trailingBackslash"
         <*> v .:? "trailingQuote"
         <*> v .:? "trailingTripleQuote"
-        <*> v .: "value"
diff --git a/base/schema-haskell/test/inputs/schema/date-time-or-string.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/date-time-or-string.schema/default/QuickType.hs
index 7af885f..260f61a 100644
--- a/base/schema-haskell/test/inputs/schema/date-time-or-string.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/date-time-or-string.schema/default/QuickType.hs
@@ -13,21 +13,21 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { barQuickType :: Text
-    , fooQuickType :: Text
+    { fooQuickType :: Text
+    , barQuickType :: Text
     } deriving (Show)
 
 decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType barQuickType fooQuickType) =
+    toJSON (QuickType fooQuickType barQuickType) =
         object
-        [ "bar" .= barQuickType
-        , "foo" .= fooQuickType
+        [ "foo" .= fooQuickType
+        , "bar" .= barQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .: "bar"
-        <*> v .: "foo"
+        <$> v .: "foo"
+        <*> v .: "bar"
diff --git a/base/schema-haskell/test/inputs/schema/date-time.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/date-time.schema/default/QuickType.hs
index 7cbce01..3ce0650 100644
--- a/base/schema-haskell/test/inputs/schema/date-time.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/date-time.schema/default/QuickType.hs
@@ -14,11 +14,11 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { complexUnionArrayQuickType :: [ComplexUnionArray]
-    , dateQuickType :: Text
-    , dateTimeQuickType :: Text
+    { dateQuickType :: Text
     , timeQuickType :: Text
+    , dateTimeQuickType :: Text
     , unionArrayQuickType :: [Text]
+    , complexUnionArrayQuickType :: [ComplexUnionArray]
     } deriving (Show)
 
 data ComplexUnionArray
@@ -30,22 +30,22 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType complexUnionArrayQuickType dateQuickType dateTimeQuickType timeQuickType unionArrayQuickType) =
+    toJSON (QuickType dateQuickType timeQuickType dateTimeQuickType unionArrayQuickType complexUnionArrayQuickType) =
         object
-        [ "complex-union-array" .= complexUnionArrayQuickType
-        , "date" .= dateQuickType
-        , "date-time" .= dateTimeQuickType
+        [ "date" .= dateQuickType
         , "time" .= timeQuickType
+        , "date-time" .= dateTimeQuickType
         , "union-array" .= unionArrayQuickType
+        , "complex-union-array" .= complexUnionArrayQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .: "complex-union-array"
-        <*> v .: "date"
-        <*> v .: "date-time"
+        <$> v .: "date"
         <*> v .: "time"
+        <*> v .: "date-time"
         <*> v .: "union-array"
+        <*> v .: "complex-union-array"
 
 instance ToJSON ComplexUnionArray where
     toJSON (IntegerInComplexUnionArray x) = toJSON x
diff --git a/base/schema-haskell/test/inputs/schema/description.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/description.schema/default/QuickType.hs
index 28525d0..2890eaa 100644
--- a/base/schema-haskell/test/inputs/schema/description.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/description.schema/default/QuickType.hs
@@ -19,21 +19,21 @@ import Data.Text (Text)
 {-| The top-level class.
 Its description has two lines.
 
-bar:
-A pretty boolean
+union:
+Either a number or a string
 
 enum:
 An enumeration
 
-union:
-Either a number or a string
+bar:
+A pretty boolean
 -}
 data QuickType = QuickType
-    { barQuickType :: Maybe Bool
+    { unionQuickType :: Union
     , enumQuickType :: EnumEnum
     , fooQuickType :: Maybe Float
+    , barQuickType :: Maybe Bool
     , objectOrStringQuickType :: ObjectOrStringUnion
-    , unionQuickType :: Union
     } deriving (Show)
 
 {-| An enumeration -}
@@ -66,22 +66,22 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType barQuickType enumQuickType fooQuickType objectOrStringQuickType unionQuickType) =
+    toJSON (QuickType unionQuickType enumQuickType fooQuickType barQuickType objectOrStringQuickType) =
         object
-        [ "bar" .= barQuickType
+        [ "union" .= unionQuickType
         , "enum" .= enumQuickType
         , "foo" .= fooQuickType
+        , "bar" .= barQuickType
         , "object-or-string" .= objectOrStringQuickType
-        , "union" .= unionQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .:? "bar"
+        <$> v .: "union"
         <*> v .: "enum"
         <*> v .:? "foo"
+        <*> v .:? "bar"
         <*> v .: "object-or-string"
-        <*> v .: "union"
 
 instance ToJSON EnumEnum where
     toJSON FooEnumEnum = "foo"
diff --git a/base/schema-haskell/test/inputs/schema/integer-string.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/integer-string.schema/default/QuickType.hs
index 5577f7c..4614798 100644
--- a/base/schema-haskell/test/inputs/schema/integer-string.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/integer-string.schema/default/QuickType.hs
@@ -14,11 +14,11 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { arrNullableQuickType :: Maybe ([(Maybe Text)])
-    , arrOneQuickType :: Maybe ([Text])
-    , nullableQuickType :: Maybe Text
-    , oneQuickType :: Text
+    { oneQuickType :: Text
     , optionalQuickType :: Maybe Text
+    , nullableQuickType :: Maybe Text
+    , arrOneQuickType :: Maybe ([Text])
+    , arrNullableQuickType :: Maybe ([(Maybe Text)])
     , unionWithIntQuickType :: UnionWithInt
     , unionWithIntAndEnumQuickType :: UnionWithInt
     } deriving (Show)
@@ -32,24 +32,24 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType arrNullableQuickType arrOneQuickType nullableQuickType oneQuickType optionalQuickType unionWithIntQuickType unionWithIntAndEnumQuickType) =
+    toJSON (QuickType oneQuickType optionalQuickType nullableQuickType arrOneQuickType arrNullableQuickType unionWithIntQuickType unionWithIntAndEnumQuickType) =
         object
-        [ "arrNullable" .= arrNullableQuickType
-        , "arrOne" .= arrOneQuickType
-        , "nullable" .= nullableQuickType
-        , "one" .= oneQuickType
+        [ "one" .= oneQuickType
         , "optional" .= optionalQuickType
+        , "nullable" .= nullableQuickType
+        , "arrOne" .= arrOneQuickType
+        , "arrNullable" .= arrNullableQuickType
         , "unionWithInt" .= unionWithIntQuickType
         , "unionWithIntAndEnum" .= unionWithIntAndEnumQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .:? "arrNullable"
-        <*> v .:? "arrOne"
-        <*> v .: "nullable"
-        <*> v .: "one"
+        <$> v .: "one"
         <*> v .:? "optional"
+        <*> v .: "nullable"
+        <*> v .:? "arrOne"
+        <*> v .:? "arrNullable"
         <*> v .: "unionWithInt"
         <*> v .: "unionWithIntAndEnum"
 
diff --git a/base/schema-haskell/test/inputs/schema/integer-type.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/integer-type.schema/default/QuickType.hs
index cef2fc1..66507f9 100644
--- a/base/schema-haskell/test/inputs/schema/integer-type.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/integer-type.schema/default/QuickType.hs
@@ -13,42 +13,42 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { aboveI32MaxQuickType :: Int
-    , belowI32MinQuickType :: Int
+    { smallPositiveQuickType :: Int
+    , smallNegativeQuickType :: Int
     , i32RangeQuickType :: Int
-    , largeBoundsQuickType :: Int
-    , onlyMaximumQuickType :: Int
+    , aboveI32MaxQuickType :: Int
+    , belowI32MinQuickType :: Int
     , onlyMinimumQuickType :: Int
-    , smallNegativeQuickType :: Int
-    , smallPositiveQuickType :: Int
+    , onlyMaximumQuickType :: Int
     , unboundedQuickType :: Int
+    , largeBoundsQuickType :: Int
     } deriving (Show)
 
 decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType aboveI32MaxQuickType belowI32MinQuickType i32RangeQuickType largeBoundsQuickType onlyMaximumQuickType onlyMinimumQuickType smallNegativeQuickType smallPositiveQuickType unboundedQuickType) =
+    toJSON (QuickType smallPositiveQuickType smallNegativeQuickType i32RangeQuickType aboveI32MaxQuickType belowI32MinQuickType onlyMinimumQuickType onlyMaximumQuickType unboundedQuickType largeBoundsQuickType) =
         object
-        [ "above_i32_max" .= aboveI32MaxQuickType
-        , "below_i32_min" .= belowI32MinQuickType
+        [ "small_positive" .= smallPositiveQuickType
+        , "small_negative" .= smallNegativeQuickType
         , "i32_range" .= i32RangeQuickType
-        , "large_bounds" .= largeBoundsQuickType
-        , "only_maximum" .= onlyMaximumQuickType
+        , "above_i32_max" .= aboveI32MaxQuickType
+        , "below_i32_min" .= belowI32MinQuickType
         , "only_minimum" .= onlyMinimumQuickType
-        , "small_negative" .= smallNegativeQuickType
-        , "small_positive" .= smallPositiveQuickType
+        , "only_maximum" .= onlyMaximumQuickType
         , "unbounded" .= unboundedQuickType
+        , "large_bounds" .= largeBoundsQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .: "above_i32_max"
-        <*> v .: "below_i32_min"
+        <$> v .: "small_positive"
+        <*> v .: "small_negative"
         <*> v .: "i32_range"
-        <*> v .: "large_bounds"
-        <*> v .: "only_maximum"
+        <*> v .: "above_i32_max"
+        <*> v .: "below_i32_min"
         <*> v .: "only_minimum"
-        <*> v .: "small_negative"
-        <*> v .: "small_positive"
+        <*> v .: "only_maximum"
         <*> v .: "unbounded"
+        <*> v .: "large_bounds"
diff --git a/base/schema-haskell/test/inputs/schema/light.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/light.schema/default/QuickType.hs
index c29784a..5c2272e 100644
--- a/base/schema-haskell/test/inputs/schema/light.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/light.schema/default/QuickType.hs
@@ -18,8 +18,8 @@ data QuickType = QuickType
     } deriving (Show)
 
 data LightParams = LightParams
-    { appIDLightParams :: Text
-    , outletIDLightParams :: Text
+    { outletIDLightParams :: Text
+    , appIDLightParams :: Text
     , rgbaLightParams :: Text
     } deriving (Show)
 
@@ -37,15 +37,15 @@ instance FromJSON QuickType where
         <$> v .: "LightParams"
 
 instance ToJSON LightParams where
-    toJSON (LightParams appIDLightParams outletIDLightParams rgbaLightParams) =
+    toJSON (LightParams outletIDLightParams appIDLightParams rgbaLightParams) =
         object
-        [ "app_id" .= appIDLightParams
-        , "outlet_id" .= outletIDLightParams
+        [ "outlet_id" .= outletIDLightParams
+        , "app_id" .= appIDLightParams
         , "rgba" .= rgbaLightParams
         ]
 
 instance FromJSON LightParams where
     parseJSON (Object v) = LightParams
-        <$> v .: "app_id"
-        <*> v .: "outlet_id"
+        <$> v .: "outlet_id"
+        <*> v .: "app_id"
         <*> v .: "rgba"
diff --git a/base/schema-haskell/test/inputs/schema/min-max-items.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/min-max-items.schema/default/QuickType.hs
index fe6e2fc..d9d147a 100644
--- a/base/schema-haskell/test/inputs/schema/min-max-items.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/min-max-items.schema/default/QuickType.hs
@@ -14,9 +14,9 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { maxOnlyQuickType :: [Int]
+    { minOnlyQuickType :: [Text]
+    , maxOnlyQuickType :: [Int]
     , minAndMaxQuickType :: [Float]
-    , minOnlyQuickType :: [Text]
     , plainQuickType :: [Text]
     , unionItemsQuickType :: [UnionItem]
     } deriving (Show)
@@ -30,20 +30,20 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType maxOnlyQuickType minAndMaxQuickType minOnlyQuickType plainQuickType unionItemsQuickType) =
+    toJSON (QuickType minOnlyQuickType maxOnlyQuickType minAndMaxQuickType plainQuickType unionItemsQuickType) =
         object
-        [ "maxOnly" .= maxOnlyQuickType
+        [ "minOnly" .= minOnlyQuickType
+        , "maxOnly" .= maxOnlyQuickType
         , "minAndMax" .= minAndMaxQuickType
-        , "minOnly" .= minOnlyQuickType
         , "plain" .= plainQuickType
         , "unionItems" .= unionItemsQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .: "maxOnly"
+        <$> v .: "minOnly"
+        <*> v .: "maxOnly"
         <*> v .: "minAndMax"
-        <*> v .: "minOnly"
         <*> v .: "plain"
         <*> v .: "unionItems"
 
diff --git a/base/schema-haskell/test/inputs/schema/minmax-integer.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/minmax-integer.schema/default/QuickType.hs
index b69e891..f270038 100644
--- a/base/schema-haskell/test/inputs/schema/minmax-integer.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/minmax-integer.schema/default/QuickType.hs
@@ -14,38 +14,38 @@ import Data.Text (Text)
 
 data QuickType = QuickType
     { freeQuickType :: Int
-    , intersectionQuickType :: Int
-    , maxQuickType :: Int
     , minQuickType :: Int
+    , maxQuickType :: Int
     , minmaxQuickType :: Int
-    , minMaxIntersectionQuickType :: Int
-    , minMaxUnionQuickType :: Int
     , unionQuickType :: Int
+    , minMaxUnionQuickType :: Int
+    , intersectionQuickType :: Int
+    , minMaxIntersectionQuickType :: Int
     } deriving (Show)
 
 decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType freeQuickType intersectionQuickType maxQuickType minQuickType minmaxQuickType minMaxIntersectionQuickType minMaxUnionQuickType unionQuickType) =
+    toJSON (QuickType freeQuickType minQuickType maxQuickType minmaxQuickType unionQuickType minMaxUnionQuickType intersectionQuickType minMaxIntersectionQuickType) =
         object
         [ "free" .= freeQuickType
-        , "intersection" .= intersectionQuickType
-        , "max" .= maxQuickType
         , "min" .= minQuickType
+        , "max" .= maxQuickType
         , "minmax" .= minmaxQuickType
-        , "minMaxIntersection" .= minMaxIntersectionQuickType
-        , "minMaxUnion" .= minMaxUnionQuickType
         , "union" .= unionQuickType
+        , "minMaxUnion" .= minMaxUnionQuickType
+        , "intersection" .= intersectionQuickType
+        , "minMaxIntersection" .= minMaxIntersectionQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
         <$> v .: "free"
-        <*> v .: "intersection"
-        <*> v .: "max"
         <*> v .: "min"
+        <*> v .: "max"
         <*> v .: "minmax"
-        <*> v .: "minMaxIntersection"
-        <*> v .: "minMaxUnion"
         <*> v .: "union"
+        <*> v .: "minMaxUnion"
+        <*> v .: "intersection"
+        <*> v .: "minMaxIntersection"
diff --git a/base/schema-haskell/test/inputs/schema/minmax.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/minmax.schema/default/QuickType.hs
index 438a991..e326eef 100644
--- a/base/schema-haskell/test/inputs/schema/minmax.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/minmax.schema/default/QuickType.hs
@@ -14,38 +14,38 @@ import Data.Text (Text)
 
 data QuickType = QuickType
     { freeQuickType :: Float
-    , intersectionQuickType :: Float
-    , maxQuickType :: Float
     , minQuickType :: Float
+    , maxQuickType :: Float
     , minmaxQuickType :: Float
-    , minMaxIntersectionQuickType :: Float
-    , minMaxUnionQuickType :: Float
     , unionQuickType :: Float
+    , minMaxUnionQuickType :: Float
+    , intersectionQuickType :: Float
+    , minMaxIntersectionQuickType :: Float
     } deriving (Show)
 
 decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType freeQuickType intersectionQuickType maxQuickType minQuickType minmaxQuickType minMaxIntersectionQuickType minMaxUnionQuickType unionQuickType) =
+    toJSON (QuickType freeQuickType minQuickType maxQuickType minmaxQuickType unionQuickType minMaxUnionQuickType intersectionQuickType minMaxIntersectionQuickType) =
         object
         [ "free" .= freeQuickType
-        , "intersection" .= intersectionQuickType
-        , "max" .= maxQuickType
         , "min" .= minQuickType
+        , "max" .= maxQuickType
         , "minmax" .= minmaxQuickType
-        , "minMaxIntersection" .= minMaxIntersectionQuickType
-        , "minMaxUnion" .= minMaxUnionQuickType
         , "union" .= unionQuickType
+        , "minMaxUnion" .= minMaxUnionQuickType
+        , "intersection" .= intersectionQuickType
+        , "minMaxIntersection" .= minMaxIntersectionQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
         <$> v .: "free"
-        <*> v .: "intersection"
-        <*> v .: "max"
         <*> v .: "min"
+        <*> v .: "max"
         <*> v .: "minmax"
-        <*> v .: "minMaxIntersection"
-        <*> v .: "minMaxUnion"
         <*> v .: "union"
+        <*> v .: "minMaxUnion"
+        <*> v .: "intersection"
+        <*> v .: "minMaxIntersection"
diff --git a/base/schema-haskell/test/inputs/schema/minmaxlength.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/minmaxlength.schema/default/QuickType.hs
index 123ae8c..ff2d82a 100644
--- a/base/schema-haskell/test/inputs/schema/minmaxlength.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/minmaxlength.schema/default/QuickType.hs
@@ -14,14 +14,14 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { intersectionQuickType :: Text
-    , inUnionQuickType :: InUnion
+    { minlengthQuickType :: Text
     , maxlengthQuickType :: Text
-    , minlengthQuickType :: Text
-    , minMaxIntersectionQuickType :: Text
     , minmaxlengthQuickType :: Text
-    , minMaxUnionQuickType :: Text
     , unionQuickType :: Text
+    , inUnionQuickType :: InUnion
+    , minMaxUnionQuickType :: Text
+    , intersectionQuickType :: Text
+    , minMaxIntersectionQuickType :: Text
     } deriving (Show)
 
 data InUnion
@@ -33,28 +33,28 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType intersectionQuickType inUnionQuickType maxlengthQuickType minlengthQuickType minMaxIntersectionQuickType minmaxlengthQuickType minMaxUnionQuickType unionQuickType) =
+    toJSON (QuickType minlengthQuickType maxlengthQuickType minmaxlengthQuickType unionQuickType inUnionQuickType minMaxUnionQuickType intersectionQuickType minMaxIntersectionQuickType) =
         object
-        [ "intersection" .= intersectionQuickType
-        , "inUnion" .= inUnionQuickType
+        [ "minlength" .= minlengthQuickType
         , "maxlength" .= maxlengthQuickType
-        , "minlength" .= minlengthQuickType
-        , "minMaxIntersection" .= minMaxIntersectionQuickType
         , "minmaxlength" .= minmaxlengthQuickType
-        , "minMaxUnion" .= minMaxUnionQuickType
         , "union" .= unionQuickType
+        , "inUnion" .= inUnionQuickType
+        , "minMaxUnion" .= minMaxUnionQuickType
+        , "intersection" .= intersectionQuickType
+        , "minMaxIntersection" .= minMaxIntersectionQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .: "intersection"
-        <*> v .: "inUnion"
+        <$> v .: "minlength"
         <*> v .: "maxlength"
-        <*> v .: "minlength"
-        <*> v .: "minMaxIntersection"
         <*> v .: "minmaxlength"
-        <*> v .: "minMaxUnion"
         <*> v .: "union"
+        <*> v .: "inUnion"
+        <*> v .: "minMaxUnion"
+        <*> v .: "intersection"
+        <*> v .: "minMaxIntersection"
 
 instance ToJSON InUnion where
     toJSON (DoubleInInUnion x) = toJSON x
diff --git a/base/schema-haskell/test/inputs/schema/non-standard-ref.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/non-standard-ref.schema/default/QuickType.hs
index c64f881..0be6759 100644
--- a/base/schema-haskell/test/inputs/schema/non-standard-ref.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/non-standard-ref.schema/default/QuickType.hs
@@ -13,8 +13,8 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { barQuickType :: Int
-    , fooQuickType :: Int
+    { fooQuickType :: Int
+    , barQuickType :: Int
     , quuxQuickType :: Bool
     } deriving (Show)
 
@@ -22,15 +22,15 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType barQuickType fooQuickType quuxQuickType) =
+    toJSON (QuickType fooQuickType barQuickType quuxQuickType) =
         object
-        [ "bar" .= barQuickType
-        , "foo" .= fooQuickType
+        [ "foo" .= fooQuickType
+        , "bar" .= barQuickType
         , "quux" .= quuxQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .: "bar"
-        <*> v .: "foo"
+        <$> v .: "foo"
+        <*> v .: "bar"
         <*> v .: "quux"
diff --git a/base/schema-haskell/test/inputs/schema/optional-const-ref.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/optional-const-ref.schema/default/QuickType.hs
index e7dc7fa..89cf7a9 100644
--- a/base/schema-haskell/test/inputs/schema/optional-const-ref.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/optional-const-ref.schema/default/QuickType.hs
@@ -15,12 +15,12 @@ import Data.Text (Text)
 
 data QuickType = QuickType
     { coordinatesQuickType :: Maybe ([Coordinate])
-    , countQuickType :: Maybe Int
-    , labelQuickType :: Maybe Text
     , requiredCoordinatesQuickType :: [Coordinate]
+    , countQuickType :: Maybe Int
     , requiredCountQuickType :: Int
-    , requiredLabelQuickType :: Text
     , weightQuickType :: Maybe Float
+    , labelQuickType :: Maybe Text
+    , requiredLabelQuickType :: Text
     } deriving (Show)
 
 data Coordinate = Coordinate
@@ -32,26 +32,26 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType coordinatesQuickType countQuickType labelQuickType requiredCoordinatesQuickType requiredCountQuickType requiredLabelQuickType weightQuickType) =
+    toJSON (QuickType coordinatesQuickType requiredCoordinatesQuickType countQuickType requiredCountQuickType weightQuickType labelQuickType requiredLabelQuickType) =
         object
         [ "coordinates" .= coordinatesQuickType
-        , "count" .= countQuickType
-        , "label" .= labelQuickType
         , "requiredCoordinates" .= requiredCoordinatesQuickType
+        , "count" .= countQuickType
         , "requiredCount" .= requiredCountQuickType
-        , "requiredLabel" .= requiredLabelQuickType
         , "weight" .= weightQuickType
+        , "label" .= labelQuickType
+        , "requiredLabel" .= requiredLabelQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
         <$> v .:? "coordinates"
-        <*> v .:? "count"
-        <*> v .:? "label"
         <*> v .: "requiredCoordinates"
+        <*> v .:? "count"
         <*> v .: "requiredCount"
-        <*> v .: "requiredLabel"
         <*> v .:? "weight"
+        <*> v .:? "label"
+        <*> v .: "requiredLabel"
 
 instance ToJSON Coordinate where
     toJSON (Coordinate latitudeCoordinate longitudeCoordinate) =
diff --git a/base/schema-haskell/test/inputs/schema/optional-constraints.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/optional-constraints.schema/default/QuickType.hs
index 5556afc..fd4dd2f 100644
--- a/base/schema-haskell/test/inputs/schema/optional-constraints.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/optional-constraints.schema/default/QuickType.hs
@@ -13,30 +13,30 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { optDoubleQuickType :: Maybe Float
+    { reqZeroMinQuickType :: Int
     , optIntQuickType :: Maybe Int
-    , optPatternQuickType :: Maybe Text
+    , optDoubleQuickType :: Maybe Float
     , optStringQuickType :: Maybe Text
-    , reqZeroMinQuickType :: Int
+    , optPatternQuickType :: Maybe Text
     } deriving (Show)
 
 decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType optDoubleQuickType optIntQuickType optPatternQuickType optStringQuickType reqZeroMinQuickType) =
+    toJSON (QuickType reqZeroMinQuickType optIntQuickType optDoubleQuickType optStringQuickType optPatternQuickType) =
         object
-        [ "optDouble" .= optDoubleQuickType
+        [ "reqZeroMin" .= reqZeroMinQuickType
         , "optInt" .= optIntQuickType
-        , "optPattern" .= optPatternQuickType
+        , "optDouble" .= optDoubleQuickType
         , "optString" .= optStringQuickType
-        , "reqZeroMin" .= reqZeroMinQuickType
+        , "optPattern" .= optPatternQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .:? "optDouble"
+        <$> v .: "reqZeroMin"
         <*> v .:? "optInt"
-        <*> v .:? "optPattern"
+        <*> v .:? "optDouble"
         <*> v .:? "optString"
-        <*> v .: "reqZeroMin"
+        <*> v .:? "optPattern"
diff --git a/base/schema-haskell/test/inputs/schema/optional-date-time.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/optional-date-time.schema/default/QuickType.hs
index c1ee1d7..1df97c2 100644
--- a/base/schema-haskell/test/inputs/schema/optional-date-time.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/optional-date-time.schema/default/QuickType.hs
@@ -13,33 +13,33 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { optionalDateQuickType :: Maybe Text
-    , optionalDateTimeQuickType :: Maybe Text
-    , optionalTimeQuickType :: Maybe Text
-    , requiredDateQuickType :: Text
-    , requiredDateTimeQuickType :: Text
+    { requiredDateQuickType :: Text
     , requiredTimeQuickType :: Text
+    , requiredDateTimeQuickType :: Text
+    , optionalDateQuickType :: Maybe Text
+    , optionalTimeQuickType :: Maybe Text
+    , optionalDateTimeQuickType :: Maybe Text
     } deriving (Show)
 
 decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType optionalDateQuickType optionalDateTimeQuickType optionalTimeQuickType requiredDateQuickType requiredDateTimeQuickType requiredTimeQuickType) =
+    toJSON (QuickType requiredDateQuickType requiredTimeQuickType requiredDateTimeQuickType optionalDateQuickType optionalTimeQuickType optionalDateTimeQuickType) =
         object
-        [ "optional-date" .= optionalDateQuickType
-        , "optional-date-time" .= optionalDateTimeQuickType
-        , "optional-time" .= optionalTimeQuickType
-        , "required-date" .= requiredDateQuickType
-        , "required-date-time" .= requiredDateTimeQuickType
+        [ "required-date" .= requiredDateQuickType
         , "required-time" .= requiredTimeQuickType
+        , "required-date-time" .= requiredDateTimeQuickType
+        , "optional-date" .= optionalDateQuickType
+        , "optional-time" .= optionalTimeQuickType
+        , "optional-date-time" .= optionalDateTimeQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .:? "optional-date"
-        <*> v .:? "optional-date-time"
-        <*> v .:? "optional-time"
-        <*> v .: "required-date"
-        <*> v .: "required-date-time"
+        <$> v .: "required-date"
         <*> v .: "required-time"
+        <*> v .: "required-date-time"
+        <*> v .:? "optional-date"
+        <*> v .:? "optional-time"
+        <*> v .:? "optional-date-time"
diff --git a/base/schema-haskell/test/inputs/schema/renaming-bug.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/renaming-bug.schema/default/QuickType.hs
index d19f09d..564b66c 100644
--- a/base/schema-haskell/test/inputs/schema/renaming-bug.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/renaming-bug.schema/default/QuickType.hs
@@ -35,13 +35,13 @@ data QuickType = QuickType
 
 data Fruit = Fruit
     { appleFruit :: Maybe Bool
-    , berriesFruit :: Maybe ([Berry])
     , orangeFruit :: Maybe Bool
+    , berriesFruit :: Maybe ([Berry])
     } deriving (Show)
 
 data Berry = Berry
-    { colorBerry :: Maybe Color
-    , nameBerry :: Maybe Text
+    { nameBerry :: Maybe Text
+    , colorBerry :: Maybe Color
     , shapesBerry :: Maybe ([Shape])
     } deriving (Show)
 
@@ -50,8 +50,8 @@ data Color = Color
     } deriving (Show)
 
 data Shape = Shape
-    { geometryShape :: Maybe Geometry
-    , historyShape :: Maybe History
+    { historyShape :: Maybe History
+    , geometryShape :: Maybe Geometry
     } deriving (Show)
 
 data Geometry = Geometry
@@ -68,9 +68,9 @@ data RectShape = RectShape
     } deriving (Show)
 
 data Part = Part
-    { depthPart :: Maybe Text
-    , lengthPart :: Maybe Text
+    { lengthPart :: Maybe Text
     , widthPart :: Maybe Text
+    , depthPart :: Maybe Text
     } deriving (Show)
 
 data History = History
@@ -78,12 +78,12 @@ data History = History
     } deriving (Show)
 
 data Vehicle = Vehicle
-    { brandVehicle :: Maybe Text
-    , vehicleIDVehicle :: Maybe Text
-    , speedVehicle :: Maybe Speed
-    , subModuleVehicle :: Maybe Bool
+    { vehicleIDVehicle :: Maybe Text
     , vehicleTypeVehicle :: Maybe VehicleType
+    , speedVehicle :: Maybe Speed
     , yearVehicle :: Maybe Text
+    , brandVehicle :: Maybe Text
+    , subModuleVehicle :: Maybe Bool
     } deriving (Show)
 
 data Speed = Speed
@@ -91,8 +91,8 @@ data Speed = Speed
     } deriving (Show)
 
 data Limit = Limit
-    { maximumLimit :: Maybe Float
-    , minimumLimit :: Maybe Float
+    { minimumLimit :: Maybe Float
+    , maximumLimit :: Maybe Float
     } deriving (Show)
 
 data VehicleType = VehicleType
@@ -140,31 +140,31 @@ instance FromJSON QuickType where
         <*> v .:? "vehicles"
 
 instance ToJSON Fruit where
-    toJSON (Fruit appleFruit berriesFruit orangeFruit) =
+    toJSON (Fruit appleFruit orangeFruit berriesFruit) =
         object
         [ "apple" .= appleFruit
-        , "berries" .= berriesFruit
         , "orange" .= orangeFruit
+        , "berries" .= berriesFruit
         ]
 
 instance FromJSON Fruit where
     parseJSON (Object v) = Fruit
         <$> v .:? "apple"
-        <*> v .:? "berries"
         <*> v .:? "orange"
+        <*> v .:? "berries"
 
 instance ToJSON Berry where
-    toJSON (Berry colorBerry nameBerry shapesBerry) =
+    toJSON (Berry nameBerry colorBerry shapesBerry) =
         object
-        [ "color" .= colorBerry
-        , "name" .= nameBerry
+        [ "name" .= nameBerry
+        , "color" .= colorBerry
         , "shapes" .= shapesBerry
         ]
 
 instance FromJSON Berry where
     parseJSON (Object v) = Berry
-        <$> v .:? "color"
-        <*> v .:? "name"
+        <$> v .:? "name"
+        <*> v .:? "color"
         <*> v .:? "shapes"
 
 instance ToJSON Color where
@@ -178,16 +178,16 @@ instance FromJSON Color where
         <$> v .:? "rgb"
 
 instance ToJSON Shape where
-    toJSON (Shape geometryShape historyShape) =
+    toJSON (Shape historyShape geometryShape) =
         object
-        [ "geometry" .= geometryShape
-        , "history" .= historyShape
+        [ "history" .= historyShape
+        , "geometry" .= geometryShape
         ]
 
 instance FromJSON Shape where
     parseJSON (Object v) = Shape
-        <$> v .:? "geometry"
-        <*> v .:? "history"
+        <$> v .:? "history"
+        <*> v .:? "geometry"
 
 instance ToJSON Geometry where
     toJSON (Geometry rectShapeGeometry circularShapeGeometry) =
@@ -222,18 +222,18 @@ instance FromJSON RectShape where
         <$> v .:? "parts"
 
 instance ToJSON Part where
-    toJSON (Part depthPart lengthPart widthPart) =
+    toJSON (Part lengthPart widthPart depthPart) =
         object
-        [ "depth" .= depthPart
-        , "length" .= lengthPart
+        [ "length" .= lengthPart
         , "width" .= widthPart
+        , "depth" .= depthPart
         ]
 
 instance FromJSON Part where
     parseJSON (Object v) = Part
-        <$> v .:? "depth"
-        <*> v .:? "length"
+        <$> v .:? "length"
         <*> v .:? "width"
+        <*> v .:? "depth"
 
 instance ToJSON History where
     toJSON (History historyClassHistory) =
@@ -246,24 +246,24 @@ instance FromJSON History where
         <$> v .:? "class"
 
 instance ToJSON Vehicle where
-    toJSON (Vehicle brandVehicle vehicleIDVehicle speedVehicle subModuleVehicle vehicleTypeVehicle yearVehicle) =
+    toJSON (Vehicle vehicleIDVehicle vehicleTypeVehicle speedVehicle yearVehicle brandVehicle subModuleVehicle) =
         object
-        [ "brand" .= brandVehicle
-        , "id" .= vehicleIDVehicle
-        , "speed" .= speedVehicle
-        , "subModule" .= subModuleVehicle
+        [ "id" .= vehicleIDVehicle
         , "type" .= vehicleTypeVehicle
+        , "speed" .= speedVehicle
         , "year" .= yearVehicle
+        , "brand" .= brandVehicle
+        , "subModule" .= subModuleVehicle
         ]
 
 instance FromJSON Vehicle where
     parseJSON (Object v) = Vehicle
-        <$> v .:? "brand"
-        <*> v .:? "id"
-        <*> v .:? "speed"
-        <*> v .:? "subModule"
+        <$> v .:? "id"
         <*> v .:? "type"
+        <*> v .:? "speed"
         <*> v .:? "year"
+        <*> v .:? "brand"
+        <*> v .:? "subModule"
 
 instance ToJSON Speed where
     toJSON (Speed velocitySpeed) =
@@ -276,16 +276,16 @@ instance FromJSON Speed where
         <$> v .:? "velocity"
 
 instance ToJSON Limit where
-    toJSON (Limit maximumLimit minimumLimit) =
+    toJSON (Limit minimumLimit maximumLimit) =
         object
-        [ "maximum" .= maximumLimit
-        , "minimum" .= minimumLimit
+        [ "minimum" .= minimumLimit
+        , "maximum" .= maximumLimit
         ]
 
 instance FromJSON Limit where
     parseJSON (Object v) = Limit
-        <$> v .:? "maximum"
-        <*> v .:? "minimum"
+        <$> v .:? "minimum"
+        <*> v .:? "maximum"
 
 instance ToJSON VehicleType where
     toJSON (VehicleType nameVehicleType widthVehicleType lengthVehicleType) =
diff --git a/base/schema-haskell/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.hs
index 3362d54..4de04de 100644
--- a/base/schema-haskell/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/rust-cycle-breaker-union.schema/default/QuickType.hs
@@ -15,13 +15,13 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { nextQuickType :: Maybe Next
-    , valueQuickType :: Text
+    { valueQuickType :: Text
+    , nextQuickType :: Maybe Next
     } deriving (Show)
 
 data Node = Node
-    { nextNode :: Maybe Next
-    , valueNode :: Text
+    { valueNode :: Text
+    , nextNode :: Maybe Next
     } deriving (Show)
 
 data Next
@@ -34,28 +34,28 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType nextQuickType valueQuickType) =
+    toJSON (QuickType valueQuickType nextQuickType) =
         object
-        [ "next" .= nextQuickType
-        , "value" .= valueQuickType
+        [ "value" .= valueQuickType
+        , "next" .= nextQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .:? "next"
-        <*> v .: "value"
+        <$> v .: "value"
+        <*> v .:? "next"
 
 instance ToJSON Node where
-    toJSON (Node nextNode valueNode) =
+    toJSON (Node valueNode nextNode) =
         object
-        [ "next" .= nextNode
-        , "value" .= valueNode
+        [ "value" .= valueNode
+        , "next" .= nextNode
         ]
 
 instance FromJSON Node where
     parseJSON (Object v) = Node
-        <$> v .:? "next"
-        <*> v .: "value"
+        <$> v .: "value"
+        <*> v .:? "next"
 
 instance ToJSON Next where
     toJSON (NodeInNext x) = toJSON x
diff --git a/base/schema-haskell/test/inputs/schema/uuid.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/uuid.schema/default/QuickType.hs
index 7e3efb9..98f7c37 100644
--- a/base/schema-haskell/test/inputs/schema/uuid.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/uuid.schema/default/QuickType.hs
@@ -13,11 +13,11 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { arrNullableQuickType :: Maybe ([(Maybe Text)])
-    , arrOneQuickType :: Maybe ([Text])
-    , nullableQuickType :: Maybe Text
-    , oneQuickType :: Text
+    { oneQuickType :: Text
     , optionalQuickType :: Maybe Text
+    , nullableQuickType :: Maybe Text
+    , arrOneQuickType :: Maybe ([Text])
+    , arrNullableQuickType :: Maybe ([(Maybe Text)])
     , unionWithEnumQuickType :: Text
     } deriving (Show)
 
@@ -25,21 +25,21 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType arrNullableQuickType arrOneQuickType nullableQuickType oneQuickType optionalQuickType unionWithEnumQuickType) =
+    toJSON (QuickType oneQuickType optionalQuickType nullableQuickType arrOneQuickType arrNullableQuickType unionWithEnumQuickType) =
         object
-        [ "arrNullable" .= arrNullableQuickType
-        , "arrOne" .= arrOneQuickType
-        , "nullable" .= nullableQuickType
-        , "one" .= oneQuickType
+        [ "one" .= oneQuickType
         , "optional" .= optionalQuickType
+        , "nullable" .= nullableQuickType
+        , "arrOne" .= arrOneQuickType
+        , "arrNullable" .= arrNullableQuickType
         , "unionWithEnum" .= unionWithEnumQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .:? "arrNullable"
-        <*> v .:? "arrOne"
-        <*> v .: "nullable"
-        <*> v .: "one"
+        <$> v .: "one"
         <*> v .:? "optional"
+        <*> v .: "nullable"
+        <*> v .:? "arrOne"
+        <*> v .:? "arrNullable"
         <*> v .: "unionWithEnum"
diff --git a/base/schema-haskell/test/inputs/schema/vega-lite.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/vega-lite.schema/default/QuickType.hs
index 2a0a7c9..4f1e724 100644
--- a/base/schema-haskell/test/inputs/schema/vega-lite.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/vega-lite.schema/default/QuickType.hs
@@ -637,6 +637,11 @@ Default Fill Color.  This has higher precedence than config.color
 
 __Default value:__ (None)
 
+fillOpacity:
+The fill opacity (value between [0,1]).
+
+__Default value:__ `1`
+
 filled:
 Whether the mark's color should be used as fill color instead of stroke color.
 
@@ -646,11 +651,6 @@ __Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.
 
 __Note:__ This property cannot be used in a [style config](mark.html#style-config).
 
-fillOpacity:
-The fill opacity (value between [0,1]).
-
-__Default value:__ `1`
-
 font:
 The typeface to set the text in (e.g., `"Helvetica Neue"`).
 
@@ -764,8 +764,8 @@ data MarkConfig = MarkConfig
     , dxMarkConfig :: Maybe Float
     , dyMarkConfig :: Maybe Float
     , fillMarkConfig :: Maybe Text
-    , filledMarkConfig :: Maybe Bool
     , fillOpacityMarkConfig :: Maybe Float
+    , filledMarkConfig :: Maybe Bool
     , fontMarkConfig :: Maybe Text
     , fontSizeMarkConfig :: Maybe Float
     , fontStyleMarkConfig :: Maybe FontStyle
@@ -1044,15 +1044,15 @@ The color of the axis's tick.
 tickRound:
 Boolean flag indicating if pixel position values should be rounded to the nearest integer.
 
-ticks:
-Boolean value that determines whether the axis should include ticks.
-
 tickSize:
 The size in pixels of axis ticks.
 
 tickWidth:
 The width, in pixels, of ticks.
 
+ticks:
+Boolean value that determines whether the axis should include ticks.
+
 titleAlign:
 Horizontal text alignment of axis titles.
 
@@ -1115,9 +1115,9 @@ data AxisConfig = AxisConfig
     , shortTimeLabelsAxisConfig :: Maybe Bool
     , tickColorAxisConfig :: Maybe Text
     , tickRoundAxisConfig :: Maybe Bool
-    , ticksAxisConfig :: Maybe Bool
     , tickSizeAxisConfig :: Maybe Float
     , tickWidthAxisConfig :: Maybe Float
+    , ticksAxisConfig :: Maybe Bool
     , titleAlignAxisConfig :: Maybe Text
     , titleAngleAxisConfig :: Maybe Float
     , titleBaselineAxisConfig :: Maybe Text
@@ -1302,15 +1302,15 @@ The color of the axis's tick.
 tickRound:
 Boolean flag indicating if pixel position values should be rounded to the nearest integer.
 
-ticks:
-Boolean value that determines whether the axis should include ticks.
-
 tickSize:
 The size in pixels of axis ticks.
 
 tickWidth:
 The width, in pixels, of ticks.
 
+ticks:
+Boolean value that determines whether the axis should include ticks.
+
 titleAlign:
 Horizontal text alignment of axis titles.
 
@@ -1372,9 +1372,9 @@ data VGAxisConfig = VGAxisConfig
     , minExtentVGAxisConfig :: Maybe Float
     , tickColorVGAxisConfig :: Maybe Text
     , tickRoundVGAxisConfig :: Maybe Bool
-    , ticksVGAxisConfig :: Maybe Bool
     , tickSizeVGAxisConfig :: Maybe Float
     , tickWidthVGAxisConfig :: Maybe Float
+    , ticksVGAxisConfig :: Maybe Bool
     , titleAlignVGAxisConfig :: Maybe Text
     , titleAngleVGAxisConfig :: Maybe Float
     , titleBaselineVGAxisConfig :: Maybe Text
@@ -1442,6 +1442,11 @@ Default Fill Color.  This has higher precedence than config.color
 
 __Default value:__ (None)
 
+fillOpacity:
+The fill opacity (value between [0,1]).
+
+__Default value:__ `1`
+
 filled:
 Whether the mark's color should be used as fill color instead of stroke color.
 
@@ -1451,11 +1456,6 @@ __Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.
 
 __Note:__ This property cannot be used in a [style config](mark.html#style-config).
 
-fillOpacity:
-The fill opacity (value between [0,1]).
-
-__Default value:__ `1`
-
 font:
 The typeface to set the text in (e.g., `"Helvetica Neue"`).
 
@@ -1572,8 +1572,8 @@ data BarConfig = BarConfig
     , dxBarConfig :: Maybe Float
     , dyBarConfig :: Maybe Float
     , fillBarConfig :: Maybe Text
-    , filledBarConfig :: Maybe Bool
     , fillOpacityBarConfig :: Maybe Float
+    , filledBarConfig :: Maybe Bool
     , fontBarConfig :: Maybe Text
     , fontSizeBarConfig :: Maybe Float
     , fontStyleBarConfig :: Maybe FontStyle
@@ -1634,6 +1634,11 @@ Default Fill Color.  This has higher precedence than config.color
 
 __Default value:__ (None)
 
+fillOpacity:
+The fill opacity (value between [0,1]).
+
+__Default value:__ `1`
+
 filled:
 Whether the mark's color should be used as fill color instead of stroke color.
 
@@ -1643,11 +1648,6 @@ __Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.
 
 __Note:__ This property cannot be used in a [style config](mark.html#style-config).
 
-fillOpacity:
-The fill opacity (value between [0,1]).
-
-__Default value:__ `1`
-
 font:
 The typeface to set the text in (e.g., `"Helvetica Neue"`).
 
@@ -1764,8 +1764,8 @@ data TextConfig = TextConfig
     , dxTextConfig :: Maybe Float
     , dyTextConfig :: Maybe Float
     , fillTextConfig :: Maybe Text
-    , filledTextConfig :: Maybe Bool
     , fillOpacityTextConfig :: Maybe Float
+    , filledTextConfig :: Maybe Bool
     , fontTextConfig :: Maybe Text
     , fontSizeTextConfig :: Maybe Float
     , fontStyleTextConfig :: Maybe FontStyle
@@ -2796,6 +2796,11 @@ Default Fill Color.  This has higher precedence than config.color
 
 __Default value:__ (None)
 
+fillOpacity:
+The fill opacity (value between [0,1]).
+
+__Default value:__ `1`
+
 filled:
 Whether the mark's color should be used as fill color instead of stroke color.
 
@@ -2805,11 +2810,6 @@ __Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.
 
 __Note:__ This property cannot be used in a [style config](mark.html#style-config).
 
-fillOpacity:
-The fill opacity (value between [0,1]).
-
-__Default value:__ `1`
-
 font:
 The typeface to set the text in (e.g., `"Helvetica Neue"`).
 
@@ -2929,8 +2929,8 @@ data TickConfig = TickConfig
     , dxTickConfig :: Maybe Float
     , dyTickConfig :: Maybe Float
     , fillTickConfig :: Maybe Text
-    , filledTickConfig :: Maybe Bool
     , fillOpacityTickConfig :: Maybe Float
+    , filledTickConfig :: Maybe Bool
     , fontTickConfig :: Maybe Text
     , fontSizeTickConfig :: Maybe Float
     , fontStyleTickConfig :: Maybe FontStyle
@@ -5024,12 +5024,12 @@ A desired number of ticks, for axes visualizing quantitative scales. The resulti
 may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the
 underlying scale's range.
 
-ticks:
-Boolean value that determines whether the axis should include ticks.
-
 tickSize:
 The size in pixels of axis ticks.
 
+ticks:
+Boolean value that determines whether the axis should include ticks.
+
 title:
 A title for the field. If `null`, the title will be removed.
 
@@ -5078,8 +5078,8 @@ data Axis = Axis
     , orientAxis :: Maybe TitleOrient
     , positionAxis :: Maybe Float
     , tickCountAxis :: Maybe Float
-    , ticksAxis :: Maybe Bool
     , tickSizeAxis :: Maybe Float
+    , ticksAxis :: Maybe Bool
     , titleAxis :: Maybe Text
     , titleMaxLengthAxis :: Maybe Float
     , titlePaddingAxis :: Maybe Float
@@ -5655,6 +5655,11 @@ Default Fill Color.  This has higher precedence than config.color
 
 __Default value:__ (None)
 
+fillOpacity:
+The fill opacity (value between [0,1]).
+
+__Default value:__ `1`
+
 filled:
 Whether the mark's color should be used as fill color instead of stroke color.
 
@@ -5664,11 +5669,6 @@ __Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.
 
 __Note:__ This property cannot be used in a [style config](mark.html#style-config).
 
-fillOpacity:
-The fill opacity (value between [0,1]).
-
-__Default value:__ `1`
-
 font:
 The typeface to set the text in (e.g., `"Helvetica Neue"`).
 
@@ -5801,8 +5801,8 @@ data MarkDef = MarkDef
     , dxMarkDef :: Maybe Float
     , dyMarkDef :: Maybe Float
     , fillMarkDef :: Maybe Text
-    , filledMarkDef :: Maybe Bool
     , fillOpacityMarkDef :: Maybe Float
+    , filledMarkDef :: Maybe Bool
     , fontMarkDef :: Maybe Text
     , fontSizeMarkDef :: Maybe Float
     , fontStyleMarkDef :: Maybe FontStyle
@@ -6421,7 +6421,7 @@ instance FromJSON Config where
         <*> v .:? "view"
 
 instance ToJSON MarkConfig where
-    toJSON (MarkConfig alignMarkConfig angleMarkConfig baselineMarkConfig colorMarkConfig cursorMarkConfig dxMarkConfig dyMarkConfig fillMarkConfig filledMarkConfig fillOpacityMarkConfig fontMarkConfig fontSizeMarkConfig fontStyleMarkConfig fontWeightMarkConfig hrefMarkConfig interpolateMarkConfig limitMarkConfig opacityMarkConfig orientMarkConfig radiusMarkConfig shapeMarkConfig sizeMarkConfig strokeMarkConfig strokeDashMarkConfig strokeDashOffsetMarkConfig strokeOpacityMarkConfig strokeWidthMarkConfig tensionMarkConfig markConfigTextMarkConfig thetaMarkConfig) =
+    toJSON (MarkConfig alignMarkConfig angleMarkConfig baselineMarkConfig colorMarkConfig cursorMarkConfig dxMarkConfig dyMarkConfig fillMarkConfig fillOpacityMarkConfig filledMarkConfig fontMarkConfig fontSizeMarkConfig fontStyleMarkConfig fontWeightMarkConfig hrefMarkConfig interpolateMarkConfig limitMarkConfig opacityMarkConfig orientMarkConfig radiusMarkConfig shapeMarkConfig sizeMarkConfig strokeMarkConfig strokeDashMarkConfig strokeDashOffsetMarkConfig strokeOpacityMarkConfig strokeWidthMarkConfig tensionMarkConfig markConfigTextMarkConfig thetaMarkConfig) =
         object
         [ "align" .= alignMarkConfig
         , "angle" .= angleMarkConfig
@@ -6431,8 +6431,8 @@ instance ToJSON MarkConfig where
         , "dx" .= dxMarkConfig
         , "dy" .= dyMarkConfig
         , "fill" .= fillMarkConfig
-        , "filled" .= filledMarkConfig
         , "fillOpacity" .= fillOpacityMarkConfig
+        , "filled" .= filledMarkConfig
         , "font" .= fontMarkConfig
         , "fontSize" .= fontSizeMarkConfig
         , "fontStyle" .= fontStyleMarkConfig
@@ -6465,8 +6465,8 @@ instance FromJSON MarkConfig where
         <*> v .:? "dx"
         <*> v .:? "dy"
         <*> v .:? "fill"
-        <*> v .:? "filled"
         <*> v .:? "fillOpacity"
+        <*> v .:? "filled"
         <*> v .:? "font"
         <*> v .:? "fontSize"
         <*> v .:? "fontStyle"
@@ -6661,7 +6661,7 @@ instance FromJSON Orient where
             parseText "vertical" = return VerticalOrient
 
 instance ToJSON AxisConfig where
-    toJSON (AxisConfig bandPositionAxisConfig domainAxisConfig domainColorAxisConfig domainWidthAxisConfig gridAxisConfig gridColorAxisConfig gridDashAxisConfig gridOpacityAxisConfig gridWidthAxisConfig labelAngleAxisConfig labelBoundAxisConfig labelColorAxisConfig labelFlushAxisConfig labelFontAxisConfig labelFontSizeAxisConfig labelLimitAxisConfig labelOverlapAxisConfig labelPaddingAxisConfig labelsAxisConfig maxExtentAxisConfig minExtentAxisConfig shortTimeLabelsAxisConfig tickColorAxisConfig tickRoundAxisConfig ticksAxisConfig tickSizeAxisConfig tickWidthAxisConfig titleAlignAxisConfig titleAngleAxisConfig titleBaselineAxisConfig titleColorAxisConfig titleFontAxisConfig titleFontSizeAxisConfig titleFontWeightAxisConfig titleLimitAxisConfig titleMaxLengthAxisConfig titlePaddingAxisConfig titleXAxisConfig titleYAxisConfig) =
+    toJSON (AxisConfig bandPositionAxisConfig domainAxisConfig domainColorAxisConfig domainWidthAxisConfig gridAxisConfig gridColorAxisConfig gridDashAxisConfig gridOpacityAxisConfig gridWidthAxisConfig labelAngleAxisConfig labelBoundAxisConfig labelColorAxisConfig labelFlushAxisConfig labelFontAxisConfig labelFontSizeAxisConfig labelLimitAxisConfig labelOverlapAxisConfig labelPaddingAxisConfig labelsAxisConfig maxExtentAxisConfig minExtentAxisConfig shortTimeLabelsAxisConfig tickColorAxisConfig tickRoundAxisConfig tickSizeAxisConfig tickWidthAxisConfig ticksAxisConfig titleAlignAxisConfig titleAngleAxisConfig titleBaselineAxisConfig titleColorAxisConfig titleFontAxisConfig titleFontSizeAxisConfig titleFontWeightAxisConfig titleLimitAxisConfig titleMaxLengthAxisConfig titlePaddingAxisConfig titleXAxisConfig titleYAxisConfig) =
         object
         [ "bandPosition" .= bandPositionAxisConfig
         , "domain" .= domainAxisConfig
@@ -6687,9 +6687,9 @@ instance ToJSON AxisConfig where
         , "shortTimeLabels" .= shortTimeLabelsAxisConfig
         , "tickColor" .= tickColorAxisConfig
         , "tickRound" .= tickRoundAxisConfig
-        , "ticks" .= ticksAxisConfig
         , "tickSize" .= tickSizeAxisConfig
         , "tickWidth" .= tickWidthAxisConfig
+        , "ticks" .= ticksAxisConfig
         , "titleAlign" .= titleAlignAxisConfig
         , "titleAngle" .= titleAngleAxisConfig
         , "titleBaseline" .= titleBaselineAxisConfig
@@ -6730,9 +6730,9 @@ instance FromJSON AxisConfig where
         <*> v .:? "shortTimeLabels"
         <*> v .:? "tickColor"
         <*> v .:? "tickRound"
-        <*> v .:? "ticks"
         <*> v .:? "tickSize"
         <*> v .:? "tickWidth"
+        <*> v .:? "ticks"
         <*> v .:? "titleAlign"
         <*> v .:? "titleAngle"
         <*> v .:? "titleBaseline"
@@ -6781,7 +6781,7 @@ instance FromJSON TitleFontWeight where
     parseJSON xs@(String _) = (fmap StringInTitleFontWeight . parseJSON) xs
 
 instance ToJSON VGAxisConfig where
-    toJSON (VGAxisConfig bandPositionVGAxisConfig domainVGAxisConfig domainColorVGAxisConfig domainWidthVGAxisConfig gridVGAxisConfig gridColorVGAxisConfig gridDashVGAxisConfig gridOpacityVGAxisConfig gridWidthVGAxisConfig labelAngleVGAxisConfig labelBoundVGAxisConfig labelColorVGAxisConfig labelFlushVGAxisConfig labelFontVGAxisConfig labelFontSizeVGAxisConfig labelLimitVGAxisConfig labelOverlapVGAxisConfig labelPaddingVGAxisConfig labelsVGAxisConfig maxExtentVGAxisConfig minExtentVGAxisConfig tickColorVGAxisConfig tickRoundVGAxisConfig ticksVGAxisConfig tickSizeVGAxisConfig tickWidthVGAxisConfig titleAlignVGAxisConfig titleAngleVGAxisConfig titleBaselineVGAxisConfig titleColorVGAxisConfig titleFontVGAxisConfig titleFontSizeVGAxisConfig titleFontWeightVGAxisConfig titleLimitVGAxisConfig titleMaxLengthVGAxisConfig titlePaddingVGAxisConfig titleXVGAxisConfig titleYVGAxisConfig) =
+    toJSON (VGAxisConfig bandPositionVGAxisConfig domainVGAxisConfig domainColorVGAxisConfig domainWidthVGAxisConfig gridVGAxisConfig gridColorVGAxisConfig gridDashVGAxisConfig gridOpacityVGAxisConfig gridWidthVGAxisConfig labelAngleVGAxisConfig labelBoundVGAxisConfig labelColorVGAxisConfig labelFlushVGAxisConfig labelFontVGAxisConfig labelFontSizeVGAxisConfig labelLimitVGAxisConfig labelOverlapVGAxisConfig labelPaddingVGAxisConfig labelsVGAxisConfig maxExtentVGAxisConfig minExtentVGAxisConfig tickColorVGAxisConfig tickRoundVGAxisConfig tickSizeVGAxisConfig tickWidthVGAxisConfig ticksVGAxisConfig titleAlignVGAxisConfig titleAngleVGAxisConfig titleBaselineVGAxisConfig titleColorVGAxisConfig titleFontVGAxisConfig titleFontSizeVGAxisConfig titleFontWeightVGAxisConfig titleLimitVGAxisConfig titleMaxLengthVGAxisConfig titlePaddingVGAxisConfig titleXVGAxisConfig titleYVGAxisConfig) =
         object
         [ "bandPosition" .= bandPositionVGAxisConfig
         , "domain" .= domainVGAxisConfig
@@ -6806,9 +6806,9 @@ instance ToJSON VGAxisConfig where
         , "minExtent" .= minExtentVGAxisConfig
         , "tickColor" .= tickColorVGAxisConfig
         , "tickRound" .= tickRoundVGAxisConfig
-        , "ticks" .= ticksVGAxisConfig
         , "tickSize" .= tickSizeVGAxisConfig
         , "tickWidth" .= tickWidthVGAxisConfig
+        , "ticks" .= ticksVGAxisConfig
         , "titleAlign" .= titleAlignVGAxisConfig
         , "titleAngle" .= titleAngleVGAxisConfig
         , "titleBaseline" .= titleBaselineVGAxisConfig
@@ -6848,9 +6848,9 @@ instance FromJSON VGAxisConfig where
         <*> v .:? "minExtent"
         <*> v .:? "tickColor"
         <*> v .:? "tickRound"
-        <*> v .:? "ticks"
         <*> v .:? "tickSize"
         <*> v .:? "tickWidth"
+        <*> v .:? "ticks"
         <*> v .:? "titleAlign"
         <*> v .:? "titleAngle"
         <*> v .:? "titleBaseline"
@@ -6865,7 +6865,7 @@ instance FromJSON VGAxisConfig where
         <*> v .:? "titleY"
 
 instance ToJSON BarConfig where
-    toJSON (BarConfig alignBarConfig angleBarConfig baselineBarConfig binSpacingBarConfig colorBarConfig continuousBandSizeBarConfig cursorBarConfig discreteBandSizeBarConfig dxBarConfig dyBarConfig fillBarConfig filledBarConfig fillOpacityBarConfig fontBarConfig fontSizeBarConfig fontStyleBarConfig fontWeightBarConfig hrefBarConfig interpolateBarConfig limitBarConfig opacityBarConfig orientBarConfig radiusBarConfig shapeBarConfig sizeBarConfig strokeBarConfig strokeDashBarConfig strokeDashOffsetBarConfig strokeOpacityBarConfig strokeWidthBarConfig tensionBarConfig barConfigTextBarConfig thetaBarConfig) =
+    toJSON (BarConfig alignBarConfig angleBarConfig baselineBarConfig binSpacingBarConfig colorBarConfig continuousBandSizeBarConfig cursorBarConfig discreteBandSizeBarConfig dxBarConfig dyBarConfig fillBarConfig fillOpacityBarConfig filledBarConfig fontBarConfig fontSizeBarConfig fontStyleBarConfig fontWeightBarConfig hrefBarConfig interpolateBarConfig limitBarConfig opacityBarConfig orientBarConfig radiusBarConfig shapeBarConfig sizeBarConfig strokeBarConfig strokeDashBarConfig strokeDashOffsetBarConfig strokeOpacityBarConfig strokeWidthBarConfig tensionBarConfig barConfigTextBarConfig thetaBarConfig) =
         object
         [ "align" .= alignBarConfig
         , "angle" .= angleBarConfig
@@ -6878,8 +6878,8 @@ instance ToJSON BarConfig where
         , "dx" .= dxBarConfig
         , "dy" .= dyBarConfig
         , "fill" .= fillBarConfig
-        , "filled" .= filledBarConfig
         , "fillOpacity" .= fillOpacityBarConfig
+        , "filled" .= filledBarConfig
         , "font" .= fontBarConfig
         , "fontSize" .= fontSizeBarConfig
         , "fontStyle" .= fontStyleBarConfig
@@ -6915,8 +6915,8 @@ instance FromJSON BarConfig where
         <*> v .:? "dx"
         <*> v .:? "dy"
         <*> v .:? "fill"
-        <*> v .:? "filled"
         <*> v .:? "fillOpacity"
+        <*> v .:? "filled"
         <*> v .:? "font"
         <*> v .:? "fontSize"
         <*> v .:? "fontStyle"
@@ -6939,7 +6939,7 @@ instance FromJSON BarConfig where
         <*> v .:? "theta"
 
 instance ToJSON TextConfig where
-    toJSON (TextConfig alignTextConfig angleTextConfig baselineTextConfig colorTextConfig cursorTextConfig dxTextConfig dyTextConfig fillTextConfig filledTextConfig fillOpacityTextConfig fontTextConfig fontSizeTextConfig fontStyleTextConfig fontWeightTextConfig hrefTextConfig interpolateTextConfig limitTextConfig opacityTextConfig orientTextConfig radiusTextConfig shapeTextConfig shortTimeLabelsTextConfig sizeTextConfig strokeTextConfig strokeDashTextConfig strokeDashOffsetTextConfig strokeOpacityTextConfig strokeWidthTextConfig tensionTextConfig textConfigTextTextConfig thetaTextConfig) =
+    toJSON (TextConfig alignTextConfig angleTextConfig baselineTextConfig colorTextConfig cursorTextConfig dxTextConfig dyTextConfig fillTextConfig fillOpacityTextConfig filledTextConfig fontTextConfig fontSizeTextConfig fontStyleTextConfig fontWeightTextConfig hrefTextConfig interpolateTextConfig limitTextConfig opacityTextConfig orientTextConfig radiusTextConfig shapeTextConfig shortTimeLabelsTextConfig sizeTextConfig strokeTextConfig strokeDashTextConfig strokeDashOffsetTextConfig strokeOpacityTextConfig strokeWidthTextConfig tensionTextConfig textConfigTextTextConfig thetaTextConfig) =
         object
         [ "align" .= alignTextConfig
         , "angle" .= angleTextConfig
@@ -6949,8 +6949,8 @@ instance ToJSON TextConfig where
         , "dx" .= dxTextConfig
         , "dy" .= dyTextConfig
         , "fill" .= fillTextConfig
-        , "filled" .= filledTextConfig
         , "fillOpacity" .= fillOpacityTextConfig
+        , "filled" .= filledTextConfig
         , "font" .= fontTextConfig
         , "fontSize" .= fontSizeTextConfig
         , "fontStyle" .= fontStyleTextConfig
@@ -6984,8 +6984,8 @@ instance FromJSON TextConfig where
         <*> v .:? "dx"
         <*> v .:? "dy"
         <*> v .:? "fill"
-        <*> v .:? "filled"
         <*> v .:? "fillOpacity"
+        <*> v .:? "filled"
         <*> v .:? "font"
         <*> v .:? "fontSize"
         <*> v .:? "fontStyle"
@@ -7565,7 +7565,7 @@ instance FromJSON VGMarkConfig where
         <*> v .:? "theta"
 
 instance ToJSON TickConfig where
-    toJSON (TickConfig alignTickConfig angleTickConfig bandSizeTickConfig baselineTickConfig colorTickConfig cursorTickConfig dxTickConfig dyTickConfig fillTickConfig filledTickConfig fillOpacityTickConfig fontTickConfig fontSizeTickConfig fontStyleTickConfig fontWeightTickConfig hrefTickConfig interpolateTickConfig limitTickConfig opacityTickConfig orientTickConfig radiusTickConfig shapeTickConfig sizeTickConfig strokeTickConfig strokeDashTickConfig strokeDashOffsetTickConfig strokeOpacityTickConfig strokeWidthTickConfig tensionTickConfig tickConfigTextTickConfig thetaTickConfig thicknessTickConfig) =
+    toJSON (TickConfig alignTickConfig angleTickConfig bandSizeTickConfig baselineTickConfig colorTickConfig cursorTickConfig dxTickConfig dyTickConfig fillTickConfig fillOpacityTickConfig filledTickConfig fontTickConfig fontSizeTickConfig fontStyleTickConfig fontWeightTickConfig hrefTickConfig interpolateTickConfig limitTickConfig opacityTickConfig orientTickConfig radiusTickConfig shapeTickConfig sizeTickConfig strokeTickConfig strokeDashTickConfig strokeDashOffsetTickConfig strokeOpacityTickConfig strokeWidthTickConfig tensionTickConfig tickConfigTextTickConfig thetaTickConfig thicknessTickConfig) =
         object
         [ "align" .= alignTickConfig
         , "angle" .= angleTickConfig
@@ -7576,8 +7576,8 @@ instance ToJSON TickConfig where
         , "dx" .= dxTickConfig
         , "dy" .= dyTickConfig
         , "fill" .= fillTickConfig
-        , "filled" .= filledTickConfig
         , "fillOpacity" .= fillOpacityTickConfig
+        , "filled" .= filledTickConfig
         , "font" .= fontTickConfig
         , "fontSize" .= fontSizeTickConfig
         , "fontStyle" .= fontStyleTickConfig
@@ -7612,8 +7612,8 @@ instance FromJSON TickConfig where
         <*> v .:? "dx"
         <*> v .:? "dy"
         <*> v .:? "fill"
-        <*> v .:? "filled"
         <*> v .:? "fillOpacity"
+        <*> v .:? "filled"
         <*> v .:? "font"
         <*> v .:? "fontSize"
         <*> v .:? "fontStyle"
@@ -8707,7 +8707,7 @@ instance FromJSON XClass where
         <*> v .:? "value"
 
 instance ToJSON Axis where
-    toJSON (Axis domainAxis formatAxis gridAxis labelAngleAxis labelBoundAxis labelFlushAxis labelOverlapAxis labelPaddingAxis labelsAxis maxExtentAxis minExtentAxis offsetAxis orientAxis positionAxis tickCountAxis ticksAxis tickSizeAxis titleAxis titleMaxLengthAxis titlePaddingAxis valuesAxis zindexAxis) =
+    toJSON (Axis domainAxis formatAxis gridAxis labelAngleAxis labelBoundAxis labelFlushAxis labelOverlapAxis labelPaddingAxis labelsAxis maxExtentAxis minExtentAxis offsetAxis orientAxis positionAxis tickCountAxis tickSizeAxis ticksAxis titleAxis titleMaxLengthAxis titlePaddingAxis valuesAxis zindexAxis) =
         object
         [ "domain" .= domainAxis
         , "format" .= formatAxis
@@ -8724,8 +8724,8 @@ instance ToJSON Axis where
         , "orient" .= orientAxis
         , "position" .= positionAxis
         , "tickCount" .= tickCountAxis
-        , "ticks" .= ticksAxis
         , "tickSize" .= tickSizeAxis
+        , "ticks" .= ticksAxis
         , "title" .= titleAxis
         , "titleMaxLength" .= titleMaxLengthAxis
         , "titlePadding" .= titlePaddingAxis
@@ -8750,8 +8750,8 @@ instance FromJSON Axis where
         <*> v .:? "orient"
         <*> v .:? "position"
         <*> v .:? "tickCount"
-        <*> v .:? "ticks"
         <*> v .:? "tickSize"
+        <*> v .:? "ticks"
         <*> v .:? "title"
         <*> v .:? "titleMaxLength"
         <*> v .:? "titlePadding"
@@ -9005,7 +9005,7 @@ instance FromJSON AnyMark where
     parseJSON xs@(Object _) = (fmap MarkDefInAnyMark . parseJSON) xs
 
 instance ToJSON MarkDef where
-    toJSON (MarkDef alignMarkDef angleMarkDef baselineMarkDef clipMarkDef colorMarkDef cursorMarkDef dxMarkDef dyMarkDef fillMarkDef filledMarkDef fillOpacityMarkDef fontMarkDef fontSizeMarkDef fontStyleMarkDef fontWeightMarkDef hrefMarkDef interpolateMarkDef limitMarkDef opacityMarkDef orientMarkDef radiusMarkDef shapeMarkDef sizeMarkDef strokeMarkDef strokeDashMarkDef strokeDashOffsetMarkDef strokeOpacityMarkDef strokeWidthMarkDef styleMarkDef tensionMarkDef markDefTextMarkDef thetaMarkDef markDefTypeMarkDef) =
+    toJSON (MarkDef alignMarkDef angleMarkDef baselineMarkDef clipMarkDef colorMarkDef cursorMarkDef dxMarkDef dyMarkDef fillMarkDef fillOpacityMarkDef filledMarkDef fontMarkDef fontSizeMarkDef fontStyleMarkDef fontWeightMarkDef hrefMarkDef interpolateMarkDef limitMarkDef opacityMarkDef orientMarkDef radiusMarkDef shapeMarkDef sizeMarkDef strokeMarkDef strokeDashMarkDef strokeDashOffsetMarkDef strokeOpacityMarkDef strokeWidthMarkDef styleMarkDef tensionMarkDef markDefTextMarkDef thetaMarkDef markDefTypeMarkDef) =
         object
         [ "align" .= alignMarkDef
         , "angle" .= angleMarkDef
@@ -9016,8 +9016,8 @@ instance ToJSON MarkDef where
         , "dx" .= dxMarkDef
         , "dy" .= dyMarkDef
         , "fill" .= fillMarkDef
-        , "filled" .= filledMarkDef
         , "fillOpacity" .= fillOpacityMarkDef
+        , "filled" .= filledMarkDef
         , "font" .= fontMarkDef
         , "fontSize" .= fontSizeMarkDef
         , "fontStyle" .= fontStyleMarkDef
@@ -9053,8 +9053,8 @@ instance FromJSON MarkDef where
         <*> v .:? "dx"
         <*> v .:? "dy"
         <*> v .:? "fill"
-        <*> v .:? "filled"
         <*> v .:? "fillOpacity"
+        <*> v .:? "filled"
         <*> v .:? "font"
         <*> v .:? "fontSize"
         <*> v .:? "fontStyle"
diff --git a/base/schema-java/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java
index e964325..16fb27f 100644
--- a/base/schema-java/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,15 +3,15 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private String barre;
+    private Union unionization;
     private Enum enumerification;
     private String Goo;
-    private Union unionization;
+    private String barre;
 
-    @JsonProperty("bar")
-    public String getBarre() { return barre; }
-    @JsonProperty("bar")
-    public void setBarre(String value) { this.barre = value; }
+    @JsonProperty("union")
+    public Union getUnionization() { return unionization; }
+    @JsonProperty("union")
+    public void setUnionization(Union value) { this.unionization = value; }
 
     @JsonProperty("enum")
     public Enum getEnumerification() { return enumerification; }
@@ -23,8 +23,8 @@ public class TopLevel {
     @JsonProperty("foo")
     public void setGoo(String value) { this.Goo = value; }
 
-    @JsonProperty("union")
-    public Union getUnionization() { return unionization; }
-    @JsonProperty("union")
-    public void setUnionization(Union value) { this.unionization = value; }
+    @JsonProperty("bar")
+    public String getBarre() { return barre; }
+    @JsonProperty("bar")
+    public void setBarre(String value) { this.barre = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java
index a100c1d..acaa89e 100644
--- a/base/schema-java/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.*;
 public class TopLevel {
     private double amount;
     private Frequency frequency;
-    private String description;
     private Type type;
+    private String description;
 
     @JsonProperty("amount")
     public double getAmount() { return amount; }
@@ -18,13 +18,13 @@ public class TopLevel {
     @JsonProperty("frequency")
     public void setFrequency(Frequency value) { this.frequency = value; }
 
-    @JsonProperty("description")
-    public String getDescription() { return description; }
-    @JsonProperty("description")
-    public void setDescription(String value) { this.description = value; }
-
     @JsonProperty("type")
     public Type getType() { return type; }
     @JsonProperty("type")
     public void setType(Type value) { this.type = value; }
+
+    @JsonProperty("description")
+    public String getDescription() { return description; }
+    @JsonProperty("description")
+    public void setDescription(String value) { this.description = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index bb0b0c9..6fd3825 100644
--- a/base/schema-java/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,29 +4,14 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<String> arrNullable;
-    private List<String> arrOne;
-    private String nullable;
     private String one;
     private String optional;
+    private String nullable;
+    private List<String> arrOne;
+    private List<String> arrNullable;
     private UnionWithBool unionWithBool;
     private UnionWithBool unionWithBoolAndEnum;
 
-    @JsonProperty("arrNullable")
-    public List<String> getArrNullable() { return arrNullable; }
-    @JsonProperty("arrNullable")
-    public void setArrNullable(List<String> value) { this.arrNullable = value; }
-
-    @JsonProperty("arrOne")
-    public List<String> getArrOne() { return arrOne; }
-    @JsonProperty("arrOne")
-    public void setArrOne(List<String> value) { this.arrOne = value; }
-
-    @JsonProperty("nullable")
-    public String getNullable() { return nullable; }
-    @JsonProperty("nullable")
-    public void setNullable(String value) { this.nullable = value; }
-
     @JsonProperty("one")
     public String getOne() { return one; }
     @JsonProperty("one")
@@ -37,6 +22,21 @@ public class TopLevel {
     @JsonProperty("optional")
     public void setOptional(String value) { this.optional = value; }
 
+    @JsonProperty("nullable")
+    public String getNullable() { return nullable; }
+    @JsonProperty("nullable")
+    public void setNullable(String value) { this.nullable = value; }
+
+    @JsonProperty("arrOne")
+    public List<String> getArrOne() { return arrOne; }
+    @JsonProperty("arrOne")
+    public void setArrOne(List<String> value) { this.arrOne = value; }
+
+    @JsonProperty("arrNullable")
+    public List<String> getArrNullable() { return arrNullable; }
+    @JsonProperty("arrNullable")
+    public void setArrNullable(List<String> value) { this.arrNullable = value; }
+
     @JsonProperty("unionWithBool")
     public UnionWithBool getUnionWithBool() { return unionWithBool; }
     @JsonProperty("unionWithBool")
diff --git a/base/schema-java/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java
index e11e02a..e5cde4e 100644
--- a/base/schema-java/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,11 +4,16 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
+    private String foo;
     private Object disallowed;
     private List<Object> empty;
-    private String foo;
     private Object impossible;
 
+    @JsonProperty("foo")
+    public String getFoo() { return foo; }
+    @JsonProperty("foo")
+    public void setFoo(String value) { this.foo = value; }
+
     @JsonProperty("disallowed")
     public Object getDisallowed() { return disallowed; }
     @JsonProperty("disallowed")
@@ -19,11 +24,6 @@ public class TopLevel {
     @JsonProperty("empty")
     public void setEmpty(List<Object> value) { this.empty = value; }
 
-    @JsonProperty("foo")
-    public String getFoo() { return foo; }
-    @JsonProperty("foo")
-    public void setFoo(String value) { this.foo = value; }
-
     @JsonProperty("impossible")
     public Object getImpossible() { return impossible; }
     @JsonProperty("impossible")
diff --git a/base/schema-java/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java
index 9b9f456..1da47cb 100644
--- a/base/schema-java/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -17,10 +17,29 @@ import com.fasterxml.jackson.annotation.*;
  * }
  */
 public class TopLevel {
+    private String value;
     private String trailingBackslash;
     private String trailingQuote;
     private String trailingTripleQuote;
-    private String value;
+
+    /**
+     * Property delimiters:
+     * * /
+     * / *
+     * {-
+     * -}
+     * """
+     * </summary> & <br>
+     * }
+     * }
+     * }
+     * }
+     * }
+     */
+    @JsonProperty("value")
+    public String getValue() { return value; }
+    @JsonProperty("value")
+    public void setValue(String value) { this.value = value; }
 
     /**
      * Ends with a backslash \
@@ -45,23 +64,4 @@ public class TopLevel {
     public String getTrailingTripleQuote() { return trailingTripleQuote; }
     @JsonProperty("trailingTripleQuote")
     public void setTrailingTripleQuote(String value) { this.trailingTripleQuote = value; }
-
-    /**
-     * Property delimiters:
-     * * /
-     * / *
-     * {-
-     * -}
-     * """
-     * </summary> & <br>
-     * }
-     * }
-     * }
-     * }
-     * }
-     */
-    @JsonProperty("value")
-    public String getValue() { return value; }
-    @JsonProperty("value")
-    public void setValue(String value) { this.value = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index 286c4b6..d5bd9c5 100644
--- a/base/schema-java/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,17 +3,27 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private double version;
     private long amount;
+    private double ratio;
     private boolean enabled;
     private Kind kind;
-    private double ratio;
-    private double version;
+
+    @JsonProperty("version")
+    public double getVersion() { return version; }
+    @JsonProperty("version")
+    public void setVersion(double value) { this.version = value; }
 
     @JsonProperty("amount")
     public long getAmount() { return amount; }
     @JsonProperty("amount")
     public void setAmount(long value) { this.amount = value; }
 
+    @JsonProperty("ratio")
+    public double getRatio() { return ratio; }
+    @JsonProperty("ratio")
+    public void setRatio(double value) { this.ratio = value; }
+
     @JsonProperty("enabled")
     public boolean getEnabled() { return enabled; }
     @JsonProperty("enabled")
@@ -23,14 +33,4 @@ public class TopLevel {
     public Kind getKind() { return kind; }
     @JsonProperty("kind")
     public void setKind(Kind value) { this.kind = value; }
-
-    @JsonProperty("ratio")
-    public double getRatio() { return ratio; }
-    @JsonProperty("ratio")
-    public void setRatio(double value) { this.ratio = value; }
-
-    @JsonProperty("version")
-    public double getVersion() { return version; }
-    @JsonProperty("version")
-    public void setVersion(double value) { this.version = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index 618acb2..c6853b6 100644
--- a/base/schema-java/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,16 +4,16 @@ import com.fasterxml.jackson.annotation.*;
 import java.time.OffsetDateTime;
 
 public class TopLevel {
-    private BarUnion bar;
     private String foo;
-
-    @JsonProperty("bar")
-    public BarUnion getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(BarUnion value) { this.bar = value; }
+    private BarUnion bar;
 
     @JsonProperty("foo")
     public String getFoo() { return foo; }
     @JsonProperty("foo")
     public void setFoo(String value) { this.foo = value; }
+
+    @JsonProperty("bar")
+    public BarUnion getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(BarUnion value) { this.bar = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/date-time.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
index 1d752f9..9016ac2 100644
--- a/base/schema-java/test/inputs/schema/date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -7,34 +7,34 @@ import java.time.OffsetTime;
 import java.util.List;
 
 public class TopLevel {
-    private List<ComplexUnionArrayElement> complexUnionArray;
     private LocalDate date;
-    private OffsetDateTime dateTime;
     private OffsetTime time;
+    private OffsetDateTime dateTime;
     private List<UnionArray> unionArray;
-
-    @JsonProperty("complex-union-array")
-    public List<ComplexUnionArrayElement> getComplexUnionArray() { return complexUnionArray; }
-    @JsonProperty("complex-union-array")
-    public void setComplexUnionArray(List<ComplexUnionArrayElement> value) { this.complexUnionArray = value; }
+    private List<ComplexUnionArrayElement> complexUnionArray;
 
     @JsonProperty("date")
     public LocalDate getDate() { return date; }
     @JsonProperty("date")
     public void setDate(LocalDate value) { this.date = value; }
 
-    @JsonProperty("date-time")
-    public OffsetDateTime getDateTime() { return dateTime; }
-    @JsonProperty("date-time")
-    public void setDateTime(OffsetDateTime value) { this.dateTime = value; }
-
     @JsonProperty("time")
     public OffsetTime getTime() { return time; }
     @JsonProperty("time")
     public void setTime(OffsetTime value) { this.time = value; }
 
+    @JsonProperty("date-time")
+    public OffsetDateTime getDateTime() { return dateTime; }
+    @JsonProperty("date-time")
+    public void setDateTime(OffsetDateTime value) { this.dateTime = value; }
+
     @JsonProperty("union-array")
     public List<UnionArray> getUnionArray() { return unionArray; }
     @JsonProperty("union-array")
     public void setUnionArray(List<UnionArray> value) { this.unionArray = value; }
+
+    @JsonProperty("complex-union-array")
+    public List<ComplexUnionArrayElement> getComplexUnionArray() { return complexUnionArray; }
+    @JsonProperty("complex-union-array")
+    public void setComplexUnionArray(List<ComplexUnionArrayElement> value) { this.complexUnionArray = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java
index 0a86d38..e7d550d 100644
--- a/base/schema-java/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -7,19 +7,19 @@ import com.fasterxml.jackson.annotation.*;
  * Its description has two lines.
  */
 public class TopLevel {
-    private Boolean bar;
+    private Union union;
     private Enum topLevelEnum;
     private Double foo;
+    private Boolean bar;
     private ObjectOrStringUnion objectOrString;
-    private Union union;
 
     /**
-     * A pretty boolean
+     * Either a number or a string
      */
-    @JsonProperty("bar")
-    public Boolean getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(Boolean value) { this.bar = value; }
+    @JsonProperty("union")
+    public Union getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(Union value) { this.union = value; }
 
     /**
      * An enumeration
@@ -34,16 +34,16 @@ public class TopLevel {
     @JsonProperty("foo")
     public void setFoo(Double value) { this.foo = value; }
 
+    /**
+     * A pretty boolean
+     */
+    @JsonProperty("bar")
+    public Boolean getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(Boolean value) { this.bar = value; }
+
     @JsonProperty("object-or-string")
     public ObjectOrStringUnion getObjectOrString() { return objectOrString; }
     @JsonProperty("object-or-string")
     public void setObjectOrString(ObjectOrStringUnion value) { this.objectOrString = value; }
-
-    /**
-     * Either a number or a string
-     */
-    @JsonProperty("union")
-    public Union getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(Union value) { this.union = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java b/head/schema-java/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java
index dedc5c4..c0851ed 100644
--- a/base/schema-java/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java
+++ b/head/schema-java/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java
@@ -5,16 +5,16 @@ import java.util.List;
 import java.util.Map;
 
 public class Thing {
-    private Anything optional;
     private Anything required;
-
-    @JsonProperty("optional")
-    public Anything getOptional() { return optional; }
-    @JsonProperty("optional")
-    public void setOptional(Anything value) { this.optional = value; }
+    private Anything optional;
 
     @JsonProperty("required")
     public Anything getRequired() { return required; }
     @JsonProperty("required")
     public void setRequired(Anything value) { this.required = value; }
+
+    @JsonProperty("optional")
+    public Anything getOptional() { return optional; }
+    @JsonProperty("optional")
+    public void setOptional(Anything value) { this.optional = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java
index b073986..119e7f4 100644
--- a/base/schema-java/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,34 +4,34 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<Arr> arr;
-    private String topLevelFor;
-    private Gve gve;
     private Lvc lvc;
+    private Gve gve;
+    private List<Arr> arr;
     private List<OtherArr> otherArr;
+    private String topLevelFor;
 
-    @JsonProperty("arr")
-    public List<Arr> getArr() { return arr; }
-    @JsonProperty("arr")
-    public void setArr(List<Arr> value) { this.arr = value; }
-
-    @JsonProperty("for")
-    public String getTopLevelFor() { return topLevelFor; }
-    @JsonProperty("for")
-    public void setTopLevelFor(String value) { this.topLevelFor = value; }
+    @JsonProperty("lvc")
+    public Lvc getLvc() { return lvc; }
+    @JsonProperty("lvc")
+    public void setLvc(Lvc value) { this.lvc = value; }
 
     @JsonProperty("gve")
     public Gve getGve() { return gve; }
     @JsonProperty("gve")
     public void setGve(Gve value) { this.gve = value; }
 
-    @JsonProperty("lvc")
-    public Lvc getLvc() { return lvc; }
-    @JsonProperty("lvc")
-    public void setLvc(Lvc value) { this.lvc = value; }
+    @JsonProperty("arr")
+    public List<Arr> getArr() { return arr; }
+    @JsonProperty("arr")
+    public void setArr(List<Arr> value) { this.arr = value; }
 
     @JsonProperty("otherArr")
     public List<OtherArr> getOtherArr() { return otherArr; }
     @JsonProperty("otherArr")
     public void setOtherArr(List<OtherArr> value) { this.otherArr = value; }
+
+    @JsonProperty("for")
+    public String getTopLevelFor() { return topLevelFor; }
+    @JsonProperty("for")
+    public void setTopLevelFor(String value) { this.topLevelFor = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index 7408fbd..f5cbec8 100644
--- a/base/schema-java/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,29 +4,14 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<String> arrNullable;
-    private List<String> arrOne;
-    private String nullable;
     private String one;
     private String optional;
+    private String nullable;
+    private List<String> arrOne;
+    private List<String> arrNullable;
     private UnionWithInt unionWithInt;
     private UnionWithInt unionWithIntAndEnum;
 
-    @JsonProperty("arrNullable")
-    public List<String> getArrNullable() { return arrNullable; }
-    @JsonProperty("arrNullable")
-    public void setArrNullable(List<String> value) { this.arrNullable = value; }
-
-    @JsonProperty("arrOne")
-    public List<String> getArrOne() { return arrOne; }
-    @JsonProperty("arrOne")
-    public void setArrOne(List<String> value) { this.arrOne = value; }
-
-    @JsonProperty("nullable")
-    public String getNullable() { return nullable; }
-    @JsonProperty("nullable")
-    public void setNullable(String value) { this.nullable = value; }
-
     @JsonProperty("one")
     public String getOne() { return one; }
     @JsonProperty("one")
@@ -37,6 +22,21 @@ public class TopLevel {
     @JsonProperty("optional")
     public void setOptional(String value) { this.optional = value; }
 
+    @JsonProperty("nullable")
+    public String getNullable() { return nullable; }
+    @JsonProperty("nullable")
+    public void setNullable(String value) { this.nullable = value; }
+
+    @JsonProperty("arrOne")
+    public List<String> getArrOne() { return arrOne; }
+    @JsonProperty("arrOne")
+    public void setArrOne(List<String> value) { this.arrOne = value; }
+
+    @JsonProperty("arrNullable")
+    public List<String> getArrNullable() { return arrNullable; }
+    @JsonProperty("arrNullable")
+    public void setArrNullable(List<String> value) { this.arrNullable = value; }
+
     @JsonProperty("unionWithInt")
     public UnionWithInt getUnionWithInt() { return unionWithInt; }
     @JsonProperty("unionWithInt")
diff --git a/base/schema-java/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java
index 94b3a3c..14c03b4 100644
--- a/base/schema-java/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,15 +3,30 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private long smallPositive;
+    private long smallNegative;
+    private long i32Range;
     private long aboveI32Max;
     private long belowI32Min;
-    private long i32Range;
-    private long largeBounds;
-    private long onlyMaximum;
     private long onlyMinimum;
-    private long smallNegative;
-    private long smallPositive;
+    private long onlyMaximum;
     private long unbounded;
+    private long largeBounds;
+
+    @JsonProperty("small_positive")
+    public long getSmallPositive() { return smallPositive; }
+    @JsonProperty("small_positive")
+    public void setSmallPositive(long value) { this.smallPositive = value; }
+
+    @JsonProperty("small_negative")
+    public long getSmallNegative() { return smallNegative; }
+    @JsonProperty("small_negative")
+    public void setSmallNegative(long value) { this.smallNegative = value; }
+
+    @JsonProperty("i32_range")
+    public long getI32Range() { return i32Range; }
+    @JsonProperty("i32_range")
+    public void setI32Range(long value) { this.i32Range = value; }
 
     @JsonProperty("above_i32_max")
     public long getAboveI32Max() { return aboveI32Max; }
@@ -23,38 +38,23 @@ public class TopLevel {
     @JsonProperty("below_i32_min")
     public void setBelowI32Min(long value) { this.belowI32Min = value; }
 
-    @JsonProperty("i32_range")
-    public long getI32Range() { return i32Range; }
-    @JsonProperty("i32_range")
-    public void setI32Range(long value) { this.i32Range = value; }
-
-    @JsonProperty("large_bounds")
-    public long getLargeBounds() { return largeBounds; }
-    @JsonProperty("large_bounds")
-    public void setLargeBounds(long value) { this.largeBounds = value; }
-
-    @JsonProperty("only_maximum")
-    public long getOnlyMaximum() { return onlyMaximum; }
-    @JsonProperty("only_maximum")
-    public void setOnlyMaximum(long value) { this.onlyMaximum = value; }
-
     @JsonProperty("only_minimum")
     public long getOnlyMinimum() { return onlyMinimum; }
     @JsonProperty("only_minimum")
     public void setOnlyMinimum(long value) { this.onlyMinimum = value; }
 
-    @JsonProperty("small_negative")
-    public long getSmallNegative() { return smallNegative; }
-    @JsonProperty("small_negative")
-    public void setSmallNegative(long value) { this.smallNegative = value; }
-
-    @JsonProperty("small_positive")
-    public long getSmallPositive() { return smallPositive; }
-    @JsonProperty("small_positive")
-    public void setSmallPositive(long value) { this.smallPositive = value; }
+    @JsonProperty("only_maximum")
+    public long getOnlyMaximum() { return onlyMaximum; }
+    @JsonProperty("only_maximum")
+    public void setOnlyMaximum(long value) { this.onlyMaximum = value; }
 
     @JsonProperty("unbounded")
     public long getUnbounded() { return unbounded; }
     @JsonProperty("unbounded")
     public void setUnbounded(long value) { this.unbounded = value; }
+
+    @JsonProperty("large_bounds")
+    public long getLargeBounds() { return largeBounds; }
+    @JsonProperty("large_bounds")
+    public void setLargeBounds(long value) { this.largeBounds = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java b/head/schema-java/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java
index ed0c517..a754624 100644
--- a/base/schema-java/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java
+++ b/head/schema-java/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java
@@ -3,20 +3,20 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class LightParams {
-    private String appID;
     private String outletID;
+    private String appID;
     private String rgba;
 
-    @JsonProperty("app_id")
-    public String getAppID() { return appID; }
-    @JsonProperty("app_id")
-    public void setAppID(String value) { this.appID = value; }
-
     @JsonProperty("outlet_id")
     public String getOutletID() { return outletID; }
     @JsonProperty("outlet_id")
     public void setOutletID(String value) { this.outletID = value; }
 
+    @JsonProperty("app_id")
+    public String getAppID() { return appID; }
+    @JsonProperty("app_id")
+    public void setAppID(String value) { this.appID = value; }
+
     @JsonProperty("rgba")
     public String getRGBA() { return rgba; }
     @JsonProperty("rgba")
diff --git a/base/schema-java/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java
index b9845d1..dca4117 100644
--- a/base/schema-java/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,12 +4,17 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
+    private List<String> minOnly;
     private List<Long> maxOnly;
     private List<Double> minAndMax;
-    private List<String> minOnly;
     private List<String> plain;
     private List<UnionItem> unionItems;
 
+    @JsonProperty("minOnly")
+    public List<String> getMinOnly() { return minOnly; }
+    @JsonProperty("minOnly")
+    public void setMinOnly(List<String> value) { this.minOnly = value; }
+
     @JsonProperty("maxOnly")
     public List<Long> getMaxOnly() { return maxOnly; }
     @JsonProperty("maxOnly")
@@ -20,11 +25,6 @@ public class TopLevel {
     @JsonProperty("minAndMax")
     public void setMinAndMax(List<Double> value) { this.minAndMax = value; }
 
-    @JsonProperty("minOnly")
-    public List<String> getMinOnly() { return minOnly; }
-    @JsonProperty("minOnly")
-    public void setMinOnly(List<String> value) { this.minOnly = value; }
-
     @JsonProperty("plain")
     public List<String> getPlain() { return plain; }
     @JsonProperty("plain")
diff --git a/base/schema-java/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java
index c415d2f..01c0db8 100644
--- a/base/schema-java/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,51 +4,51 @@ import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
     private long free;
-    private long intersection;
-    private long max;
     private long min;
+    private long max;
     private long minmax;
-    private long minMaxIntersection;
-    private long minMaxUnion;
     private long union;
+    private long minMaxUnion;
+    private long intersection;
+    private long minMaxIntersection;
 
     @JsonProperty("free")
     public long getFree() { return free; }
     @JsonProperty("free")
     public void setFree(long value) { this.free = value; }
 
-    @JsonProperty("intersection")
-    public long getIntersection() { return intersection; }
-    @JsonProperty("intersection")
-    public void setIntersection(long value) { this.intersection = value; }
+    @JsonProperty("min")
+    public long getMin() { return min; }
+    @JsonProperty("min")
+    public void setMin(long value) { this.min = value; }
 
     @JsonProperty("max")
     public long getMax() { return max; }
     @JsonProperty("max")
     public void setMax(long value) { this.max = value; }
 
-    @JsonProperty("min")
-    public long getMin() { return min; }
-    @JsonProperty("min")
-    public void setMin(long value) { this.min = value; }
-
     @JsonProperty("minmax")
     public long getMinmax() { return minmax; }
     @JsonProperty("minmax")
     public void setMinmax(long value) { this.minmax = value; }
 
-    @JsonProperty("minMaxIntersection")
-    public long getMinMaxIntersection() { return minMaxIntersection; }
-    @JsonProperty("minMaxIntersection")
-    public void setMinMaxIntersection(long value) { this.minMaxIntersection = value; }
+    @JsonProperty("union")
+    public long getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(long value) { this.union = value; }
 
     @JsonProperty("minMaxUnion")
     public long getMinMaxUnion() { return minMaxUnion; }
     @JsonProperty("minMaxUnion")
     public void setMinMaxUnion(long value) { this.minMaxUnion = value; }
 
-    @JsonProperty("union")
-    public long getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(long value) { this.union = value; }
+    @JsonProperty("intersection")
+    public long getIntersection() { return intersection; }
+    @JsonProperty("intersection")
+    public void setIntersection(long value) { this.intersection = value; }
+
+    @JsonProperty("minMaxIntersection")
+    public long getMinMaxIntersection() { return minMaxIntersection; }
+    @JsonProperty("minMaxIntersection")
+    public void setMinMaxIntersection(long value) { this.minMaxIntersection = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java
index 7a80941..d85c4fe 100644
--- a/base/schema-java/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,51 +4,51 @@ import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
     private double free;
-    private double intersection;
-    private double max;
     private double min;
+    private double max;
     private double minmax;
-    private double minMaxIntersection;
-    private double minMaxUnion;
     private double union;
+    private double minMaxUnion;
+    private double intersection;
+    private double minMaxIntersection;
 
     @JsonProperty("free")
     public double getFree() { return free; }
     @JsonProperty("free")
     public void setFree(double value) { this.free = value; }
 
-    @JsonProperty("intersection")
-    public double getIntersection() { return intersection; }
-    @JsonProperty("intersection")
-    public void setIntersection(double value) { this.intersection = value; }
+    @JsonProperty("min")
+    public double getMin() { return min; }
+    @JsonProperty("min")
+    public void setMin(double value) { this.min = value; }
 
     @JsonProperty("max")
     public double getMax() { return max; }
     @JsonProperty("max")
     public void setMax(double value) { this.max = value; }
 
-    @JsonProperty("min")
-    public double getMin() { return min; }
-    @JsonProperty("min")
-    public void setMin(double value) { this.min = value; }
-
     @JsonProperty("minmax")
     public double getMinmax() { return minmax; }
     @JsonProperty("minmax")
     public void setMinmax(double value) { this.minmax = value; }
 
-    @JsonProperty("minMaxIntersection")
-    public double getMinMaxIntersection() { return minMaxIntersection; }
-    @JsonProperty("minMaxIntersection")
-    public void setMinMaxIntersection(double value) { this.minMaxIntersection = value; }
+    @JsonProperty("union")
+    public double getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(double value) { this.union = value; }
 
     @JsonProperty("minMaxUnion")
     public double getMinMaxUnion() { return minMaxUnion; }
     @JsonProperty("minMaxUnion")
     public void setMinMaxUnion(double value) { this.minMaxUnion = value; }
 
-    @JsonProperty("union")
-    public double getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(double value) { this.union = value; }
+    @JsonProperty("intersection")
+    public double getIntersection() { return intersection; }
+    @JsonProperty("intersection")
+    public void setIntersection(double value) { this.intersection = value; }
+
+    @JsonProperty("minMaxIntersection")
+    public double getMinMaxIntersection() { return minMaxIntersection; }
+    @JsonProperty("minMaxIntersection")
+    public void setMinMaxIntersection(double value) { this.minMaxIntersection = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
index 98d223e..bc5e348 100644
--- a/base/schema-java/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,52 +3,52 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private String intersection;
-    private InUnion inUnion;
-    private String maxlength;
     private String minlength;
-    private String minMaxIntersection;
+    private String maxlength;
     private String minmaxlength;
-    private String minMaxUnion;
     private String union;
-
-    @JsonProperty("intersection")
-    public String getIntersection() { return intersection; }
-    @JsonProperty("intersection")
-    public void setIntersection(String value) { this.intersection = value; }
-
-    @JsonProperty("inUnion")
-    public InUnion getInUnion() { return inUnion; }
-    @JsonProperty("inUnion")
-    public void setInUnion(InUnion value) { this.inUnion = value; }
-
-    @JsonProperty("maxlength")
-    public String getMaxlength() { return maxlength; }
-    @JsonProperty("maxlength")
-    public void setMaxlength(String value) { this.maxlength = value; }
+    private InUnion inUnion;
+    private String minMaxUnion;
+    private String intersection;
+    private String minMaxIntersection;
 
     @JsonProperty("minlength")
     public String getMinlength() { return minlength; }
     @JsonProperty("minlength")
     public void setMinlength(String value) { this.minlength = value; }
 
-    @JsonProperty("minMaxIntersection")
-    public String getMinMaxIntersection() { return minMaxIntersection; }
-    @JsonProperty("minMaxIntersection")
-    public void setMinMaxIntersection(String value) { this.minMaxIntersection = value; }
+    @JsonProperty("maxlength")
+    public String getMaxlength() { return maxlength; }
+    @JsonProperty("maxlength")
+    public void setMaxlength(String value) { this.maxlength = value; }
 
     @JsonProperty("minmaxlength")
     public String getMinmaxlength() { return minmaxlength; }
     @JsonProperty("minmaxlength")
     public void setMinmaxlength(String value) { this.minmaxlength = value; }
 
+    @JsonProperty("union")
+    public String getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(String value) { this.union = value; }
+
+    @JsonProperty("inUnion")
+    public InUnion getInUnion() { return inUnion; }
+    @JsonProperty("inUnion")
+    public void setInUnion(InUnion value) { this.inUnion = value; }
+
     @JsonProperty("minMaxUnion")
     public String getMinMaxUnion() { return minMaxUnion; }
     @JsonProperty("minMaxUnion")
     public void setMinMaxUnion(String value) { this.minMaxUnion = value; }
 
-    @JsonProperty("union")
-    public String getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(String value) { this.union = value; }
+    @JsonProperty("intersection")
+    public String getIntersection() { return intersection; }
+    @JsonProperty("intersection")
+    public void setIntersection(String value) { this.intersection = value; }
+
+    @JsonProperty("minMaxIntersection")
+    public String getMinMaxIntersection() { return minMaxIntersection; }
+    @JsonProperty("minMaxIntersection")
+    public void setMinMaxIntersection(String value) { this.minMaxIntersection = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
index 54a446b..57943c4 100644
--- a/base/schema-java/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,20 +3,20 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private long bar;
     private long foo;
+    private long bar;
     private boolean quux;
 
-    @JsonProperty("bar")
-    public long getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(long value) { this.bar = value; }
-
     @JsonProperty("foo")
     public long getFoo() { return foo; }
     @JsonProperty("foo")
     public void setFoo(long value) { this.foo = value; }
 
+    @JsonProperty("bar")
+    public long getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(long value) { this.bar = value; }
+
     @JsonProperty("quux")
     public boolean getQuux() { return quux; }
     @JsonProperty("quux")
diff --git a/base/schema-java/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java
index fbcc9c9..1ed4acb 100644
--- a/base/schema-java/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private String b;
     private Kind kind;
-
-    @JsonProperty("b")
-    public String getB() { return b; }
-    @JsonProperty("b")
-    public void setB(String value) { this.b = value; }
+    private String b;
 
     @JsonProperty("kind")
     public Kind getKind() { return kind; }
     @JsonProperty("kind")
     public void setKind(Kind value) { this.kind = value; }
+
+    @JsonProperty("b")
+    public String getB() { return b; }
+    @JsonProperty("b")
+    public void setB(String value) { this.b = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java
index 3a7506d..281518a 100644
--- a/base/schema-java/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private boolean bar;
     private Object foo;
-
-    @JsonProperty("bar")
-    public boolean getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(boolean value) { this.bar = value; }
+    private boolean bar;
 
     @JsonProperty("foo")
     public Object getFoo() { return foo; }
     @JsonProperty("foo")
     public void setFoo(Object value) { this.foo = value; }
+
+    @JsonProperty("bar")
+    public boolean getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(boolean value) { this.bar = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
index e75b053..00c67a5 100644
--- a/base/schema-java/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -5,45 +5,45 @@ import java.util.List;
 
 public class TopLevel {
     private List<Coordinate> coordinates;
-    private Long count;
-    private String label;
     private List<Coordinate> requiredCoordinates;
+    private Long count;
     private long requiredCount;
-    private String requiredLabel;
     private Double weight;
+    private String label;
+    private String requiredLabel;
 
     @JsonProperty("coordinates")
     public List<Coordinate> getCoordinates() { return coordinates; }
     @JsonProperty("coordinates")
     public void setCoordinates(List<Coordinate> value) { this.coordinates = value; }
 
-    @JsonProperty("count")
-    public Long getCount() { return count; }
-    @JsonProperty("count")
-    public void setCount(Long value) { this.count = value; }
-
-    @JsonProperty("label")
-    public String getLabel() { return label; }
-    @JsonProperty("label")
-    public void setLabel(String value) { this.label = value; }
-
     @JsonProperty("requiredCoordinates")
     public List<Coordinate> getRequiredCoordinates() { return requiredCoordinates; }
     @JsonProperty("requiredCoordinates")
     public void setRequiredCoordinates(List<Coordinate> value) { this.requiredCoordinates = value; }
 
+    @JsonProperty("count")
+    public Long getCount() { return count; }
+    @JsonProperty("count")
+    public void setCount(Long value) { this.count = value; }
+
     @JsonProperty("requiredCount")
     public long getRequiredCount() { return requiredCount; }
     @JsonProperty("requiredCount")
     public void setRequiredCount(long value) { this.requiredCount = value; }
 
-    @JsonProperty("requiredLabel")
-    public String getRequiredLabel() { return requiredLabel; }
-    @JsonProperty("requiredLabel")
-    public void setRequiredLabel(String value) { this.requiredLabel = value; }
-
     @JsonProperty("weight")
     public Double getWeight() { return weight; }
     @JsonProperty("weight")
     public void setWeight(Double value) { this.weight = value; }
+
+    @JsonProperty("label")
+    public String getLabel() { return label; }
+    @JsonProperty("label")
+    public void setLabel(String value) { this.label = value; }
+
+    @JsonProperty("requiredLabel")
+    public String getRequiredLabel() { return requiredLabel; }
+    @JsonProperty("requiredLabel")
+    public void setRequiredLabel(String value) { this.requiredLabel = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java
index ff87686..51f7e05 100644
--- a/base/schema-java/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,34 +3,34 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private Double optDouble;
+    private long reqZeroMin;
     private Long optInt;
-    private String optPattern;
+    private Double optDouble;
     private String optString;
-    private long reqZeroMin;
+    private String optPattern;
 
-    @JsonProperty("optDouble")
-    public Double getOptDouble() { return optDouble; }
-    @JsonProperty("optDouble")
-    public void setOptDouble(Double value) { this.optDouble = value; }
+    @JsonProperty("reqZeroMin")
+    public long getReqZeroMin() { return reqZeroMin; }
+    @JsonProperty("reqZeroMin")
+    public void setReqZeroMin(long value) { this.reqZeroMin = value; }
 
     @JsonProperty("optInt")
     public Long getOptInt() { return optInt; }
     @JsonProperty("optInt")
     public void setOptInt(Long value) { this.optInt = value; }
 
-    @JsonProperty("optPattern")
-    public String getOptPattern() { return optPattern; }
-    @JsonProperty("optPattern")
-    public void setOptPattern(String value) { this.optPattern = value; }
+    @JsonProperty("optDouble")
+    public Double getOptDouble() { return optDouble; }
+    @JsonProperty("optDouble")
+    public void setOptDouble(Double value) { this.optDouble = value; }
 
     @JsonProperty("optString")
     public String getOptString() { return optString; }
     @JsonProperty("optString")
     public void setOptString(String value) { this.optString = value; }
 
-    @JsonProperty("reqZeroMin")
-    public long getReqZeroMin() { return reqZeroMin; }
-    @JsonProperty("reqZeroMin")
-    public void setReqZeroMin(long value) { this.reqZeroMin = value; }
+    @JsonProperty("optPattern")
+    public String getOptPattern() { return optPattern; }
+    @JsonProperty("optPattern")
+    public void setOptPattern(String value) { this.optPattern = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
index 03cc470..1fc65ac 100644
--- a/base/schema-java/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -6,40 +6,40 @@ import java.time.OffsetDateTime;
 import java.time.OffsetTime;
 
 public class TopLevel {
-    private LocalDate optionalDate;
-    private OffsetDateTime optionalDateTime;
-    private OffsetTime optionalTime;
     private LocalDate requiredDate;
-    private OffsetDateTime requiredDateTime;
     private OffsetTime requiredTime;
-
-    @JsonProperty("optional-date")
-    public LocalDate getOptionalDate() { return optionalDate; }
-    @JsonProperty("optional-date")
-    public void setOptionalDate(LocalDate value) { this.optionalDate = value; }
-
-    @JsonProperty("optional-date-time")
-    public OffsetDateTime getOptionalDateTime() { return optionalDateTime; }
-    @JsonProperty("optional-date-time")
-    public void setOptionalDateTime(OffsetDateTime value) { this.optionalDateTime = value; }
-
-    @JsonProperty("optional-time")
-    public OffsetTime getOptionalTime() { return optionalTime; }
-    @JsonProperty("optional-time")
-    public void setOptionalTime(OffsetTime value) { this.optionalTime = value; }
+    private OffsetDateTime requiredDateTime;
+    private LocalDate optionalDate;
+    private OffsetTime optionalTime;
+    private OffsetDateTime optionalDateTime;
 
     @JsonProperty("required-date")
     public LocalDate getRequiredDate() { return requiredDate; }
     @JsonProperty("required-date")
     public void setRequiredDate(LocalDate value) { this.requiredDate = value; }
 
+    @JsonProperty("required-time")
+    public OffsetTime getRequiredTime() { return requiredTime; }
+    @JsonProperty("required-time")
+    public void setRequiredTime(OffsetTime value) { this.requiredTime = value; }
+
     @JsonProperty("required-date-time")
     public OffsetDateTime getRequiredDateTime() { return requiredDateTime; }
     @JsonProperty("required-date-time")
     public void setRequiredDateTime(OffsetDateTime value) { this.requiredDateTime = value; }
 
-    @JsonProperty("required-time")
-    public OffsetTime getRequiredTime() { return requiredTime; }
-    @JsonProperty("required-time")
-    public void setRequiredTime(OffsetTime value) { this.requiredTime = value; }
+    @JsonProperty("optional-date")
+    public LocalDate getOptionalDate() { return optionalDate; }
+    @JsonProperty("optional-date")
+    public void setOptionalDate(LocalDate value) { this.optionalDate = value; }
+
+    @JsonProperty("optional-time")
+    public OffsetTime getOptionalTime() { return optionalTime; }
+    @JsonProperty("optional-time")
+    public void setOptionalTime(OffsetTime value) { this.optionalTime = value; }
+
+    @JsonProperty("optional-date-time")
+    public OffsetDateTime getOptionalDateTime() { return optionalDateTime; }
+    @JsonProperty("optional-date-time")
+    public void setOptionalDateTime(OffsetDateTime value) { this.optionalDateTime = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java
index c45ac58..742abe3 100644
--- a/base/schema-java/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,16 +4,16 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<Open> open;
     private List<Open> tuple;
-
-    @JsonProperty("open")
-    public List<Open> getOpen() { return open; }
-    @JsonProperty("open")
-    public void setOpen(List<Open> value) { this.open = value; }
+    private List<Open> open;
 
     @JsonProperty("tuple")
     public List<Open> getTuple() { return tuple; }
     @JsonProperty("tuple")
     public void setTuple(List<Open> value) { this.tuple = value; }
+
+    @JsonProperty("open")
+    public List<Open> getOpen() { return open; }
+    @JsonProperty("open")
+    public void setOpen(List<Open> value) { this.open = value; }
 }
diff --git a/head/schema-java/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Converter.java b/head/schema-java/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Converter.java
new file mode 100644
index 0000000..a8eb236
--- /dev/null
+++ b/head/schema-java/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Converter.java
@@ -0,0 +1,101 @@
+// To use this code, add the following Maven dependency to your project:
+//
+//
+//     com.fasterxml.jackson.core     : jackson-databind          : 2.9.0
+//     com.fasterxml.jackson.datatype : jackson-datatype-jsr310   : 2.9.0
+//
+// Import this package:
+//
+//     import io.quicktype.Converter;
+//
+// Then you can deserialize a JSON string with
+//
+//     TopLevel data = Converter.fromJsonString(jsonString);
+
+package io.quicktype;
+
+import java.io.IOException;
+import com.fasterxml.jackson.databind.*;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.util.*;
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.temporal.ChronoField;
+
+public class Converter {
+    // Date-time helpers
+
+    private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()
+            .appendOptional(DateTimeFormatter.ISO_DATE_TIME)
+            .appendOptional(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
+            .appendOptional(DateTimeFormatter.ISO_INSTANT)
+            .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SX"))
+            .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssX"))
+            .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
+            .toFormatter()
+            .withZone(ZoneOffset.UTC);
+
+    public static OffsetDateTime parseDateTimeString(String str) {
+        return ZonedDateTime.from(Converter.DATE_TIME_FORMATTER.parse(str)).toOffsetDateTime();
+    }
+
+    private static final DateTimeFormatter TIME_FORMATTER = new DateTimeFormatterBuilder()
+            .appendOptional(DateTimeFormatter.ISO_TIME)
+            .appendOptional(DateTimeFormatter.ISO_OFFSET_TIME)
+            .parseDefaulting(ChronoField.YEAR, 2020)
+            .parseDefaulting(ChronoField.MONTH_OF_YEAR, 1)
+            .parseDefaulting(ChronoField.DAY_OF_MONTH, 1)
+            .toFormatter()
+            .withZone(ZoneOffset.UTC);
+
+    public static OffsetTime parseTimeString(String str) {
+        return ZonedDateTime.from(Converter.TIME_FORMATTER.parse(str)).toOffsetDateTime().toOffsetTime();
+    }
+    // Serialize/deserialize helpers
+
+    public static TopLevel fromJsonString(String json) throws IOException {
+        return getObjectReader().readValue(json);
+    }
+
+    public static String toJsonString(TopLevel obj) throws JsonProcessingException {
+        return getObjectWriter().writeValueAsString(obj);
+    }
+
+    private static ObjectReader reader;
+    private static ObjectWriter writer;
+
+    private static void instantiateMapper() {
+        ObjectMapper mapper = new ObjectMapper();
+        mapper.findAndRegisterModules();
+        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+        mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
+        SimpleModule module = new SimpleModule();
+        module.addDeserializer(OffsetDateTime.class, new JsonDeserializer<OffsetDateTime>() {
+            @Override
+            public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
+                String value = jsonParser.getText();
+                return Converter.parseDateTimeString(value);
+            }
+        });
+        mapper.registerModule(module);
+        reader = mapper.readerFor(TopLevel.class);
+        writer = mapper.writerFor(TopLevel.class);
+    }
+
+    private static ObjectReader getObjectReader() {
+        if (reader == null) instantiateMapper();
+        return reader;
+    }
+
+    private static ObjectWriter getObjectWriter() {
+        if (writer == null) instantiateMapper();
+        return writer;
+    }
+}
diff --git a/head/schema-java/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Ordered.java b/head/schema-java/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Ordered.java
new file mode 100644
index 0000000..6f3edc8
--- /dev/null
+++ b/head/schema-java/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Ordered.java
@@ -0,0 +1,24 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class Ordered {
+    private double mango;
+    private String zebra;
+    private boolean apple;
+
+    @JsonProperty("mango")
+    public double getMango() { return mango; }
+    @JsonProperty("mango")
+    public void setMango(double value) { this.mango = value; }
+
+    @JsonProperty("zebra")
+    public String getZebra() { return zebra; }
+    @JsonProperty("zebra")
+    public void setZebra(String value) { this.zebra = value; }
+
+    @JsonProperty("apple")
+    public boolean getApple() { return apple; }
+    @JsonProperty("apple")
+    public void setApple(boolean value) { this.apple = value; }
+}
diff --git a/head/schema-java/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/TopLevel.java
new file mode 100644
index 0000000..4629f64
--- /dev/null
+++ b/head/schema-java/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -0,0 +1,42 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class TopLevel {
+    private String zebra;
+    private double mango;
+    private boolean apple;
+    private String delta;
+    private long banana;
+    private Ordered ordered;
+
+    @JsonProperty("zebra")
+    public String getZebra() { return zebra; }
+    @JsonProperty("zebra")
+    public void setZebra(String value) { this.zebra = value; }
+
+    @JsonProperty("mango")
+    public double getMango() { return mango; }
+    @JsonProperty("mango")
+    public void setMango(double value) { this.mango = value; }
+
+    @JsonProperty("apple")
+    public boolean getApple() { return apple; }
+    @JsonProperty("apple")
+    public void setApple(boolean value) { this.apple = value; }
+
+    @JsonProperty("delta")
+    public String getDelta() { return delta; }
+    @JsonProperty("delta")
+    public void setDelta(String value) { this.delta = value; }
+
+    @JsonProperty("banana")
+    public long getBanana() { return banana; }
+    @JsonProperty("banana")
+    public void setBanana(long value) { this.banana = value; }
+
+    @JsonProperty("ordered")
+    public Ordered getOrdered() { return ordered; }
+    @JsonProperty("ordered")
+    public void setOrdered(Ordered value) { this.ordered = value; }
+}
diff --git a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java
index 57a4e6f..6b37145 100644
--- a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java
+++ b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java
@@ -4,20 +4,20 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class Berry {
-    private Color color;
     private String name;
+    private Color color;
     private List<Shape> shapes;
 
-    @JsonProperty("color")
-    public Color getColor() { return color; }
-    @JsonProperty("color")
-    public void setColor(Color value) { this.color = value; }
-
     @JsonProperty("name")
     public String getName() { return name; }
     @JsonProperty("name")
     public void setName(String value) { this.name = value; }
 
+    @JsonProperty("color")
+    public Color getColor() { return color; }
+    @JsonProperty("color")
+    public void setColor(Color value) { this.color = value; }
+
     @JsonProperty("shapes")
     public List<Shape> getShapes() { return shapes; }
     @JsonProperty("shapes")
diff --git a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java
index 57f8d97..4e11b04 100644
--- a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java
+++ b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java
@@ -5,21 +5,21 @@ import java.util.List;
 
 public class Fruit {
     private Boolean apple;
-    private List<Berry> berries;
     private Boolean orange;
+    private List<Berry> berries;
 
     @JsonProperty("apple")
     public Boolean getApple() { return apple; }
     @JsonProperty("apple")
     public void setApple(Boolean value) { this.apple = value; }
 
-    @JsonProperty("berries")
-    public List<Berry> getBerries() { return berries; }
-    @JsonProperty("berries")
-    public void setBerries(List<Berry> value) { this.berries = value; }
-
     @JsonProperty("orange")
     public Boolean getOrange() { return orange; }
     @JsonProperty("orange")
     public void setOrange(Boolean value) { this.orange = value; }
+
+    @JsonProperty("berries")
+    public List<Berry> getBerries() { return berries; }
+    @JsonProperty("berries")
+    public void setBerries(List<Berry> value) { this.berries = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java
index 008a89a..c076a76 100644
--- a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java
+++ b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Limit {
-    private Double maximum;
     private Double minimum;
-
-    @JsonProperty("maximum")
-    public Double getMaximum() { return maximum; }
-    @JsonProperty("maximum")
-    public void setMaximum(Double value) { this.maximum = value; }
+    private Double maximum;
 
     @JsonProperty("minimum")
     public Double getMinimum() { return minimum; }
     @JsonProperty("minimum")
     public void setMinimum(Double value) { this.minimum = value; }
+
+    @JsonProperty("maximum")
+    public Double getMaximum() { return maximum; }
+    @JsonProperty("maximum")
+    public void setMaximum(Double value) { this.maximum = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java
index 26d2a78..1beb8c5 100644
--- a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java
+++ b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java
@@ -3,14 +3,9 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Part {
-    private String depth;
     private String length;
     private String width;
-
-    @JsonProperty("depth")
-    public String getDepth() { return depth; }
-    @JsonProperty("depth")
-    public void setDepth(String value) { this.depth = value; }
+    private String depth;
 
     @JsonProperty("length")
     public String getLength() { return length; }
@@ -21,4 +16,9 @@ public class Part {
     public String getWidth() { return width; }
     @JsonProperty("width")
     public void setWidth(String value) { this.width = value; }
+
+    @JsonProperty("depth")
+    public String getDepth() { return depth; }
+    @JsonProperty("depth")
+    public void setDepth(String value) { this.depth = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java
index acf3e9b..382496b 100644
--- a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java
+++ b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Shape {
-    private Geometry geometry;
     private History history;
-
-    @JsonProperty("geometry")
-    public Geometry getGeometry() { return geometry; }
-    @JsonProperty("geometry")
-    public void setGeometry(Geometry value) { this.geometry = value; }
+    private Geometry geometry;
 
     @JsonProperty("history")
     public History getHistory() { return history; }
     @JsonProperty("history")
     public void setHistory(History value) { this.history = value; }
+
+    @JsonProperty("geometry")
+    public Geometry getGeometry() { return geometry; }
+    @JsonProperty("geometry")
+    public void setGeometry(Geometry value) { this.geometry = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java
index f0be159..f18d133 100644
--- a/base/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java
+++ b/head/schema-java/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java
@@ -3,40 +3,40 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Vehicle {
-    private String brand;
     private String id;
-    private Speed speed;
-    private Boolean subModule;
     private VehicleType type;
+    private Speed speed;
     private String year;
-
-    @JsonProperty("brand")
-    public String getBrand() { return brand; }
-    @JsonProperty("brand")
-    public void setBrand(String value) { this.brand = value; }
+    private String brand;
+    private Boolean subModule;
 
     @JsonProperty("id")
     public String getID() { return id; }
     @JsonProperty("id")
     public void setID(String value) { this.id = value; }
 
-    @JsonProperty("speed")
-    public Speed getSpeed() { return speed; }
-    @JsonProperty("speed")
-    public void setSpeed(Speed value) { this.speed = value; }
-
-    @JsonProperty("subModule")
-    public Boolean getSubModule() { return subModule; }
-    @JsonProperty("subModule")
-    public void setSubModule(Boolean value) { this.subModule = value; }
-
     @JsonProperty("type")
     public VehicleType getType() { return type; }
     @JsonProperty("type")
     public void setType(VehicleType value) { this.type = value; }
 
+    @JsonProperty("speed")
+    public Speed getSpeed() { return speed; }
+    @JsonProperty("speed")
+    public void setSpeed(Speed value) { this.speed = value; }
+
     @JsonProperty("year")
     public String getYear() { return year; }
     @JsonProperty("year")
     public void setYear(String value) { this.year = value; }
+
+    @JsonProperty("brand")
+    public String getBrand() { return brand; }
+    @JsonProperty("brand")
+    public void setBrand(String value) { this.brand = value; }
+
+    @JsonProperty("subModule")
+    public Boolean getSubModule() { return subModule; }
+    @JsonProperty("subModule")
+    public void setSubModule(Boolean value) { this.subModule = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java b/head/schema-java/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java
index f7fcf3b..7d6b5fd 100644
--- a/base/schema-java/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java
+++ b/head/schema-java/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Node {
-    private Next next;
     private String value;
-
-    @JsonProperty("next")
-    public Next getNext() { return next; }
-    @JsonProperty("next")
-    public void setNext(Next value) { this.next = value; }
+    private Next next;
 
     @JsonProperty("value")
     public String getValue() { return value; }
     @JsonProperty("value")
     public void setValue(String value) { this.value = value; }
+
+    @JsonProperty("next")
+    public Next getNext() { return next; }
+    @JsonProperty("next")
+    public void setNext(Next value) { this.next = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java
index 22cab10..2889b0e 100644
--- a/base/schema-java/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private Next next;
     private String value;
-
-    @JsonProperty("next")
-    public Next getNext() { return next; }
-    @JsonProperty("next")
-    public void setNext(Next value) { this.next = value; }
+    private Next next;
 
     @JsonProperty("value")
     public String getValue() { return value; }
     @JsonProperty("value")
     public void setValue(String value) { this.value = value; }
+
+    @JsonProperty("next")
+    public Next getNext() { return next; }
+    @JsonProperty("next")
+    public void setNext(Next value) { this.next = value; }
 }
diff --git a/base/schema-java/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java
index fe03561..5d18cbc 100644
--- a/base/schema-java/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -5,28 +5,13 @@ import java.util.List;
 import java.util.UUID;
 
 public class TopLevel {
-    private List<UUID> arrNullable;
-    private List<UUID> arrOne;
-    private UUID nullable;
     private UUID one;
     private UUID optional;
+    private UUID nullable;
+    private List<UUID> arrOne;
+    private List<UUID> arrNullable;
     private UnionWithEnumUnion unionWithEnum;
 
-    @JsonProperty("arrNullable")
-    public List<UUID> getArrNullable() { return arrNullable; }
-    @JsonProperty("arrNullable")
-    public void setArrNullable(List<UUID> value) { this.arrNullable = value; }
-
-    @JsonProperty("arrOne")
-    public List<UUID> getArrOne() { return arrOne; }
-    @JsonProperty("arrOne")
-    public void setArrOne(List<UUID> value) { this.arrOne = value; }
-
-    @JsonProperty("nullable")
-    public UUID getNullable() { return nullable; }
-    @JsonProperty("nullable")
-    public void setNullable(UUID value) { this.nullable = value; }
-
     @JsonProperty("one")
     public UUID getOne() { return one; }
     @JsonProperty("one")
@@ -37,6 +22,21 @@ public class TopLevel {
     @JsonProperty("optional")
     public void setOptional(UUID value) { this.optional = value; }
 
+    @JsonProperty("nullable")
+    public UUID getNullable() { return nullable; }
+    @JsonProperty("nullable")
+    public void setNullable(UUID value) { this.nullable = value; }
+
+    @JsonProperty("arrOne")
+    public List<UUID> getArrOne() { return arrOne; }
+    @JsonProperty("arrOne")
+    public void setArrOne(List<UUID> value) { this.arrOne = value; }
+
+    @JsonProperty("arrNullable")
+    public List<UUID> getArrNullable() { return arrNullable; }
+    @JsonProperty("arrNullable")
+    public void setArrNullable(List<UUID> value) { this.arrNullable = value; }
+
     @JsonProperty("unionWithEnum")
     public UnionWithEnumUnion getUnionWithEnum() { return unionWithEnum; }
     @JsonProperty("unionWithEnum")
diff --git a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java
index fcddfc1..ca316d4 100644
--- a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java
+++ b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java
@@ -19,8 +19,8 @@ public class Axis {
     private TitleOrient orient;
     private Double position;
     private Double tickCount;
-    private Boolean ticks;
     private Double tickSize;
+    private Boolean ticks;
     private String title;
     private Double titleMaxLength;
     private Double titlePadding;
@@ -206,14 +206,6 @@ public class Axis {
     @JsonProperty("tickCount")
     public void setTickCount(Double value) { this.tickCount = value; }
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    @JsonProperty("ticks")
-    public Boolean getTicks() { return ticks; }
-    @JsonProperty("ticks")
-    public void setTicks(Boolean value) { this.ticks = value; }
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -222,6 +214,14 @@ public class Axis {
     @JsonProperty("tickSize")
     public void setTickSize(Double value) { this.tickSize = value; }
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    @JsonProperty("ticks")
+    public Boolean getTicks() { return ticks; }
+    @JsonProperty("ticks")
+    public void setTicks(Boolean value) { this.ticks = value; }
+
     /**
      * A title for the field. If `null`, the title will be removed.
      *
diff --git a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java
index 01c74e7..186dd65 100644
--- a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java
+++ b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java
@@ -33,9 +33,9 @@ public class AxisConfig {
     private Boolean shortTimeLabels;
     private String tickColor;
     private Boolean tickRound;
-    private Boolean ticks;
     private Double tickSize;
     private Double tickWidth;
+    private Boolean ticks;
     private String titleAlign;
     private Double titleAngle;
     private String titleBaseline;
@@ -288,14 +288,6 @@ public class AxisConfig {
     @JsonProperty("tickRound")
     public void setTickRound(Boolean value) { this.tickRound = value; }
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    @JsonProperty("ticks")
-    public Boolean getTicks() { return ticks; }
-    @JsonProperty("ticks")
-    public void setTicks(Boolean value) { this.ticks = value; }
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -312,6 +304,14 @@ public class AxisConfig {
     @JsonProperty("tickWidth")
     public void setTickWidth(Double value) { this.tickWidth = value; }
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    @JsonProperty("ticks")
+    public Boolean getTicks() { return ticks; }
+    @JsonProperty("ticks")
+    public void setTicks(Boolean value) { this.ticks = value; }
+
     /**
      * Horizontal text alignment of axis titles.
      */
diff --git a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java
index 07630d6..435eeda 100644
--- a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java
+++ b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java
@@ -18,8 +18,8 @@ public class BarConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -147,6 +147,16 @@ public class BarConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -161,16 +171,6 @@ public class BarConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java
index 616bd74..a8c60f1 100644
--- a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java
+++ b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java
@@ -31,8 +31,8 @@ public class MarkConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -130,6 +130,16 @@ public class MarkConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -144,16 +154,6 @@ public class MarkConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java
index 3f0f391..7fbf135 100644
--- a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java
+++ b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java
@@ -13,8 +13,8 @@ public class MarkDef {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -122,6 +122,16 @@ public class MarkDef {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -136,16 +146,6 @@ public class MarkDef {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java
index ee45056..3b97814 100644
--- a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java
+++ b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java
@@ -15,8 +15,8 @@ public class TextConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -115,6 +115,16 @@ public class TextConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -129,16 +139,6 @@ public class TextConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java
index bfe41ea..0389a57 100644
--- a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java
+++ b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java
@@ -16,8 +16,8 @@ public class TickConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -126,6 +126,16 @@ public class TickConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -140,16 +150,6 @@ public class TickConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java
index f6ef6ea..6c3040e 100644
--- a/base/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java
+++ b/head/schema-java/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java
@@ -42,9 +42,9 @@ public class VGAxisConfig {
     private Double minExtent;
     private String tickColor;
     private Boolean tickRound;
-    private Boolean ticks;
     private Double tickSize;
     private Double tickWidth;
+    private Boolean ticks;
     private String titleAlign;
     private Double titleAngle;
     private String titleBaseline;
@@ -287,14 +287,6 @@ public class VGAxisConfig {
     @JsonProperty("tickRound")
     public void setTickRound(Boolean value) { this.tickRound = value; }
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    @JsonProperty("ticks")
-    public Boolean getTicks() { return ticks; }
-    @JsonProperty("ticks")
-    public void setTicks(Boolean value) { this.ticks = value; }
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -311,6 +303,14 @@ public class VGAxisConfig {
     @JsonProperty("tickWidth")
     public void setTickWidth(Double value) { this.tickWidth = value; }
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    @JsonProperty("ticks")
+    public Boolean getTicks() { return ticks; }
+    @JsonProperty("ticks")
+    public void setTicks(Boolean value) { this.ticks = value; }
+
     /**
      * Horizontal text alignment of axis titles.
      */
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java
index e964325..16fb27f 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,15 +3,15 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private String barre;
+    private Union unionization;
     private Enum enumerification;
     private String Goo;
-    private Union unionization;
+    private String barre;
 
-    @JsonProperty("bar")
-    public String getBarre() { return barre; }
-    @JsonProperty("bar")
-    public void setBarre(String value) { this.barre = value; }
+    @JsonProperty("union")
+    public Union getUnionization() { return unionization; }
+    @JsonProperty("union")
+    public void setUnionization(Union value) { this.unionization = value; }
 
     @JsonProperty("enum")
     public Enum getEnumerification() { return enumerification; }
@@ -23,8 +23,8 @@ public class TopLevel {
     @JsonProperty("foo")
     public void setGoo(String value) { this.Goo = value; }
 
-    @JsonProperty("union")
-    public Union getUnionization() { return unionization; }
-    @JsonProperty("union")
-    public void setUnionization(Union value) { this.unionization = value; }
+    @JsonProperty("bar")
+    public String getBarre() { return barre; }
+    @JsonProperty("bar")
+    public void setBarre(String value) { this.barre = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java
index a100c1d..acaa89e 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.*;
 public class TopLevel {
     private double amount;
     private Frequency frequency;
-    private String description;
     private Type type;
+    private String description;
 
     @JsonProperty("amount")
     public double getAmount() { return amount; }
@@ -18,13 +18,13 @@ public class TopLevel {
     @JsonProperty("frequency")
     public void setFrequency(Frequency value) { this.frequency = value; }
 
-    @JsonProperty("description")
-    public String getDescription() { return description; }
-    @JsonProperty("description")
-    public void setDescription(String value) { this.description = value; }
-
     @JsonProperty("type")
     public Type getType() { return type; }
     @JsonProperty("type")
     public void setType(Type value) { this.type = value; }
+
+    @JsonProperty("description")
+    public String getDescription() { return description; }
+    @JsonProperty("description")
+    public void setDescription(String value) { this.description = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index bb0b0c9..6fd3825 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,29 +4,14 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<String> arrNullable;
-    private List<String> arrOne;
-    private String nullable;
     private String one;
     private String optional;
+    private String nullable;
+    private List<String> arrOne;
+    private List<String> arrNullable;
     private UnionWithBool unionWithBool;
     private UnionWithBool unionWithBoolAndEnum;
 
-    @JsonProperty("arrNullable")
-    public List<String> getArrNullable() { return arrNullable; }
-    @JsonProperty("arrNullable")
-    public void setArrNullable(List<String> value) { this.arrNullable = value; }
-
-    @JsonProperty("arrOne")
-    public List<String> getArrOne() { return arrOne; }
-    @JsonProperty("arrOne")
-    public void setArrOne(List<String> value) { this.arrOne = value; }
-
-    @JsonProperty("nullable")
-    public String getNullable() { return nullable; }
-    @JsonProperty("nullable")
-    public void setNullable(String value) { this.nullable = value; }
-
     @JsonProperty("one")
     public String getOne() { return one; }
     @JsonProperty("one")
@@ -37,6 +22,21 @@ public class TopLevel {
     @JsonProperty("optional")
     public void setOptional(String value) { this.optional = value; }
 
+    @JsonProperty("nullable")
+    public String getNullable() { return nullable; }
+    @JsonProperty("nullable")
+    public void setNullable(String value) { this.nullable = value; }
+
+    @JsonProperty("arrOne")
+    public List<String> getArrOne() { return arrOne; }
+    @JsonProperty("arrOne")
+    public void setArrOne(List<String> value) { this.arrOne = value; }
+
+    @JsonProperty("arrNullable")
+    public List<String> getArrNullable() { return arrNullable; }
+    @JsonProperty("arrNullable")
+    public void setArrNullable(List<String> value) { this.arrNullable = value; }
+
     @JsonProperty("unionWithBool")
     public UnionWithBool getUnionWithBool() { return unionWithBool; }
     @JsonProperty("unionWithBool")
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java
index e11e02a..e5cde4e 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,11 +4,16 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
+    private String foo;
     private Object disallowed;
     private List<Object> empty;
-    private String foo;
     private Object impossible;
 
+    @JsonProperty("foo")
+    public String getFoo() { return foo; }
+    @JsonProperty("foo")
+    public void setFoo(String value) { this.foo = value; }
+
     @JsonProperty("disallowed")
     public Object getDisallowed() { return disallowed; }
     @JsonProperty("disallowed")
@@ -19,11 +24,6 @@ public class TopLevel {
     @JsonProperty("empty")
     public void setEmpty(List<Object> value) { this.empty = value; }
 
-    @JsonProperty("foo")
-    public String getFoo() { return foo; }
-    @JsonProperty("foo")
-    public void setFoo(String value) { this.foo = value; }
-
     @JsonProperty("impossible")
     public Object getImpossible() { return impossible; }
     @JsonProperty("impossible")
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java
index 9b9f456..1da47cb 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -17,10 +17,29 @@ import com.fasterxml.jackson.annotation.*;
  * }
  */
 public class TopLevel {
+    private String value;
     private String trailingBackslash;
     private String trailingQuote;
     private String trailingTripleQuote;
-    private String value;
+
+    /**
+     * Property delimiters:
+     * * /
+     * / *
+     * {-
+     * -}
+     * """
+     * </summary> & <br>
+     * }
+     * }
+     * }
+     * }
+     * }
+     */
+    @JsonProperty("value")
+    public String getValue() { return value; }
+    @JsonProperty("value")
+    public void setValue(String value) { this.value = value; }
 
     /**
      * Ends with a backslash \
@@ -45,23 +64,4 @@ public class TopLevel {
     public String getTrailingTripleQuote() { return trailingTripleQuote; }
     @JsonProperty("trailingTripleQuote")
     public void setTrailingTripleQuote(String value) { this.trailingTripleQuote = value; }
-
-    /**
-     * Property delimiters:
-     * * /
-     * / *
-     * {-
-     * -}
-     * """
-     * </summary> & <br>
-     * }
-     * }
-     * }
-     * }
-     * }
-     */
-    @JsonProperty("value")
-    public String getValue() { return value; }
-    @JsonProperty("value")
-    public void setValue(String value) { this.value = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index 286c4b6..d5bd9c5 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,17 +3,27 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private double version;
     private long amount;
+    private double ratio;
     private boolean enabled;
     private Kind kind;
-    private double ratio;
-    private double version;
+
+    @JsonProperty("version")
+    public double getVersion() { return version; }
+    @JsonProperty("version")
+    public void setVersion(double value) { this.version = value; }
 
     @JsonProperty("amount")
     public long getAmount() { return amount; }
     @JsonProperty("amount")
     public void setAmount(long value) { this.amount = value; }
 
+    @JsonProperty("ratio")
+    public double getRatio() { return ratio; }
+    @JsonProperty("ratio")
+    public void setRatio(double value) { this.ratio = value; }
+
     @JsonProperty("enabled")
     public boolean getEnabled() { return enabled; }
     @JsonProperty("enabled")
@@ -23,14 +33,4 @@ public class TopLevel {
     public Kind getKind() { return kind; }
     @JsonProperty("kind")
     public void setKind(Kind value) { this.kind = value; }
-
-    @JsonProperty("ratio")
-    public double getRatio() { return ratio; }
-    @JsonProperty("ratio")
-    public void setRatio(double value) { this.ratio = value; }
-
-    @JsonProperty("version")
-    public double getVersion() { return version; }
-    @JsonProperty("version")
-    public void setVersion(double value) { this.version = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index bfc45fc..4a5af01 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,16 +4,16 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.Date;
 
 public class TopLevel {
-    private BarUnion bar;
     private String foo;
-
-    @JsonProperty("bar")
-    public BarUnion getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(BarUnion value) { this.bar = value; }
+    private BarUnion bar;
 
     @JsonProperty("foo")
     public String getFoo() { return foo; }
     @JsonProperty("foo")
     public void setFoo(String value) { this.foo = value; }
+
+    @JsonProperty("bar")
+    public BarUnion getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(BarUnion value) { this.bar = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java
index 0a86d38..e7d550d 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -7,19 +7,19 @@ import com.fasterxml.jackson.annotation.*;
  * Its description has two lines.
  */
 public class TopLevel {
-    private Boolean bar;
+    private Union union;
     private Enum topLevelEnum;
     private Double foo;
+    private Boolean bar;
     private ObjectOrStringUnion objectOrString;
-    private Union union;
 
     /**
-     * A pretty boolean
+     * Either a number or a string
      */
-    @JsonProperty("bar")
-    public Boolean getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(Boolean value) { this.bar = value; }
+    @JsonProperty("union")
+    public Union getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(Union value) { this.union = value; }
 
     /**
      * An enumeration
@@ -34,16 +34,16 @@ public class TopLevel {
     @JsonProperty("foo")
     public void setFoo(Double value) { this.foo = value; }
 
+    /**
+     * A pretty boolean
+     */
+    @JsonProperty("bar")
+    public Boolean getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(Boolean value) { this.bar = value; }
+
     @JsonProperty("object-or-string")
     public ObjectOrStringUnion getObjectOrString() { return objectOrString; }
     @JsonProperty("object-or-string")
     public void setObjectOrString(ObjectOrStringUnion value) { this.objectOrString = value; }
-
-    /**
-     * Either a number or a string
-     */
-    @JsonProperty("union")
-    public Union getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(Union value) { this.union = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java b/head/schema-java-datetime-legacy/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java
index dedc5c4..c0851ed 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java
@@ -5,16 +5,16 @@ import java.util.List;
 import java.util.Map;
 
 public class Thing {
-    private Anything optional;
     private Anything required;
-
-    @JsonProperty("optional")
-    public Anything getOptional() { return optional; }
-    @JsonProperty("optional")
-    public void setOptional(Anything value) { this.optional = value; }
+    private Anything optional;
 
     @JsonProperty("required")
     public Anything getRequired() { return required; }
     @JsonProperty("required")
     public void setRequired(Anything value) { this.required = value; }
+
+    @JsonProperty("optional")
+    public Anything getOptional() { return optional; }
+    @JsonProperty("optional")
+    public void setOptional(Anything value) { this.optional = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java
index b073986..119e7f4 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,34 +4,34 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<Arr> arr;
-    private String topLevelFor;
-    private Gve gve;
     private Lvc lvc;
+    private Gve gve;
+    private List<Arr> arr;
     private List<OtherArr> otherArr;
+    private String topLevelFor;
 
-    @JsonProperty("arr")
-    public List<Arr> getArr() { return arr; }
-    @JsonProperty("arr")
-    public void setArr(List<Arr> value) { this.arr = value; }
-
-    @JsonProperty("for")
-    public String getTopLevelFor() { return topLevelFor; }
-    @JsonProperty("for")
-    public void setTopLevelFor(String value) { this.topLevelFor = value; }
+    @JsonProperty("lvc")
+    public Lvc getLvc() { return lvc; }
+    @JsonProperty("lvc")
+    public void setLvc(Lvc value) { this.lvc = value; }
 
     @JsonProperty("gve")
     public Gve getGve() { return gve; }
     @JsonProperty("gve")
     public void setGve(Gve value) { this.gve = value; }
 
-    @JsonProperty("lvc")
-    public Lvc getLvc() { return lvc; }
-    @JsonProperty("lvc")
-    public void setLvc(Lvc value) { this.lvc = value; }
+    @JsonProperty("arr")
+    public List<Arr> getArr() { return arr; }
+    @JsonProperty("arr")
+    public void setArr(List<Arr> value) { this.arr = value; }
 
     @JsonProperty("otherArr")
     public List<OtherArr> getOtherArr() { return otherArr; }
     @JsonProperty("otherArr")
     public void setOtherArr(List<OtherArr> value) { this.otherArr = value; }
+
+    @JsonProperty("for")
+    public String getTopLevelFor() { return topLevelFor; }
+    @JsonProperty("for")
+    public void setTopLevelFor(String value) { this.topLevelFor = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index 7408fbd..f5cbec8 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,29 +4,14 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<String> arrNullable;
-    private List<String> arrOne;
-    private String nullable;
     private String one;
     private String optional;
+    private String nullable;
+    private List<String> arrOne;
+    private List<String> arrNullable;
     private UnionWithInt unionWithInt;
     private UnionWithInt unionWithIntAndEnum;
 
-    @JsonProperty("arrNullable")
-    public List<String> getArrNullable() { return arrNullable; }
-    @JsonProperty("arrNullable")
-    public void setArrNullable(List<String> value) { this.arrNullable = value; }
-
-    @JsonProperty("arrOne")
-    public List<String> getArrOne() { return arrOne; }
-    @JsonProperty("arrOne")
-    public void setArrOne(List<String> value) { this.arrOne = value; }
-
-    @JsonProperty("nullable")
-    public String getNullable() { return nullable; }
-    @JsonProperty("nullable")
-    public void setNullable(String value) { this.nullable = value; }
-
     @JsonProperty("one")
     public String getOne() { return one; }
     @JsonProperty("one")
@@ -37,6 +22,21 @@ public class TopLevel {
     @JsonProperty("optional")
     public void setOptional(String value) { this.optional = value; }
 
+    @JsonProperty("nullable")
+    public String getNullable() { return nullable; }
+    @JsonProperty("nullable")
+    public void setNullable(String value) { this.nullable = value; }
+
+    @JsonProperty("arrOne")
+    public List<String> getArrOne() { return arrOne; }
+    @JsonProperty("arrOne")
+    public void setArrOne(List<String> value) { this.arrOne = value; }
+
+    @JsonProperty("arrNullable")
+    public List<String> getArrNullable() { return arrNullable; }
+    @JsonProperty("arrNullable")
+    public void setArrNullable(List<String> value) { this.arrNullable = value; }
+
     @JsonProperty("unionWithInt")
     public UnionWithInt getUnionWithInt() { return unionWithInt; }
     @JsonProperty("unionWithInt")
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java
index 94b3a3c..14c03b4 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,15 +3,30 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private long smallPositive;
+    private long smallNegative;
+    private long i32Range;
     private long aboveI32Max;
     private long belowI32Min;
-    private long i32Range;
-    private long largeBounds;
-    private long onlyMaximum;
     private long onlyMinimum;
-    private long smallNegative;
-    private long smallPositive;
+    private long onlyMaximum;
     private long unbounded;
+    private long largeBounds;
+
+    @JsonProperty("small_positive")
+    public long getSmallPositive() { return smallPositive; }
+    @JsonProperty("small_positive")
+    public void setSmallPositive(long value) { this.smallPositive = value; }
+
+    @JsonProperty("small_negative")
+    public long getSmallNegative() { return smallNegative; }
+    @JsonProperty("small_negative")
+    public void setSmallNegative(long value) { this.smallNegative = value; }
+
+    @JsonProperty("i32_range")
+    public long getI32Range() { return i32Range; }
+    @JsonProperty("i32_range")
+    public void setI32Range(long value) { this.i32Range = value; }
 
     @JsonProperty("above_i32_max")
     public long getAboveI32Max() { return aboveI32Max; }
@@ -23,38 +38,23 @@ public class TopLevel {
     @JsonProperty("below_i32_min")
     public void setBelowI32Min(long value) { this.belowI32Min = value; }
 
-    @JsonProperty("i32_range")
-    public long getI32Range() { return i32Range; }
-    @JsonProperty("i32_range")
-    public void setI32Range(long value) { this.i32Range = value; }
-
-    @JsonProperty("large_bounds")
-    public long getLargeBounds() { return largeBounds; }
-    @JsonProperty("large_bounds")
-    public void setLargeBounds(long value) { this.largeBounds = value; }
-
-    @JsonProperty("only_maximum")
-    public long getOnlyMaximum() { return onlyMaximum; }
-    @JsonProperty("only_maximum")
-    public void setOnlyMaximum(long value) { this.onlyMaximum = value; }
-
     @JsonProperty("only_minimum")
     public long getOnlyMinimum() { return onlyMinimum; }
     @JsonProperty("only_minimum")
     public void setOnlyMinimum(long value) { this.onlyMinimum = value; }
 
-    @JsonProperty("small_negative")
-    public long getSmallNegative() { return smallNegative; }
-    @JsonProperty("small_negative")
-    public void setSmallNegative(long value) { this.smallNegative = value; }
-
-    @JsonProperty("small_positive")
-    public long getSmallPositive() { return smallPositive; }
-    @JsonProperty("small_positive")
-    public void setSmallPositive(long value) { this.smallPositive = value; }
+    @JsonProperty("only_maximum")
+    public long getOnlyMaximum() { return onlyMaximum; }
+    @JsonProperty("only_maximum")
+    public void setOnlyMaximum(long value) { this.onlyMaximum = value; }
 
     @JsonProperty("unbounded")
     public long getUnbounded() { return unbounded; }
     @JsonProperty("unbounded")
     public void setUnbounded(long value) { this.unbounded = value; }
+
+    @JsonProperty("large_bounds")
+    public long getLargeBounds() { return largeBounds; }
+    @JsonProperty("large_bounds")
+    public void setLargeBounds(long value) { this.largeBounds = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java b/head/schema-java-datetime-legacy/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java
index ed0c517..a754624 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java
@@ -3,20 +3,20 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class LightParams {
-    private String appID;
     private String outletID;
+    private String appID;
     private String rgba;
 
-    @JsonProperty("app_id")
-    public String getAppID() { return appID; }
-    @JsonProperty("app_id")
-    public void setAppID(String value) { this.appID = value; }
-
     @JsonProperty("outlet_id")
     public String getOutletID() { return outletID; }
     @JsonProperty("outlet_id")
     public void setOutletID(String value) { this.outletID = value; }
 
+    @JsonProperty("app_id")
+    public String getAppID() { return appID; }
+    @JsonProperty("app_id")
+    public void setAppID(String value) { this.appID = value; }
+
     @JsonProperty("rgba")
     public String getRGBA() { return rgba; }
     @JsonProperty("rgba")
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java
index b9845d1..dca4117 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,12 +4,17 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
+    private List<String> minOnly;
     private List<Long> maxOnly;
     private List<Double> minAndMax;
-    private List<String> minOnly;
     private List<String> plain;
     private List<UnionItem> unionItems;
 
+    @JsonProperty("minOnly")
+    public List<String> getMinOnly() { return minOnly; }
+    @JsonProperty("minOnly")
+    public void setMinOnly(List<String> value) { this.minOnly = value; }
+
     @JsonProperty("maxOnly")
     public List<Long> getMaxOnly() { return maxOnly; }
     @JsonProperty("maxOnly")
@@ -20,11 +25,6 @@ public class TopLevel {
     @JsonProperty("minAndMax")
     public void setMinAndMax(List<Double> value) { this.minAndMax = value; }
 
-    @JsonProperty("minOnly")
-    public List<String> getMinOnly() { return minOnly; }
-    @JsonProperty("minOnly")
-    public void setMinOnly(List<String> value) { this.minOnly = value; }
-
     @JsonProperty("plain")
     public List<String> getPlain() { return plain; }
     @JsonProperty("plain")
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java
index c415d2f..01c0db8 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,51 +4,51 @@ import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
     private long free;
-    private long intersection;
-    private long max;
     private long min;
+    private long max;
     private long minmax;
-    private long minMaxIntersection;
-    private long minMaxUnion;
     private long union;
+    private long minMaxUnion;
+    private long intersection;
+    private long minMaxIntersection;
 
     @JsonProperty("free")
     public long getFree() { return free; }
     @JsonProperty("free")
     public void setFree(long value) { this.free = value; }
 
-    @JsonProperty("intersection")
-    public long getIntersection() { return intersection; }
-    @JsonProperty("intersection")
-    public void setIntersection(long value) { this.intersection = value; }
+    @JsonProperty("min")
+    public long getMin() { return min; }
+    @JsonProperty("min")
+    public void setMin(long value) { this.min = value; }
 
     @JsonProperty("max")
     public long getMax() { return max; }
     @JsonProperty("max")
     public void setMax(long value) { this.max = value; }
 
-    @JsonProperty("min")
-    public long getMin() { return min; }
-    @JsonProperty("min")
-    public void setMin(long value) { this.min = value; }
-
     @JsonProperty("minmax")
     public long getMinmax() { return minmax; }
     @JsonProperty("minmax")
     public void setMinmax(long value) { this.minmax = value; }
 
-    @JsonProperty("minMaxIntersection")
-    public long getMinMaxIntersection() { return minMaxIntersection; }
-    @JsonProperty("minMaxIntersection")
-    public void setMinMaxIntersection(long value) { this.minMaxIntersection = value; }
+    @JsonProperty("union")
+    public long getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(long value) { this.union = value; }
 
     @JsonProperty("minMaxUnion")
     public long getMinMaxUnion() { return minMaxUnion; }
     @JsonProperty("minMaxUnion")
     public void setMinMaxUnion(long value) { this.minMaxUnion = value; }
 
-    @JsonProperty("union")
-    public long getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(long value) { this.union = value; }
+    @JsonProperty("intersection")
+    public long getIntersection() { return intersection; }
+    @JsonProperty("intersection")
+    public void setIntersection(long value) { this.intersection = value; }
+
+    @JsonProperty("minMaxIntersection")
+    public long getMinMaxIntersection() { return minMaxIntersection; }
+    @JsonProperty("minMaxIntersection")
+    public void setMinMaxIntersection(long value) { this.minMaxIntersection = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java
index 7a80941..d85c4fe 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,51 +4,51 @@ import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
     private double free;
-    private double intersection;
-    private double max;
     private double min;
+    private double max;
     private double minmax;
-    private double minMaxIntersection;
-    private double minMaxUnion;
     private double union;
+    private double minMaxUnion;
+    private double intersection;
+    private double minMaxIntersection;
 
     @JsonProperty("free")
     public double getFree() { return free; }
     @JsonProperty("free")
     public void setFree(double value) { this.free = value; }
 
-    @JsonProperty("intersection")
-    public double getIntersection() { return intersection; }
-    @JsonProperty("intersection")
-    public void setIntersection(double value) { this.intersection = value; }
+    @JsonProperty("min")
+    public double getMin() { return min; }
+    @JsonProperty("min")
+    public void setMin(double value) { this.min = value; }
 
     @JsonProperty("max")
     public double getMax() { return max; }
     @JsonProperty("max")
     public void setMax(double value) { this.max = value; }
 
-    @JsonProperty("min")
-    public double getMin() { return min; }
-    @JsonProperty("min")
-    public void setMin(double value) { this.min = value; }
-
     @JsonProperty("minmax")
     public double getMinmax() { return minmax; }
     @JsonProperty("minmax")
     public void setMinmax(double value) { this.minmax = value; }
 
-    @JsonProperty("minMaxIntersection")
-    public double getMinMaxIntersection() { return minMaxIntersection; }
-    @JsonProperty("minMaxIntersection")
-    public void setMinMaxIntersection(double value) { this.minMaxIntersection = value; }
+    @JsonProperty("union")
+    public double getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(double value) { this.union = value; }
 
     @JsonProperty("minMaxUnion")
     public double getMinMaxUnion() { return minMaxUnion; }
     @JsonProperty("minMaxUnion")
     public void setMinMaxUnion(double value) { this.minMaxUnion = value; }
 
-    @JsonProperty("union")
-    public double getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(double value) { this.union = value; }
+    @JsonProperty("intersection")
+    public double getIntersection() { return intersection; }
+    @JsonProperty("intersection")
+    public void setIntersection(double value) { this.intersection = value; }
+
+    @JsonProperty("minMaxIntersection")
+    public double getMinMaxIntersection() { return minMaxIntersection; }
+    @JsonProperty("minMaxIntersection")
+    public void setMinMaxIntersection(double value) { this.minMaxIntersection = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
index 98d223e..bc5e348 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,52 +3,52 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private String intersection;
-    private InUnion inUnion;
-    private String maxlength;
     private String minlength;
-    private String minMaxIntersection;
+    private String maxlength;
     private String minmaxlength;
-    private String minMaxUnion;
     private String union;
-
-    @JsonProperty("intersection")
-    public String getIntersection() { return intersection; }
-    @JsonProperty("intersection")
-    public void setIntersection(String value) { this.intersection = value; }
-
-    @JsonProperty("inUnion")
-    public InUnion getInUnion() { return inUnion; }
-    @JsonProperty("inUnion")
-    public void setInUnion(InUnion value) { this.inUnion = value; }
-
-    @JsonProperty("maxlength")
-    public String getMaxlength() { return maxlength; }
-    @JsonProperty("maxlength")
-    public void setMaxlength(String value) { this.maxlength = value; }
+    private InUnion inUnion;
+    private String minMaxUnion;
+    private String intersection;
+    private String minMaxIntersection;
 
     @JsonProperty("minlength")
     public String getMinlength() { return minlength; }
     @JsonProperty("minlength")
     public void setMinlength(String value) { this.minlength = value; }
 
-    @JsonProperty("minMaxIntersection")
-    public String getMinMaxIntersection() { return minMaxIntersection; }
-    @JsonProperty("minMaxIntersection")
-    public void setMinMaxIntersection(String value) { this.minMaxIntersection = value; }
+    @JsonProperty("maxlength")
+    public String getMaxlength() { return maxlength; }
+    @JsonProperty("maxlength")
+    public void setMaxlength(String value) { this.maxlength = value; }
 
     @JsonProperty("minmaxlength")
     public String getMinmaxlength() { return minmaxlength; }
     @JsonProperty("minmaxlength")
     public void setMinmaxlength(String value) { this.minmaxlength = value; }
 
+    @JsonProperty("union")
+    public String getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(String value) { this.union = value; }
+
+    @JsonProperty("inUnion")
+    public InUnion getInUnion() { return inUnion; }
+    @JsonProperty("inUnion")
+    public void setInUnion(InUnion value) { this.inUnion = value; }
+
     @JsonProperty("minMaxUnion")
     public String getMinMaxUnion() { return minMaxUnion; }
     @JsonProperty("minMaxUnion")
     public void setMinMaxUnion(String value) { this.minMaxUnion = value; }
 
-    @JsonProperty("union")
-    public String getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(String value) { this.union = value; }
+    @JsonProperty("intersection")
+    public String getIntersection() { return intersection; }
+    @JsonProperty("intersection")
+    public void setIntersection(String value) { this.intersection = value; }
+
+    @JsonProperty("minMaxIntersection")
+    public String getMinMaxIntersection() { return minMaxIntersection; }
+    @JsonProperty("minMaxIntersection")
+    public void setMinMaxIntersection(String value) { this.minMaxIntersection = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
index 54a446b..57943c4 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,20 +3,20 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private long bar;
     private long foo;
+    private long bar;
     private boolean quux;
 
-    @JsonProperty("bar")
-    public long getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(long value) { this.bar = value; }
-
     @JsonProperty("foo")
     public long getFoo() { return foo; }
     @JsonProperty("foo")
     public void setFoo(long value) { this.foo = value; }
 
+    @JsonProperty("bar")
+    public long getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(long value) { this.bar = value; }
+
     @JsonProperty("quux")
     public boolean getQuux() { return quux; }
     @JsonProperty("quux")
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java
index fbcc9c9..1ed4acb 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private String b;
     private Kind kind;
-
-    @JsonProperty("b")
-    public String getB() { return b; }
-    @JsonProperty("b")
-    public void setB(String value) { this.b = value; }
+    private String b;
 
     @JsonProperty("kind")
     public Kind getKind() { return kind; }
     @JsonProperty("kind")
     public void setKind(Kind value) { this.kind = value; }
+
+    @JsonProperty("b")
+    public String getB() { return b; }
+    @JsonProperty("b")
+    public void setB(String value) { this.b = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java
index 3a7506d..281518a 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private boolean bar;
     private Object foo;
-
-    @JsonProperty("bar")
-    public boolean getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(boolean value) { this.bar = value; }
+    private boolean bar;
 
     @JsonProperty("foo")
     public Object getFoo() { return foo; }
     @JsonProperty("foo")
     public void setFoo(Object value) { this.foo = value; }
+
+    @JsonProperty("bar")
+    public boolean getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(boolean value) { this.bar = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
index e75b053..00c67a5 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -5,45 +5,45 @@ import java.util.List;
 
 public class TopLevel {
     private List<Coordinate> coordinates;
-    private Long count;
-    private String label;
     private List<Coordinate> requiredCoordinates;
+    private Long count;
     private long requiredCount;
-    private String requiredLabel;
     private Double weight;
+    private String label;
+    private String requiredLabel;
 
     @JsonProperty("coordinates")
     public List<Coordinate> getCoordinates() { return coordinates; }
     @JsonProperty("coordinates")
     public void setCoordinates(List<Coordinate> value) { this.coordinates = value; }
 
-    @JsonProperty("count")
-    public Long getCount() { return count; }
-    @JsonProperty("count")
-    public void setCount(Long value) { this.count = value; }
-
-    @JsonProperty("label")
-    public String getLabel() { return label; }
-    @JsonProperty("label")
-    public void setLabel(String value) { this.label = value; }
-
     @JsonProperty("requiredCoordinates")
     public List<Coordinate> getRequiredCoordinates() { return requiredCoordinates; }
     @JsonProperty("requiredCoordinates")
     public void setRequiredCoordinates(List<Coordinate> value) { this.requiredCoordinates = value; }
 
+    @JsonProperty("count")
+    public Long getCount() { return count; }
+    @JsonProperty("count")
+    public void setCount(Long value) { this.count = value; }
+
     @JsonProperty("requiredCount")
     public long getRequiredCount() { return requiredCount; }
     @JsonProperty("requiredCount")
     public void setRequiredCount(long value) { this.requiredCount = value; }
 
-    @JsonProperty("requiredLabel")
-    public String getRequiredLabel() { return requiredLabel; }
-    @JsonProperty("requiredLabel")
-    public void setRequiredLabel(String value) { this.requiredLabel = value; }
-
     @JsonProperty("weight")
     public Double getWeight() { return weight; }
     @JsonProperty("weight")
     public void setWeight(Double value) { this.weight = value; }
+
+    @JsonProperty("label")
+    public String getLabel() { return label; }
+    @JsonProperty("label")
+    public void setLabel(String value) { this.label = value; }
+
+    @JsonProperty("requiredLabel")
+    public String getRequiredLabel() { return requiredLabel; }
+    @JsonProperty("requiredLabel")
+    public void setRequiredLabel(String value) { this.requiredLabel = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java
index ff87686..51f7e05 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,34 +3,34 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private Double optDouble;
+    private long reqZeroMin;
     private Long optInt;
-    private String optPattern;
+    private Double optDouble;
     private String optString;
-    private long reqZeroMin;
+    private String optPattern;
 
-    @JsonProperty("optDouble")
-    public Double getOptDouble() { return optDouble; }
-    @JsonProperty("optDouble")
-    public void setOptDouble(Double value) { this.optDouble = value; }
+    @JsonProperty("reqZeroMin")
+    public long getReqZeroMin() { return reqZeroMin; }
+    @JsonProperty("reqZeroMin")
+    public void setReqZeroMin(long value) { this.reqZeroMin = value; }
 
     @JsonProperty("optInt")
     public Long getOptInt() { return optInt; }
     @JsonProperty("optInt")
     public void setOptInt(Long value) { this.optInt = value; }
 
-    @JsonProperty("optPattern")
-    public String getOptPattern() { return optPattern; }
-    @JsonProperty("optPattern")
-    public void setOptPattern(String value) { this.optPattern = value; }
+    @JsonProperty("optDouble")
+    public Double getOptDouble() { return optDouble; }
+    @JsonProperty("optDouble")
+    public void setOptDouble(Double value) { this.optDouble = value; }
 
     @JsonProperty("optString")
     public String getOptString() { return optString; }
     @JsonProperty("optString")
     public void setOptString(String value) { this.optString = value; }
 
-    @JsonProperty("reqZeroMin")
-    public long getReqZeroMin() { return reqZeroMin; }
-    @JsonProperty("reqZeroMin")
-    public void setReqZeroMin(long value) { this.reqZeroMin = value; }
+    @JsonProperty("optPattern")
+    public String getOptPattern() { return optPattern; }
+    @JsonProperty("optPattern")
+    public void setOptPattern(String value) { this.optPattern = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
index b263115..091c770 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,33 +4,12 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.Date;
 
 public class TopLevel {
-    private Date optionalDate;
-    private Date optionalDateTime;
-    private Date optionalTime;
     private Date requiredDate;
-    private Date requiredDateTime;
     private Date requiredTime;
-
-    @JsonProperty("optional-date")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    public Date getOptionalDate() { return optionalDate; }
-    @JsonProperty("optional-date")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    public void setOptionalDate(Date value) { this.optionalDate = value; }
-
-    @JsonProperty("optional-date-time")
-    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssX", timezone = "UTC")
-    public Date getOptionalDateTime() { return optionalDateTime; }
-    @JsonProperty("optional-date-time")
-    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssX", timezone = "UTC")
-    public void setOptionalDateTime(Date value) { this.optionalDateTime = value; }
-
-    @JsonProperty("optional-time")
-    @JsonFormat(pattern = "HH:mm:ssX", timezone = "UTC")
-    public Date getOptionalTime() { return optionalTime; }
-    @JsonProperty("optional-time")
-    @JsonFormat(pattern = "HH:mm:ssX", timezone = "UTC")
-    public void setOptionalTime(Date value) { this.optionalTime = value; }
+    private Date requiredDateTime;
+    private Date optionalDate;
+    private Date optionalTime;
+    private Date optionalDateTime;
 
     @JsonProperty("required-date")
     @JsonFormat(pattern = "yyyy-MM-dd")
@@ -39,6 +18,13 @@ public class TopLevel {
     @JsonFormat(pattern = "yyyy-MM-dd")
     public void setRequiredDate(Date value) { this.requiredDate = value; }
 
+    @JsonProperty("required-time")
+    @JsonFormat(pattern = "HH:mm:ssX", timezone = "UTC")
+    public Date getRequiredTime() { return requiredTime; }
+    @JsonProperty("required-time")
+    @JsonFormat(pattern = "HH:mm:ssX", timezone = "UTC")
+    public void setRequiredTime(Date value) { this.requiredTime = value; }
+
     @JsonProperty("required-date-time")
     @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssX", timezone = "UTC")
     public Date getRequiredDateTime() { return requiredDateTime; }
@@ -46,10 +32,24 @@ public class TopLevel {
     @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssX", timezone = "UTC")
     public void setRequiredDateTime(Date value) { this.requiredDateTime = value; }
 
-    @JsonProperty("required-time")
+    @JsonProperty("optional-date")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    public Date getOptionalDate() { return optionalDate; }
+    @JsonProperty("optional-date")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    public void setOptionalDate(Date value) { this.optionalDate = value; }
+
+    @JsonProperty("optional-time")
     @JsonFormat(pattern = "HH:mm:ssX", timezone = "UTC")
-    public Date getRequiredTime() { return requiredTime; }
-    @JsonProperty("required-time")
+    public Date getOptionalTime() { return optionalTime; }
+    @JsonProperty("optional-time")
     @JsonFormat(pattern = "HH:mm:ssX", timezone = "UTC")
-    public void setRequiredTime(Date value) { this.requiredTime = value; }
+    public void setOptionalTime(Date value) { this.optionalTime = value; }
+
+    @JsonProperty("optional-date-time")
+    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssX", timezone = "UTC")
+    public Date getOptionalDateTime() { return optionalDateTime; }
+    @JsonProperty("optional-date-time")
+    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssX", timezone = "UTC")
+    public void setOptionalDateTime(Date value) { this.optionalDateTime = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java
index c45ac58..742abe3 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,16 +4,16 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<Open> open;
     private List<Open> tuple;
-
-    @JsonProperty("open")
-    public List<Open> getOpen() { return open; }
-    @JsonProperty("open")
-    public void setOpen(List<Open> value) { this.open = value; }
+    private List<Open> open;
 
     @JsonProperty("tuple")
     public List<Open> getTuple() { return tuple; }
     @JsonProperty("tuple")
     public void setTuple(List<Open> value) { this.tuple = value; }
+
+    @JsonProperty("open")
+    public List<Open> getOpen() { return open; }
+    @JsonProperty("open")
+    public void setOpen(List<Open> value) { this.open = value; }
 }
diff --git a/head/schema-java-datetime-legacy/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Converter.java b/head/schema-java-datetime-legacy/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Converter.java
new file mode 100644
index 0000000..7d4811b
--- /dev/null
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Converter.java
@@ -0,0 +1,121 @@
+// To use this code, add the following Maven dependency to your project:
+//
+//
+//     com.fasterxml.jackson.core     : jackson-databind          : 2.9.0
+//
+//
+// Import this package:
+//
+//     import io.quicktype.Converter;
+//
+// Then you can deserialize a JSON string with
+//
+//     TopLevel data = Converter.fromJsonString(jsonString);
+
+package io.quicktype;
+
+import java.io.IOException;
+import com.fasterxml.jackson.databind.*;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.util.*;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+
+public class Converter {
+    // Date-time helpers
+
+    private static final String[] DATE_TIME_FORMATS = {
+            "yyyy-MM-dd'T'HH:mm:ss.SX",
+            "yyyy-MM-dd'T'HH:mm:ss.S",
+            "yyyy-MM-dd'T'HH:mm:ssX",
+            "yyyy-MM-dd'T'HH:mm:ss",
+            "yyyy-MM-dd HH:mm:ss.SX",
+            "yyyy-MM-dd HH:mm:ss.S",
+            "yyyy-MM-dd HH:mm:ssX",
+            "yyyy-MM-dd HH:mm:ss",
+            "HH:mm:ss.SZ",
+            "HH:mm:ss.S",
+            "HH:mm:ssZ",
+            "HH:mm:ss",
+            "yyyy-MM-dd",
+    };
+
+    public static Date parseAllDateTimeString(String str) {
+        for (String format : DATE_TIME_FORMATS) {
+            try {
+                return new SimpleDateFormat(format).parse(str);
+            } catch (Exception ex) {
+                // Ignored
+            }
+        }
+        return null;
+    }
+
+    public static String serializeDateTime(Date datetime) {
+        return new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ssZ").format(datetime);
+    }
+
+    public static String serializeDate(Date datetime) {
+        return new SimpleDateFormat("yyyy-MM-dd").format(datetime);
+    }
+
+    public static String serializeTime(Date datetime) {
+        return new SimpleDateFormat("hh:mm:ssZ").format(datetime);
+    }
+    // Serialize/deserialize helpers
+
+    public static TopLevel fromJsonString(String json) throws IOException {
+        return getObjectReader().readValue(json);
+    }
+
+    public static String toJsonString(TopLevel obj) throws JsonProcessingException {
+        return getObjectWriter().writeValueAsString(obj);
+    }
+
+    private static ObjectReader reader;
+    private static ObjectWriter writer;
+
+    private static void instantiateMapper() {
+        ObjectMapper mapper = new ObjectMapper();
+        mapper.findAndRegisterModules();
+        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+        mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
+        SimpleModule module = new SimpleModule();
+        module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
+            @Override
+            public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
+                String value = jsonParser.getText();
+                return Converter.parseAllDateTimeString(value);
+            }
+        });
+        module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
+            @Override
+            public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
+                String value = jsonParser.getText();
+                return Converter.parseAllDateTimeString(value);
+            }
+        });
+        module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
+            @Override
+            public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
+                String value = jsonParser.getText();
+                return Converter.parseAllDateTimeString(value);
+            }
+        });
+        mapper.registerModule(module);
+        reader = mapper.readerFor(TopLevel.class);
+        writer = mapper.writerFor(TopLevel.class);
+    }
+
+    private static ObjectReader getObjectReader() {
+        if (reader == null) instantiateMapper();
+        return reader;
+    }
+
+    private static ObjectWriter getObjectWriter() {
+        if (writer == null) instantiateMapper();
+        return writer;
+    }
+}
diff --git a/head/schema-java-datetime-legacy/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Ordered.java b/head/schema-java-datetime-legacy/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Ordered.java
new file mode 100644
index 0000000..6f3edc8
--- /dev/null
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Ordered.java
@@ -0,0 +1,24 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class Ordered {
+    private double mango;
+    private String zebra;
+    private boolean apple;
+
+    @JsonProperty("mango")
+    public double getMango() { return mango; }
+    @JsonProperty("mango")
+    public void setMango(double value) { this.mango = value; }
+
+    @JsonProperty("zebra")
+    public String getZebra() { return zebra; }
+    @JsonProperty("zebra")
+    public void setZebra(String value) { this.zebra = value; }
+
+    @JsonProperty("apple")
+    public boolean getApple() { return apple; }
+    @JsonProperty("apple")
+    public void setApple(boolean value) { this.apple = value; }
+}
diff --git a/head/schema-java-datetime-legacy/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/TopLevel.java
new file mode 100644
index 0000000..4629f64
--- /dev/null
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -0,0 +1,42 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class TopLevel {
+    private String zebra;
+    private double mango;
+    private boolean apple;
+    private String delta;
+    private long banana;
+    private Ordered ordered;
+
+    @JsonProperty("zebra")
+    public String getZebra() { return zebra; }
+    @JsonProperty("zebra")
+    public void setZebra(String value) { this.zebra = value; }
+
+    @JsonProperty("mango")
+    public double getMango() { return mango; }
+    @JsonProperty("mango")
+    public void setMango(double value) { this.mango = value; }
+
+    @JsonProperty("apple")
+    public boolean getApple() { return apple; }
+    @JsonProperty("apple")
+    public void setApple(boolean value) { this.apple = value; }
+
+    @JsonProperty("delta")
+    public String getDelta() { return delta; }
+    @JsonProperty("delta")
+    public void setDelta(String value) { this.delta = value; }
+
+    @JsonProperty("banana")
+    public long getBanana() { return banana; }
+    @JsonProperty("banana")
+    public void setBanana(long value) { this.banana = value; }
+
+    @JsonProperty("ordered")
+    public Ordered getOrdered() { return ordered; }
+    @JsonProperty("ordered")
+    public void setOrdered(Ordered value) { this.ordered = value; }
+}
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java
index 57a4e6f..6b37145 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java
@@ -4,20 +4,20 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class Berry {
-    private Color color;
     private String name;
+    private Color color;
     private List<Shape> shapes;
 
-    @JsonProperty("color")
-    public Color getColor() { return color; }
-    @JsonProperty("color")
-    public void setColor(Color value) { this.color = value; }
-
     @JsonProperty("name")
     public String getName() { return name; }
     @JsonProperty("name")
     public void setName(String value) { this.name = value; }
 
+    @JsonProperty("color")
+    public Color getColor() { return color; }
+    @JsonProperty("color")
+    public void setColor(Color value) { this.color = value; }
+
     @JsonProperty("shapes")
     public List<Shape> getShapes() { return shapes; }
     @JsonProperty("shapes")
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java
index 57f8d97..4e11b04 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java
@@ -5,21 +5,21 @@ import java.util.List;
 
 public class Fruit {
     private Boolean apple;
-    private List<Berry> berries;
     private Boolean orange;
+    private List<Berry> berries;
 
     @JsonProperty("apple")
     public Boolean getApple() { return apple; }
     @JsonProperty("apple")
     public void setApple(Boolean value) { this.apple = value; }
 
-    @JsonProperty("berries")
-    public List<Berry> getBerries() { return berries; }
-    @JsonProperty("berries")
-    public void setBerries(List<Berry> value) { this.berries = value; }
-
     @JsonProperty("orange")
     public Boolean getOrange() { return orange; }
     @JsonProperty("orange")
     public void setOrange(Boolean value) { this.orange = value; }
+
+    @JsonProperty("berries")
+    public List<Berry> getBerries() { return berries; }
+    @JsonProperty("berries")
+    public void setBerries(List<Berry> value) { this.berries = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java
index 008a89a..c076a76 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Limit {
-    private Double maximum;
     private Double minimum;
-
-    @JsonProperty("maximum")
-    public Double getMaximum() { return maximum; }
-    @JsonProperty("maximum")
-    public void setMaximum(Double value) { this.maximum = value; }
+    private Double maximum;
 
     @JsonProperty("minimum")
     public Double getMinimum() { return minimum; }
     @JsonProperty("minimum")
     public void setMinimum(Double value) { this.minimum = value; }
+
+    @JsonProperty("maximum")
+    public Double getMaximum() { return maximum; }
+    @JsonProperty("maximum")
+    public void setMaximum(Double value) { this.maximum = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java
index 26d2a78..1beb8c5 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java
@@ -3,14 +3,9 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Part {
-    private String depth;
     private String length;
     private String width;
-
-    @JsonProperty("depth")
-    public String getDepth() { return depth; }
-    @JsonProperty("depth")
-    public void setDepth(String value) { this.depth = value; }
+    private String depth;
 
     @JsonProperty("length")
     public String getLength() { return length; }
@@ -21,4 +16,9 @@ public class Part {
     public String getWidth() { return width; }
     @JsonProperty("width")
     public void setWidth(String value) { this.width = value; }
+
+    @JsonProperty("depth")
+    public String getDepth() { return depth; }
+    @JsonProperty("depth")
+    public void setDepth(String value) { this.depth = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java
index acf3e9b..382496b 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Shape {
-    private Geometry geometry;
     private History history;
-
-    @JsonProperty("geometry")
-    public Geometry getGeometry() { return geometry; }
-    @JsonProperty("geometry")
-    public void setGeometry(Geometry value) { this.geometry = value; }
+    private Geometry geometry;
 
     @JsonProperty("history")
     public History getHistory() { return history; }
     @JsonProperty("history")
     public void setHistory(History value) { this.history = value; }
+
+    @JsonProperty("geometry")
+    public Geometry getGeometry() { return geometry; }
+    @JsonProperty("geometry")
+    public void setGeometry(Geometry value) { this.geometry = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java
index f0be159..f18d133 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java
@@ -3,40 +3,40 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Vehicle {
-    private String brand;
     private String id;
-    private Speed speed;
-    private Boolean subModule;
     private VehicleType type;
+    private Speed speed;
     private String year;
-
-    @JsonProperty("brand")
-    public String getBrand() { return brand; }
-    @JsonProperty("brand")
-    public void setBrand(String value) { this.brand = value; }
+    private String brand;
+    private Boolean subModule;
 
     @JsonProperty("id")
     public String getID() { return id; }
     @JsonProperty("id")
     public void setID(String value) { this.id = value; }
 
-    @JsonProperty("speed")
-    public Speed getSpeed() { return speed; }
-    @JsonProperty("speed")
-    public void setSpeed(Speed value) { this.speed = value; }
-
-    @JsonProperty("subModule")
-    public Boolean getSubModule() { return subModule; }
-    @JsonProperty("subModule")
-    public void setSubModule(Boolean value) { this.subModule = value; }
-
     @JsonProperty("type")
     public VehicleType getType() { return type; }
     @JsonProperty("type")
     public void setType(VehicleType value) { this.type = value; }
 
+    @JsonProperty("speed")
+    public Speed getSpeed() { return speed; }
+    @JsonProperty("speed")
+    public void setSpeed(Speed value) { this.speed = value; }
+
     @JsonProperty("year")
     public String getYear() { return year; }
     @JsonProperty("year")
     public void setYear(String value) { this.year = value; }
+
+    @JsonProperty("brand")
+    public String getBrand() { return brand; }
+    @JsonProperty("brand")
+    public void setBrand(String value) { this.brand = value; }
+
+    @JsonProperty("subModule")
+    public Boolean getSubModule() { return subModule; }
+    @JsonProperty("subModule")
+    public void setSubModule(Boolean value) { this.subModule = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java b/head/schema-java-datetime-legacy/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java
index f7fcf3b..7d6b5fd 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Node {
-    private Next next;
     private String value;
-
-    @JsonProperty("next")
-    public Next getNext() { return next; }
-    @JsonProperty("next")
-    public void setNext(Next value) { this.next = value; }
+    private Next next;
 
     @JsonProperty("value")
     public String getValue() { return value; }
     @JsonProperty("value")
     public void setValue(String value) { this.value = value; }
+
+    @JsonProperty("next")
+    public Next getNext() { return next; }
+    @JsonProperty("next")
+    public void setNext(Next value) { this.next = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java
index 22cab10..2889b0e 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private Next next;
     private String value;
-
-    @JsonProperty("next")
-    public Next getNext() { return next; }
-    @JsonProperty("next")
-    public void setNext(Next value) { this.next = value; }
+    private Next next;
 
     @JsonProperty("value")
     public String getValue() { return value; }
     @JsonProperty("value")
     public void setValue(String value) { this.value = value; }
+
+    @JsonProperty("next")
+    public Next getNext() { return next; }
+    @JsonProperty("next")
+    public void setNext(Next value) { this.next = value; }
 }
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java
index fe03561..5d18cbc 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -5,28 +5,13 @@ import java.util.List;
 import java.util.UUID;
 
 public class TopLevel {
-    private List<UUID> arrNullable;
-    private List<UUID> arrOne;
-    private UUID nullable;
     private UUID one;
     private UUID optional;
+    private UUID nullable;
+    private List<UUID> arrOne;
+    private List<UUID> arrNullable;
     private UnionWithEnumUnion unionWithEnum;
 
-    @JsonProperty("arrNullable")
-    public List<UUID> getArrNullable() { return arrNullable; }
-    @JsonProperty("arrNullable")
-    public void setArrNullable(List<UUID> value) { this.arrNullable = value; }
-
-    @JsonProperty("arrOne")
-    public List<UUID> getArrOne() { return arrOne; }
-    @JsonProperty("arrOne")
-    public void setArrOne(List<UUID> value) { this.arrOne = value; }
-
-    @JsonProperty("nullable")
-    public UUID getNullable() { return nullable; }
-    @JsonProperty("nullable")
-    public void setNullable(UUID value) { this.nullable = value; }
-
     @JsonProperty("one")
     public UUID getOne() { return one; }
     @JsonProperty("one")
@@ -37,6 +22,21 @@ public class TopLevel {
     @JsonProperty("optional")
     public void setOptional(UUID value) { this.optional = value; }
 
+    @JsonProperty("nullable")
+    public UUID getNullable() { return nullable; }
+    @JsonProperty("nullable")
+    public void setNullable(UUID value) { this.nullable = value; }
+
+    @JsonProperty("arrOne")
+    public List<UUID> getArrOne() { return arrOne; }
+    @JsonProperty("arrOne")
+    public void setArrOne(List<UUID> value) { this.arrOne = value; }
+
+    @JsonProperty("arrNullable")
+    public List<UUID> getArrNullable() { return arrNullable; }
+    @JsonProperty("arrNullable")
+    public void setArrNullable(List<UUID> value) { this.arrNullable = value; }
+
     @JsonProperty("unionWithEnum")
     public UnionWithEnumUnion getUnionWithEnum() { return unionWithEnum; }
     @JsonProperty("unionWithEnum")
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java
index fcddfc1..ca316d4 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java
@@ -19,8 +19,8 @@ public class Axis {
     private TitleOrient orient;
     private Double position;
     private Double tickCount;
-    private Boolean ticks;
     private Double tickSize;
+    private Boolean ticks;
     private String title;
     private Double titleMaxLength;
     private Double titlePadding;
@@ -206,14 +206,6 @@ public class Axis {
     @JsonProperty("tickCount")
     public void setTickCount(Double value) { this.tickCount = value; }
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    @JsonProperty("ticks")
-    public Boolean getTicks() { return ticks; }
-    @JsonProperty("ticks")
-    public void setTicks(Boolean value) { this.ticks = value; }
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -222,6 +214,14 @@ public class Axis {
     @JsonProperty("tickSize")
     public void setTickSize(Double value) { this.tickSize = value; }
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    @JsonProperty("ticks")
+    public Boolean getTicks() { return ticks; }
+    @JsonProperty("ticks")
+    public void setTicks(Boolean value) { this.ticks = value; }
+
     /**
      * A title for the field. If `null`, the title will be removed.
      *
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java
index 01c74e7..186dd65 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java
@@ -33,9 +33,9 @@ public class AxisConfig {
     private Boolean shortTimeLabels;
     private String tickColor;
     private Boolean tickRound;
-    private Boolean ticks;
     private Double tickSize;
     private Double tickWidth;
+    private Boolean ticks;
     private String titleAlign;
     private Double titleAngle;
     private String titleBaseline;
@@ -288,14 +288,6 @@ public class AxisConfig {
     @JsonProperty("tickRound")
     public void setTickRound(Boolean value) { this.tickRound = value; }
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    @JsonProperty("ticks")
-    public Boolean getTicks() { return ticks; }
-    @JsonProperty("ticks")
-    public void setTicks(Boolean value) { this.ticks = value; }
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -312,6 +304,14 @@ public class AxisConfig {
     @JsonProperty("tickWidth")
     public void setTickWidth(Double value) { this.tickWidth = value; }
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    @JsonProperty("ticks")
+    public Boolean getTicks() { return ticks; }
+    @JsonProperty("ticks")
+    public void setTicks(Boolean value) { this.ticks = value; }
+
     /**
      * Horizontal text alignment of axis titles.
      */
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java
index 07630d6..435eeda 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java
@@ -18,8 +18,8 @@ public class BarConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -147,6 +147,16 @@ public class BarConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -161,16 +171,6 @@ public class BarConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java
index 616bd74..a8c60f1 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java
@@ -31,8 +31,8 @@ public class MarkConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -130,6 +130,16 @@ public class MarkConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -144,16 +154,6 @@ public class MarkConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java
index 3f0f391..7fbf135 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java
@@ -13,8 +13,8 @@ public class MarkDef {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -122,6 +122,16 @@ public class MarkDef {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -136,16 +146,6 @@ public class MarkDef {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java
index ee45056..3b97814 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java
@@ -15,8 +15,8 @@ public class TextConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -115,6 +115,16 @@ public class TextConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -129,16 +139,6 @@ public class TextConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java
index bfe41ea..0389a57 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java
@@ -16,8 +16,8 @@ public class TickConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -126,6 +126,16 @@ public class TickConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -140,16 +150,6 @@ public class TickConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java
index f6ef6ea..6c3040e 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java
@@ -42,9 +42,9 @@ public class VGAxisConfig {
     private Double minExtent;
     private String tickColor;
     private Boolean tickRound;
-    private Boolean ticks;
     private Double tickSize;
     private Double tickWidth;
+    private Boolean ticks;
     private String titleAlign;
     private Double titleAngle;
     private String titleBaseline;
@@ -287,14 +287,6 @@ public class VGAxisConfig {
     @JsonProperty("tickRound")
     public void setTickRound(Boolean value) { this.tickRound = value; }
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    @JsonProperty("ticks")
-    public Boolean getTicks() { return ticks; }
-    @JsonProperty("ticks")
-    public void setTicks(Boolean value) { this.ticks = value; }
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -311,6 +303,14 @@ public class VGAxisConfig {
     @JsonProperty("tickWidth")
     public void setTickWidth(Double value) { this.tickWidth = value; }
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    @JsonProperty("ticks")
+    public Boolean getTicks() { return ticks; }
+    @JsonProperty("ticks")
+    public void setTicks(Boolean value) { this.ticks = value; }
+
     /**
      * Horizontal text alignment of axis titles.
      */
diff --git a/base/schema-java-lombok/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java
index e964325..16fb27f 100644
--- a/base/schema-java-lombok/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/accessors.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,15 +3,15 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private String barre;
+    private Union unionization;
     private Enum enumerification;
     private String Goo;
-    private Union unionization;
+    private String barre;
 
-    @JsonProperty("bar")
-    public String getBarre() { return barre; }
-    @JsonProperty("bar")
-    public void setBarre(String value) { this.barre = value; }
+    @JsonProperty("union")
+    public Union getUnionization() { return unionization; }
+    @JsonProperty("union")
+    public void setUnionization(Union value) { this.unionization = value; }
 
     @JsonProperty("enum")
     public Enum getEnumerification() { return enumerification; }
@@ -23,8 +23,8 @@ public class TopLevel {
     @JsonProperty("foo")
     public void setGoo(String value) { this.Goo = value; }
 
-    @JsonProperty("union")
-    public Union getUnionization() { return unionization; }
-    @JsonProperty("union")
-    public void setUnionization(Union value) { this.unionization = value; }
+    @JsonProperty("bar")
+    public String getBarre() { return barre; }
+    @JsonProperty("bar")
+    public void setBarre(String value) { this.barre = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java
index a100c1d..acaa89e 100644
--- a/base/schema-java-lombok/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/all-of-additional-properties-false.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.*;
 public class TopLevel {
     private double amount;
     private Frequency frequency;
-    private String description;
     private Type type;
+    private String description;
 
     @JsonProperty("amount")
     public double getAmount() { return amount; }
@@ -18,13 +18,13 @@ public class TopLevel {
     @JsonProperty("frequency")
     public void setFrequency(Frequency value) { this.frequency = value; }
 
-    @JsonProperty("description")
-    public String getDescription() { return description; }
-    @JsonProperty("description")
-    public void setDescription(String value) { this.description = value; }
-
     @JsonProperty("type")
     public Type getType() { return type; }
     @JsonProperty("type")
     public void setType(Type value) { this.type = value; }
+
+    @JsonProperty("description")
+    public String getDescription() { return description; }
+    @JsonProperty("description")
+    public void setDescription(String value) { this.description = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index bb0b0c9..6fd3825 100644
--- a/base/schema-java-lombok/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/bool-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,29 +4,14 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<String> arrNullable;
-    private List<String> arrOne;
-    private String nullable;
     private String one;
     private String optional;
+    private String nullable;
+    private List<String> arrOne;
+    private List<String> arrNullable;
     private UnionWithBool unionWithBool;
     private UnionWithBool unionWithBoolAndEnum;
 
-    @JsonProperty("arrNullable")
-    public List<String> getArrNullable() { return arrNullable; }
-    @JsonProperty("arrNullable")
-    public void setArrNullable(List<String> value) { this.arrNullable = value; }
-
-    @JsonProperty("arrOne")
-    public List<String> getArrOne() { return arrOne; }
-    @JsonProperty("arrOne")
-    public void setArrOne(List<String> value) { this.arrOne = value; }
-
-    @JsonProperty("nullable")
-    public String getNullable() { return nullable; }
-    @JsonProperty("nullable")
-    public void setNullable(String value) { this.nullable = value; }
-
     @JsonProperty("one")
     public String getOne() { return one; }
     @JsonProperty("one")
@@ -37,6 +22,21 @@ public class TopLevel {
     @JsonProperty("optional")
     public void setOptional(String value) { this.optional = value; }
 
+    @JsonProperty("nullable")
+    public String getNullable() { return nullable; }
+    @JsonProperty("nullable")
+    public void setNullable(String value) { this.nullable = value; }
+
+    @JsonProperty("arrOne")
+    public List<String> getArrOne() { return arrOne; }
+    @JsonProperty("arrOne")
+    public void setArrOne(List<String> value) { this.arrOne = value; }
+
+    @JsonProperty("arrNullable")
+    public List<String> getArrNullable() { return arrNullable; }
+    @JsonProperty("arrNullable")
+    public void setArrNullable(List<String> value) { this.arrNullable = value; }
+
     @JsonProperty("unionWithBool")
     public UnionWithBool getUnionWithBool() { return unionWithBool; }
     @JsonProperty("unionWithBool")
diff --git a/base/schema-java-lombok/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java
index e11e02a..e5cde4e 100644
--- a/base/schema-java-lombok/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/boolean-subschema.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,11 +4,16 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
+    private String foo;
     private Object disallowed;
     private List<Object> empty;
-    private String foo;
     private Object impossible;
 
+    @JsonProperty("foo")
+    public String getFoo() { return foo; }
+    @JsonProperty("foo")
+    public void setFoo(String value) { this.foo = value; }
+
     @JsonProperty("disallowed")
     public Object getDisallowed() { return disallowed; }
     @JsonProperty("disallowed")
@@ -19,11 +24,6 @@ public class TopLevel {
     @JsonProperty("empty")
     public void setEmpty(List<Object> value) { this.empty = value; }
 
-    @JsonProperty("foo")
-    public String getFoo() { return foo; }
-    @JsonProperty("foo")
-    public void setFoo(String value) { this.foo = value; }
-
     @JsonProperty("impossible")
     public Object getImpossible() { return impossible; }
     @JsonProperty("impossible")
diff --git a/base/schema-java-lombok/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java
index 9b9f456..1da47cb 100644
--- a/base/schema-java-lombok/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/comment-injection.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -17,10 +17,29 @@ import com.fasterxml.jackson.annotation.*;
  * }
  */
 public class TopLevel {
+    private String value;
     private String trailingBackslash;
     private String trailingQuote;
     private String trailingTripleQuote;
-    private String value;
+
+    /**
+     * Property delimiters:
+     * * /
+     * / *
+     * {-
+     * -}
+     * """
+     * </summary> & <br>
+     * }
+     * }
+     * }
+     * }
+     * }
+     */
+    @JsonProperty("value")
+    public String getValue() { return value; }
+    @JsonProperty("value")
+    public void setValue(String value) { this.value = value; }
 
     /**
      * Ends with a backslash \
@@ -45,23 +64,4 @@ public class TopLevel {
     public String getTrailingTripleQuote() { return trailingTripleQuote; }
     @JsonProperty("trailingTripleQuote")
     public void setTrailingTripleQuote(String value) { this.trailingTripleQuote = value; }
-
-    /**
-     * Property delimiters:
-     * * /
-     * / *
-     * {-
-     * -}
-     * """
-     * </summary> & <br>
-     * }
-     * }
-     * }
-     * }
-     * }
-     */
-    @JsonProperty("value")
-    public String getValue() { return value; }
-    @JsonProperty("value")
-    public void setValue(String value) { this.value = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index 286c4b6..d5bd9c5 100644
--- a/base/schema-java-lombok/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/const-non-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,17 +3,27 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private double version;
     private long amount;
+    private double ratio;
     private boolean enabled;
     private Kind kind;
-    private double ratio;
-    private double version;
+
+    @JsonProperty("version")
+    public double getVersion() { return version; }
+    @JsonProperty("version")
+    public void setVersion(double value) { this.version = value; }
 
     @JsonProperty("amount")
     public long getAmount() { return amount; }
     @JsonProperty("amount")
     public void setAmount(long value) { this.amount = value; }
 
+    @JsonProperty("ratio")
+    public double getRatio() { return ratio; }
+    @JsonProperty("ratio")
+    public void setRatio(double value) { this.ratio = value; }
+
     @JsonProperty("enabled")
     public boolean getEnabled() { return enabled; }
     @JsonProperty("enabled")
@@ -23,14 +33,4 @@ public class TopLevel {
     public Kind getKind() { return kind; }
     @JsonProperty("kind")
     public void setKind(Kind value) { this.kind = value; }
-
-    @JsonProperty("ratio")
-    public double getRatio() { return ratio; }
-    @JsonProperty("ratio")
-    public void setRatio(double value) { this.ratio = value; }
-
-    @JsonProperty("version")
-    public double getVersion() { return version; }
-    @JsonProperty("version")
-    public void setVersion(double value) { this.version = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index 618acb2..c6853b6 100644
--- a/base/schema-java-lombok/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/date-time-or-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,16 +4,16 @@ import com.fasterxml.jackson.annotation.*;
 import java.time.OffsetDateTime;
 
 public class TopLevel {
-    private BarUnion bar;
     private String foo;
-
-    @JsonProperty("bar")
-    public BarUnion getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(BarUnion value) { this.bar = value; }
+    private BarUnion bar;
 
     @JsonProperty("foo")
     public String getFoo() { return foo; }
     @JsonProperty("foo")
     public void setFoo(String value) { this.foo = value; }
+
+    @JsonProperty("bar")
+    public BarUnion getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(BarUnion value) { this.bar = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/date-time.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
index 1d752f9..9016ac2 100644
--- a/base/schema-java-lombok/test/inputs/schema/date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -7,34 +7,34 @@ import java.time.OffsetTime;
 import java.util.List;
 
 public class TopLevel {
-    private List<ComplexUnionArrayElement> complexUnionArray;
     private LocalDate date;
-    private OffsetDateTime dateTime;
     private OffsetTime time;
+    private OffsetDateTime dateTime;
     private List<UnionArray> unionArray;
-
-    @JsonProperty("complex-union-array")
-    public List<ComplexUnionArrayElement> getComplexUnionArray() { return complexUnionArray; }
-    @JsonProperty("complex-union-array")
-    public void setComplexUnionArray(List<ComplexUnionArrayElement> value) { this.complexUnionArray = value; }
+    private List<ComplexUnionArrayElement> complexUnionArray;
 
     @JsonProperty("date")
     public LocalDate getDate() { return date; }
     @JsonProperty("date")
     public void setDate(LocalDate value) { this.date = value; }
 
-    @JsonProperty("date-time")
-    public OffsetDateTime getDateTime() { return dateTime; }
-    @JsonProperty("date-time")
-    public void setDateTime(OffsetDateTime value) { this.dateTime = value; }
-
     @JsonProperty("time")
     public OffsetTime getTime() { return time; }
     @JsonProperty("time")
     public void setTime(OffsetTime value) { this.time = value; }
 
+    @JsonProperty("date-time")
+    public OffsetDateTime getDateTime() { return dateTime; }
+    @JsonProperty("date-time")
+    public void setDateTime(OffsetDateTime value) { this.dateTime = value; }
+
     @JsonProperty("union-array")
     public List<UnionArray> getUnionArray() { return unionArray; }
     @JsonProperty("union-array")
     public void setUnionArray(List<UnionArray> value) { this.unionArray = value; }
+
+    @JsonProperty("complex-union-array")
+    public List<ComplexUnionArrayElement> getComplexUnionArray() { return complexUnionArray; }
+    @JsonProperty("complex-union-array")
+    public void setComplexUnionArray(List<ComplexUnionArrayElement> value) { this.complexUnionArray = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java
index 0a86d38..e7d550d 100644
--- a/base/schema-java-lombok/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/description.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -7,19 +7,19 @@ import com.fasterxml.jackson.annotation.*;
  * Its description has two lines.
  */
 public class TopLevel {
-    private Boolean bar;
+    private Union union;
     private Enum topLevelEnum;
     private Double foo;
+    private Boolean bar;
     private ObjectOrStringUnion objectOrString;
-    private Union union;
 
     /**
-     * A pretty boolean
+     * Either a number or a string
      */
-    @JsonProperty("bar")
-    public Boolean getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(Boolean value) { this.bar = value; }
+    @JsonProperty("union")
+    public Union getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(Union value) { this.union = value; }
 
     /**
      * An enumeration
@@ -34,16 +34,16 @@ public class TopLevel {
     @JsonProperty("foo")
     public void setFoo(Double value) { this.foo = value; }
 
+    /**
+     * A pretty boolean
+     */
+    @JsonProperty("bar")
+    public Boolean getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(Boolean value) { this.bar = value; }
+
     @JsonProperty("object-or-string")
     public ObjectOrStringUnion getObjectOrString() { return objectOrString; }
     @JsonProperty("object-or-string")
     public void setObjectOrString(ObjectOrStringUnion value) { this.objectOrString = value; }
-
-    /**
-     * Either a number or a string
-     */
-    @JsonProperty("union")
-    public Union getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(Union value) { this.union = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java b/head/schema-java-lombok/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java
index dedc5c4..c0851ed 100644
--- a/base/schema-java-lombok/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java
+++ b/head/schema-java-lombok/test/inputs/schema/direct-union.schema/default/src/main/java/io/quicktype/Thing.java
@@ -5,16 +5,16 @@ import java.util.List;
 import java.util.Map;
 
 public class Thing {
-    private Anything optional;
     private Anything required;
-
-    @JsonProperty("optional")
-    public Anything getOptional() { return optional; }
-    @JsonProperty("optional")
-    public void setOptional(Anything value) { this.optional = value; }
+    private Anything optional;
 
     @JsonProperty("required")
     public Anything getRequired() { return required; }
     @JsonProperty("required")
     public void setRequired(Anything value) { this.required = value; }
+
+    @JsonProperty("optional")
+    public Anything getOptional() { return optional; }
+    @JsonProperty("optional")
+    public void setOptional(Anything value) { this.optional = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java
index b073986..119e7f4 100644
--- a/base/schema-java-lombok/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/enum.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,34 +4,34 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<Arr> arr;
-    private String topLevelFor;
-    private Gve gve;
     private Lvc lvc;
+    private Gve gve;
+    private List<Arr> arr;
     private List<OtherArr> otherArr;
+    private String topLevelFor;
 
-    @JsonProperty("arr")
-    public List<Arr> getArr() { return arr; }
-    @JsonProperty("arr")
-    public void setArr(List<Arr> value) { this.arr = value; }
-
-    @JsonProperty("for")
-    public String getTopLevelFor() { return topLevelFor; }
-    @JsonProperty("for")
-    public void setTopLevelFor(String value) { this.topLevelFor = value; }
+    @JsonProperty("lvc")
+    public Lvc getLvc() { return lvc; }
+    @JsonProperty("lvc")
+    public void setLvc(Lvc value) { this.lvc = value; }
 
     @JsonProperty("gve")
     public Gve getGve() { return gve; }
     @JsonProperty("gve")
     public void setGve(Gve value) { this.gve = value; }
 
-    @JsonProperty("lvc")
-    public Lvc getLvc() { return lvc; }
-    @JsonProperty("lvc")
-    public void setLvc(Lvc value) { this.lvc = value; }
+    @JsonProperty("arr")
+    public List<Arr> getArr() { return arr; }
+    @JsonProperty("arr")
+    public void setArr(List<Arr> value) { this.arr = value; }
 
     @JsonProperty("otherArr")
     public List<OtherArr> getOtherArr() { return otherArr; }
     @JsonProperty("otherArr")
     public void setOtherArr(List<OtherArr> value) { this.otherArr = value; }
+
+    @JsonProperty("for")
+    public String getTopLevelFor() { return topLevelFor; }
+    @JsonProperty("for")
+    public void setTopLevelFor(String value) { this.topLevelFor = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java
index 7408fbd..f5cbec8 100644
--- a/base/schema-java-lombok/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/integer-string.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,29 +4,14 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<String> arrNullable;
-    private List<String> arrOne;
-    private String nullable;
     private String one;
     private String optional;
+    private String nullable;
+    private List<String> arrOne;
+    private List<String> arrNullable;
     private UnionWithInt unionWithInt;
     private UnionWithInt unionWithIntAndEnum;
 
-    @JsonProperty("arrNullable")
-    public List<String> getArrNullable() { return arrNullable; }
-    @JsonProperty("arrNullable")
-    public void setArrNullable(List<String> value) { this.arrNullable = value; }
-
-    @JsonProperty("arrOne")
-    public List<String> getArrOne() { return arrOne; }
-    @JsonProperty("arrOne")
-    public void setArrOne(List<String> value) { this.arrOne = value; }
-
-    @JsonProperty("nullable")
-    public String getNullable() { return nullable; }
-    @JsonProperty("nullable")
-    public void setNullable(String value) { this.nullable = value; }
-
     @JsonProperty("one")
     public String getOne() { return one; }
     @JsonProperty("one")
@@ -37,6 +22,21 @@ public class TopLevel {
     @JsonProperty("optional")
     public void setOptional(String value) { this.optional = value; }
 
+    @JsonProperty("nullable")
+    public String getNullable() { return nullable; }
+    @JsonProperty("nullable")
+    public void setNullable(String value) { this.nullable = value; }
+
+    @JsonProperty("arrOne")
+    public List<String> getArrOne() { return arrOne; }
+    @JsonProperty("arrOne")
+    public void setArrOne(List<String> value) { this.arrOne = value; }
+
+    @JsonProperty("arrNullable")
+    public List<String> getArrNullable() { return arrNullable; }
+    @JsonProperty("arrNullable")
+    public void setArrNullable(List<String> value) { this.arrNullable = value; }
+
     @JsonProperty("unionWithInt")
     public UnionWithInt getUnionWithInt() { return unionWithInt; }
     @JsonProperty("unionWithInt")
diff --git a/base/schema-java-lombok/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java
index 94b3a3c..14c03b4 100644
--- a/base/schema-java-lombok/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/integer-type.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,15 +3,30 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private long smallPositive;
+    private long smallNegative;
+    private long i32Range;
     private long aboveI32Max;
     private long belowI32Min;
-    private long i32Range;
-    private long largeBounds;
-    private long onlyMaximum;
     private long onlyMinimum;
-    private long smallNegative;
-    private long smallPositive;
+    private long onlyMaximum;
     private long unbounded;
+    private long largeBounds;
+
+    @JsonProperty("small_positive")
+    public long getSmallPositive() { return smallPositive; }
+    @JsonProperty("small_positive")
+    public void setSmallPositive(long value) { this.smallPositive = value; }
+
+    @JsonProperty("small_negative")
+    public long getSmallNegative() { return smallNegative; }
+    @JsonProperty("small_negative")
+    public void setSmallNegative(long value) { this.smallNegative = value; }
+
+    @JsonProperty("i32_range")
+    public long getI32Range() { return i32Range; }
+    @JsonProperty("i32_range")
+    public void setI32Range(long value) { this.i32Range = value; }
 
     @JsonProperty("above_i32_max")
     public long getAboveI32Max() { return aboveI32Max; }
@@ -23,38 +38,23 @@ public class TopLevel {
     @JsonProperty("below_i32_min")
     public void setBelowI32Min(long value) { this.belowI32Min = value; }
 
-    @JsonProperty("i32_range")
-    public long getI32Range() { return i32Range; }
-    @JsonProperty("i32_range")
-    public void setI32Range(long value) { this.i32Range = value; }
-
-    @JsonProperty("large_bounds")
-    public long getLargeBounds() { return largeBounds; }
-    @JsonProperty("large_bounds")
-    public void setLargeBounds(long value) { this.largeBounds = value; }
-
-    @JsonProperty("only_maximum")
-    public long getOnlyMaximum() { return onlyMaximum; }
-    @JsonProperty("only_maximum")
-    public void setOnlyMaximum(long value) { this.onlyMaximum = value; }
-
     @JsonProperty("only_minimum")
     public long getOnlyMinimum() { return onlyMinimum; }
     @JsonProperty("only_minimum")
     public void setOnlyMinimum(long value) { this.onlyMinimum = value; }
 
-    @JsonProperty("small_negative")
-    public long getSmallNegative() { return smallNegative; }
-    @JsonProperty("small_negative")
-    public void setSmallNegative(long value) { this.smallNegative = value; }
-
-    @JsonProperty("small_positive")
-    public long getSmallPositive() { return smallPositive; }
-    @JsonProperty("small_positive")
-    public void setSmallPositive(long value) { this.smallPositive = value; }
+    @JsonProperty("only_maximum")
+    public long getOnlyMaximum() { return onlyMaximum; }
+    @JsonProperty("only_maximum")
+    public void setOnlyMaximum(long value) { this.onlyMaximum = value; }
 
     @JsonProperty("unbounded")
     public long getUnbounded() { return unbounded; }
     @JsonProperty("unbounded")
     public void setUnbounded(long value) { this.unbounded = value; }
+
+    @JsonProperty("large_bounds")
+    public long getLargeBounds() { return largeBounds; }
+    @JsonProperty("large_bounds")
+    public void setLargeBounds(long value) { this.largeBounds = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java b/head/schema-java-lombok/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java
index ed0c517..a754624 100644
--- a/base/schema-java-lombok/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java
+++ b/head/schema-java-lombok/test/inputs/schema/light.schema/default/src/main/java/io/quicktype/LightParams.java
@@ -3,20 +3,20 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class LightParams {
-    private String appID;
     private String outletID;
+    private String appID;
     private String rgba;
 
-    @JsonProperty("app_id")
-    public String getAppID() { return appID; }
-    @JsonProperty("app_id")
-    public void setAppID(String value) { this.appID = value; }
-
     @JsonProperty("outlet_id")
     public String getOutletID() { return outletID; }
     @JsonProperty("outlet_id")
     public void setOutletID(String value) { this.outletID = value; }
 
+    @JsonProperty("app_id")
+    public String getAppID() { return appID; }
+    @JsonProperty("app_id")
+    public void setAppID(String value) { this.appID = value; }
+
     @JsonProperty("rgba")
     public String getRGBA() { return rgba; }
     @JsonProperty("rgba")
diff --git a/base/schema-java-lombok/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java
index b9845d1..dca4117 100644
--- a/base/schema-java-lombok/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/min-max-items.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,12 +4,17 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
+    private List<String> minOnly;
     private List<Long> maxOnly;
     private List<Double> minAndMax;
-    private List<String> minOnly;
     private List<String> plain;
     private List<UnionItem> unionItems;
 
+    @JsonProperty("minOnly")
+    public List<String> getMinOnly() { return minOnly; }
+    @JsonProperty("minOnly")
+    public void setMinOnly(List<String> value) { this.minOnly = value; }
+
     @JsonProperty("maxOnly")
     public List<Long> getMaxOnly() { return maxOnly; }
     @JsonProperty("maxOnly")
@@ -20,11 +25,6 @@ public class TopLevel {
     @JsonProperty("minAndMax")
     public void setMinAndMax(List<Double> value) { this.minAndMax = value; }
 
-    @JsonProperty("minOnly")
-    public List<String> getMinOnly() { return minOnly; }
-    @JsonProperty("minOnly")
-    public void setMinOnly(List<String> value) { this.minOnly = value; }
-
     @JsonProperty("plain")
     public List<String> getPlain() { return plain; }
     @JsonProperty("plain")
diff --git a/base/schema-java-lombok/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java
index c415d2f..01c0db8 100644
--- a/base/schema-java-lombok/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/minmax-integer.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,51 +4,51 @@ import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
     private long free;
-    private long intersection;
-    private long max;
     private long min;
+    private long max;
     private long minmax;
-    private long minMaxIntersection;
-    private long minMaxUnion;
     private long union;
+    private long minMaxUnion;
+    private long intersection;
+    private long minMaxIntersection;
 
     @JsonProperty("free")
     public long getFree() { return free; }
     @JsonProperty("free")
     public void setFree(long value) { this.free = value; }
 
-    @JsonProperty("intersection")
-    public long getIntersection() { return intersection; }
-    @JsonProperty("intersection")
-    public void setIntersection(long value) { this.intersection = value; }
+    @JsonProperty("min")
+    public long getMin() { return min; }
+    @JsonProperty("min")
+    public void setMin(long value) { this.min = value; }
 
     @JsonProperty("max")
     public long getMax() { return max; }
     @JsonProperty("max")
     public void setMax(long value) { this.max = value; }
 
-    @JsonProperty("min")
-    public long getMin() { return min; }
-    @JsonProperty("min")
-    public void setMin(long value) { this.min = value; }
-
     @JsonProperty("minmax")
     public long getMinmax() { return minmax; }
     @JsonProperty("minmax")
     public void setMinmax(long value) { this.minmax = value; }
 
-    @JsonProperty("minMaxIntersection")
-    public long getMinMaxIntersection() { return minMaxIntersection; }
-    @JsonProperty("minMaxIntersection")
-    public void setMinMaxIntersection(long value) { this.minMaxIntersection = value; }
+    @JsonProperty("union")
+    public long getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(long value) { this.union = value; }
 
     @JsonProperty("minMaxUnion")
     public long getMinMaxUnion() { return minMaxUnion; }
     @JsonProperty("minMaxUnion")
     public void setMinMaxUnion(long value) { this.minMaxUnion = value; }
 
-    @JsonProperty("union")
-    public long getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(long value) { this.union = value; }
+    @JsonProperty("intersection")
+    public long getIntersection() { return intersection; }
+    @JsonProperty("intersection")
+    public void setIntersection(long value) { this.intersection = value; }
+
+    @JsonProperty("minMaxIntersection")
+    public long getMinMaxIntersection() { return minMaxIntersection; }
+    @JsonProperty("minMaxIntersection")
+    public void setMinMaxIntersection(long value) { this.minMaxIntersection = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java
index 7a80941..d85c4fe 100644
--- a/base/schema-java-lombok/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/minmax.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,51 +4,51 @@ import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
     private double free;
-    private double intersection;
-    private double max;
     private double min;
+    private double max;
     private double minmax;
-    private double minMaxIntersection;
-    private double minMaxUnion;
     private double union;
+    private double minMaxUnion;
+    private double intersection;
+    private double minMaxIntersection;
 
     @JsonProperty("free")
     public double getFree() { return free; }
     @JsonProperty("free")
     public void setFree(double value) { this.free = value; }
 
-    @JsonProperty("intersection")
-    public double getIntersection() { return intersection; }
-    @JsonProperty("intersection")
-    public void setIntersection(double value) { this.intersection = value; }
+    @JsonProperty("min")
+    public double getMin() { return min; }
+    @JsonProperty("min")
+    public void setMin(double value) { this.min = value; }
 
     @JsonProperty("max")
     public double getMax() { return max; }
     @JsonProperty("max")
     public void setMax(double value) { this.max = value; }
 
-    @JsonProperty("min")
-    public double getMin() { return min; }
-    @JsonProperty("min")
-    public void setMin(double value) { this.min = value; }
-
     @JsonProperty("minmax")
     public double getMinmax() { return minmax; }
     @JsonProperty("minmax")
     public void setMinmax(double value) { this.minmax = value; }
 
-    @JsonProperty("minMaxIntersection")
-    public double getMinMaxIntersection() { return minMaxIntersection; }
-    @JsonProperty("minMaxIntersection")
-    public void setMinMaxIntersection(double value) { this.minMaxIntersection = value; }
+    @JsonProperty("union")
+    public double getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(double value) { this.union = value; }
 
     @JsonProperty("minMaxUnion")
     public double getMinMaxUnion() { return minMaxUnion; }
     @JsonProperty("minMaxUnion")
     public void setMinMaxUnion(double value) { this.minMaxUnion = value; }
 
-    @JsonProperty("union")
-    public double getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(double value) { this.union = value; }
+    @JsonProperty("intersection")
+    public double getIntersection() { return intersection; }
+    @JsonProperty("intersection")
+    public void setIntersection(double value) { this.intersection = value; }
+
+    @JsonProperty("minMaxIntersection")
+    public double getMinMaxIntersection() { return minMaxIntersection; }
+    @JsonProperty("minMaxIntersection")
+    public void setMinMaxIntersection(double value) { this.minMaxIntersection = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
index 98d223e..bc5e348 100644
--- a/base/schema-java-lombok/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,52 +3,52 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private String intersection;
-    private InUnion inUnion;
-    private String maxlength;
     private String minlength;
-    private String minMaxIntersection;
+    private String maxlength;
     private String minmaxlength;
-    private String minMaxUnion;
     private String union;
-
-    @JsonProperty("intersection")
-    public String getIntersection() { return intersection; }
-    @JsonProperty("intersection")
-    public void setIntersection(String value) { this.intersection = value; }
-
-    @JsonProperty("inUnion")
-    public InUnion getInUnion() { return inUnion; }
-    @JsonProperty("inUnion")
-    public void setInUnion(InUnion value) { this.inUnion = value; }
-
-    @JsonProperty("maxlength")
-    public String getMaxlength() { return maxlength; }
-    @JsonProperty("maxlength")
-    public void setMaxlength(String value) { this.maxlength = value; }
+    private InUnion inUnion;
+    private String minMaxUnion;
+    private String intersection;
+    private String minMaxIntersection;
 
     @JsonProperty("minlength")
     public String getMinlength() { return minlength; }
     @JsonProperty("minlength")
     public void setMinlength(String value) { this.minlength = value; }
 
-    @JsonProperty("minMaxIntersection")
-    public String getMinMaxIntersection() { return minMaxIntersection; }
-    @JsonProperty("minMaxIntersection")
-    public void setMinMaxIntersection(String value) { this.minMaxIntersection = value; }
+    @JsonProperty("maxlength")
+    public String getMaxlength() { return maxlength; }
+    @JsonProperty("maxlength")
+    public void setMaxlength(String value) { this.maxlength = value; }
 
     @JsonProperty("minmaxlength")
     public String getMinmaxlength() { return minmaxlength; }
     @JsonProperty("minmaxlength")
     public void setMinmaxlength(String value) { this.minmaxlength = value; }
 
+    @JsonProperty("union")
+    public String getUnion() { return union; }
+    @JsonProperty("union")
+    public void setUnion(String value) { this.union = value; }
+
+    @JsonProperty("inUnion")
+    public InUnion getInUnion() { return inUnion; }
+    @JsonProperty("inUnion")
+    public void setInUnion(InUnion value) { this.inUnion = value; }
+
     @JsonProperty("minMaxUnion")
     public String getMinMaxUnion() { return minMaxUnion; }
     @JsonProperty("minMaxUnion")
     public void setMinMaxUnion(String value) { this.minMaxUnion = value; }
 
-    @JsonProperty("union")
-    public String getUnion() { return union; }
-    @JsonProperty("union")
-    public void setUnion(String value) { this.union = value; }
+    @JsonProperty("intersection")
+    public String getIntersection() { return intersection; }
+    @JsonProperty("intersection")
+    public void setIntersection(String value) { this.intersection = value; }
+
+    @JsonProperty("minMaxIntersection")
+    public String getMinMaxIntersection() { return minMaxIntersection; }
+    @JsonProperty("minMaxIntersection")
+    public void setMinMaxIntersection(String value) { this.minMaxIntersection = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
index 54a446b..57943c4 100644
--- a/base/schema-java-lombok/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/non-standard-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,20 +3,20 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private long bar;
     private long foo;
+    private long bar;
     private boolean quux;
 
-    @JsonProperty("bar")
-    public long getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(long value) { this.bar = value; }
-
     @JsonProperty("foo")
     public long getFoo() { return foo; }
     @JsonProperty("foo")
     public void setFoo(long value) { this.foo = value; }
 
+    @JsonProperty("bar")
+    public long getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(long value) { this.bar = value; }
+
     @JsonProperty("quux")
     public boolean getQuux() { return quux; }
     @JsonProperty("quux")
diff --git a/base/schema-java-lombok/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java
index fbcc9c9..1ed4acb 100644
--- a/base/schema-java-lombok/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/nullable-optional-one-of.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private String b;
     private Kind kind;
-
-    @JsonProperty("b")
-    public String getB() { return b; }
-    @JsonProperty("b")
-    public void setB(String value) { this.b = value; }
+    private String b;
 
     @JsonProperty("kind")
     public Kind getKind() { return kind; }
     @JsonProperty("kind")
     public void setKind(Kind value) { this.kind = value; }
+
+    @JsonProperty("b")
+    public String getB() { return b; }
+    @JsonProperty("b")
+    public void setB(String value) { this.b = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java
index 3a7506d..281518a 100644
--- a/base/schema-java-lombok/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/optional-any.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private boolean bar;
     private Object foo;
-
-    @JsonProperty("bar")
-    public boolean getBar() { return bar; }
-    @JsonProperty("bar")
-    public void setBar(boolean value) { this.bar = value; }
+    private boolean bar;
 
     @JsonProperty("foo")
     public Object getFoo() { return foo; }
     @JsonProperty("foo")
     public void setFoo(Object value) { this.foo = value; }
+
+    @JsonProperty("bar")
+    public boolean getBar() { return bar; }
+    @JsonProperty("bar")
+    public void setBar(boolean value) { this.bar = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
index e75b053..00c67a5 100644
--- a/base/schema-java-lombok/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/optional-const-ref.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -5,45 +5,45 @@ import java.util.List;
 
 public class TopLevel {
     private List<Coordinate> coordinates;
-    private Long count;
-    private String label;
     private List<Coordinate> requiredCoordinates;
+    private Long count;
     private long requiredCount;
-    private String requiredLabel;
     private Double weight;
+    private String label;
+    private String requiredLabel;
 
     @JsonProperty("coordinates")
     public List<Coordinate> getCoordinates() { return coordinates; }
     @JsonProperty("coordinates")
     public void setCoordinates(List<Coordinate> value) { this.coordinates = value; }
 
-    @JsonProperty("count")
-    public Long getCount() { return count; }
-    @JsonProperty("count")
-    public void setCount(Long value) { this.count = value; }
-
-    @JsonProperty("label")
-    public String getLabel() { return label; }
-    @JsonProperty("label")
-    public void setLabel(String value) { this.label = value; }
-
     @JsonProperty("requiredCoordinates")
     public List<Coordinate> getRequiredCoordinates() { return requiredCoordinates; }
     @JsonProperty("requiredCoordinates")
     public void setRequiredCoordinates(List<Coordinate> value) { this.requiredCoordinates = value; }
 
+    @JsonProperty("count")
+    public Long getCount() { return count; }
+    @JsonProperty("count")
+    public void setCount(Long value) { this.count = value; }
+
     @JsonProperty("requiredCount")
     public long getRequiredCount() { return requiredCount; }
     @JsonProperty("requiredCount")
     public void setRequiredCount(long value) { this.requiredCount = value; }
 
-    @JsonProperty("requiredLabel")
-    public String getRequiredLabel() { return requiredLabel; }
-    @JsonProperty("requiredLabel")
-    public void setRequiredLabel(String value) { this.requiredLabel = value; }
-
     @JsonProperty("weight")
     public Double getWeight() { return weight; }
     @JsonProperty("weight")
     public void setWeight(Double value) { this.weight = value; }
+
+    @JsonProperty("label")
+    public String getLabel() { return label; }
+    @JsonProperty("label")
+    public void setLabel(String value) { this.label = value; }
+
+    @JsonProperty("requiredLabel")
+    public String getRequiredLabel() { return requiredLabel; }
+    @JsonProperty("requiredLabel")
+    public void setRequiredLabel(String value) { this.requiredLabel = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java
index ff87686..51f7e05 100644
--- a/base/schema-java-lombok/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/optional-constraints.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,34 +3,34 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private Double optDouble;
+    private long reqZeroMin;
     private Long optInt;
-    private String optPattern;
+    private Double optDouble;
     private String optString;
-    private long reqZeroMin;
+    private String optPattern;
 
-    @JsonProperty("optDouble")
-    public Double getOptDouble() { return optDouble; }
-    @JsonProperty("optDouble")
-    public void setOptDouble(Double value) { this.optDouble = value; }
+    @JsonProperty("reqZeroMin")
+    public long getReqZeroMin() { return reqZeroMin; }
+    @JsonProperty("reqZeroMin")
+    public void setReqZeroMin(long value) { this.reqZeroMin = value; }
 
     @JsonProperty("optInt")
     public Long getOptInt() { return optInt; }
     @JsonProperty("optInt")
     public void setOptInt(Long value) { this.optInt = value; }
 
-    @JsonProperty("optPattern")
-    public String getOptPattern() { return optPattern; }
-    @JsonProperty("optPattern")
-    public void setOptPattern(String value) { this.optPattern = value; }
+    @JsonProperty("optDouble")
+    public Double getOptDouble() { return optDouble; }
+    @JsonProperty("optDouble")
+    public void setOptDouble(Double value) { this.optDouble = value; }
 
     @JsonProperty("optString")
     public String getOptString() { return optString; }
     @JsonProperty("optString")
     public void setOptString(String value) { this.optString = value; }
 
-    @JsonProperty("reqZeroMin")
-    public long getReqZeroMin() { return reqZeroMin; }
-    @JsonProperty("reqZeroMin")
-    public void setReqZeroMin(long value) { this.reqZeroMin = value; }
+    @JsonProperty("optPattern")
+    public String getOptPattern() { return optPattern; }
+    @JsonProperty("optPattern")
+    public void setOptPattern(String value) { this.optPattern = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
index 03cc470..1fc65ac 100644
--- a/base/schema-java-lombok/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/optional-date-time.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -6,40 +6,40 @@ import java.time.OffsetDateTime;
 import java.time.OffsetTime;
 
 public class TopLevel {
-    private LocalDate optionalDate;
-    private OffsetDateTime optionalDateTime;
-    private OffsetTime optionalTime;
     private LocalDate requiredDate;
-    private OffsetDateTime requiredDateTime;
     private OffsetTime requiredTime;
-
-    @JsonProperty("optional-date")
-    public LocalDate getOptionalDate() { return optionalDate; }
-    @JsonProperty("optional-date")
-    public void setOptionalDate(LocalDate value) { this.optionalDate = value; }
-
-    @JsonProperty("optional-date-time")
-    public OffsetDateTime getOptionalDateTime() { return optionalDateTime; }
-    @JsonProperty("optional-date-time")
-    public void setOptionalDateTime(OffsetDateTime value) { this.optionalDateTime = value; }
-
-    @JsonProperty("optional-time")
-    public OffsetTime getOptionalTime() { return optionalTime; }
-    @JsonProperty("optional-time")
-    public void setOptionalTime(OffsetTime value) { this.optionalTime = value; }
+    private OffsetDateTime requiredDateTime;
+    private LocalDate optionalDate;
+    private OffsetTime optionalTime;
+    private OffsetDateTime optionalDateTime;
 
     @JsonProperty("required-date")
     public LocalDate getRequiredDate() { return requiredDate; }
     @JsonProperty("required-date")
     public void setRequiredDate(LocalDate value) { this.requiredDate = value; }
 
+    @JsonProperty("required-time")
+    public OffsetTime getRequiredTime() { return requiredTime; }
+    @JsonProperty("required-time")
+    public void setRequiredTime(OffsetTime value) { this.requiredTime = value; }
+
     @JsonProperty("required-date-time")
     public OffsetDateTime getRequiredDateTime() { return requiredDateTime; }
     @JsonProperty("required-date-time")
     public void setRequiredDateTime(OffsetDateTime value) { this.requiredDateTime = value; }
 
-    @JsonProperty("required-time")
-    public OffsetTime getRequiredTime() { return requiredTime; }
-    @JsonProperty("required-time")
-    public void setRequiredTime(OffsetTime value) { this.requiredTime = value; }
+    @JsonProperty("optional-date")
+    public LocalDate getOptionalDate() { return optionalDate; }
+    @JsonProperty("optional-date")
+    public void setOptionalDate(LocalDate value) { this.optionalDate = value; }
+
+    @JsonProperty("optional-time")
+    public OffsetTime getOptionalTime() { return optionalTime; }
+    @JsonProperty("optional-time")
+    public void setOptionalTime(OffsetTime value) { this.optionalTime = value; }
+
+    @JsonProperty("optional-date-time")
+    public OffsetDateTime getOptionalDateTime() { return optionalDateTime; }
+    @JsonProperty("optional-date-time")
+    public void setOptionalDateTime(OffsetDateTime value) { this.optionalDateTime = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java
index c45ac58..742abe3 100644
--- a/base/schema-java-lombok/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/prefix-items.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -4,16 +4,16 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class TopLevel {
-    private List<Open> open;
     private List<Open> tuple;
-
-    @JsonProperty("open")
-    public List<Open> getOpen() { return open; }
-    @JsonProperty("open")
-    public void setOpen(List<Open> value) { this.open = value; }
+    private List<Open> open;
 
     @JsonProperty("tuple")
     public List<Open> getTuple() { return tuple; }
     @JsonProperty("tuple")
     public void setTuple(List<Open> value) { this.tuple = value; }
+
+    @JsonProperty("open")
+    public List<Open> getOpen() { return open; }
+    @JsonProperty("open")
+    public void setOpen(List<Open> value) { this.open = value; }
 }
diff --git a/head/schema-java-lombok/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Converter.java b/head/schema-java-lombok/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Converter.java
new file mode 100644
index 0000000..a8eb236
--- /dev/null
+++ b/head/schema-java-lombok/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Converter.java
@@ -0,0 +1,101 @@
+// To use this code, add the following Maven dependency to your project:
+//
+//
+//     com.fasterxml.jackson.core     : jackson-databind          : 2.9.0
+//     com.fasterxml.jackson.datatype : jackson-datatype-jsr310   : 2.9.0
+//
+// Import this package:
+//
+//     import io.quicktype.Converter;
+//
+// Then you can deserialize a JSON string with
+//
+//     TopLevel data = Converter.fromJsonString(jsonString);
+
+package io.quicktype;
+
+import java.io.IOException;
+import com.fasterxml.jackson.databind.*;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.util.*;
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.temporal.ChronoField;
+
+public class Converter {
+    // Date-time helpers
+
+    private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()
+            .appendOptional(DateTimeFormatter.ISO_DATE_TIME)
+            .appendOptional(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
+            .appendOptional(DateTimeFormatter.ISO_INSTANT)
+            .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SX"))
+            .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssX"))
+            .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
+            .toFormatter()
+            .withZone(ZoneOffset.UTC);
+
+    public static OffsetDateTime parseDateTimeString(String str) {
+        return ZonedDateTime.from(Converter.DATE_TIME_FORMATTER.parse(str)).toOffsetDateTime();
+    }
+
+    private static final DateTimeFormatter TIME_FORMATTER = new DateTimeFormatterBuilder()
+            .appendOptional(DateTimeFormatter.ISO_TIME)
+            .appendOptional(DateTimeFormatter.ISO_OFFSET_TIME)
+            .parseDefaulting(ChronoField.YEAR, 2020)
+            .parseDefaulting(ChronoField.MONTH_OF_YEAR, 1)
+            .parseDefaulting(ChronoField.DAY_OF_MONTH, 1)
+            .toFormatter()
+            .withZone(ZoneOffset.UTC);
+
+    public static OffsetTime parseTimeString(String str) {
+        return ZonedDateTime.from(Converter.TIME_FORMATTER.parse(str)).toOffsetDateTime().toOffsetTime();
+    }
+    // Serialize/deserialize helpers
+
+    public static TopLevel fromJsonString(String json) throws IOException {
+        return getObjectReader().readValue(json);
+    }
+
+    public static String toJsonString(TopLevel obj) throws JsonProcessingException {
+        return getObjectWriter().writeValueAsString(obj);
+    }
+
+    private static ObjectReader reader;
+    private static ObjectWriter writer;
+
+    private static void instantiateMapper() {
+        ObjectMapper mapper = new ObjectMapper();
+        mapper.findAndRegisterModules();
+        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+        mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
+        SimpleModule module = new SimpleModule();
+        module.addDeserializer(OffsetDateTime.class, new JsonDeserializer<OffsetDateTime>() {
+            @Override
+            public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
+                String value = jsonParser.getText();
+                return Converter.parseDateTimeString(value);
+            }
+        });
+        mapper.registerModule(module);
+        reader = mapper.readerFor(TopLevel.class);
+        writer = mapper.writerFor(TopLevel.class);
+    }
+
+    private static ObjectReader getObjectReader() {
+        if (reader == null) instantiateMapper();
+        return reader;
+    }
+
+    private static ObjectWriter getObjectWriter() {
+        if (writer == null) instantiateMapper();
+        return writer;
+    }
+}
diff --git a/head/schema-java-lombok/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Ordered.java b/head/schema-java-lombok/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Ordered.java
new file mode 100644
index 0000000..6f3edc8
--- /dev/null
+++ b/head/schema-java-lombok/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/Ordered.java
@@ -0,0 +1,24 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class Ordered {
+    private double mango;
+    private String zebra;
+    private boolean apple;
+
+    @JsonProperty("mango")
+    public double getMango() { return mango; }
+    @JsonProperty("mango")
+    public void setMango(double value) { this.mango = value; }
+
+    @JsonProperty("zebra")
+    public String getZebra() { return zebra; }
+    @JsonProperty("zebra")
+    public void setZebra(String value) { this.zebra = value; }
+
+    @JsonProperty("apple")
+    public boolean getApple() { return apple; }
+    @JsonProperty("apple")
+    public void setApple(boolean value) { this.apple = value; }
+}
diff --git a/head/schema-java-lombok/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/TopLevel.java
new file mode 100644
index 0000000..4629f64
--- /dev/null
+++ b/head/schema-java-lombok/test/inputs/schema/property-order.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -0,0 +1,42 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class TopLevel {
+    private String zebra;
+    private double mango;
+    private boolean apple;
+    private String delta;
+    private long banana;
+    private Ordered ordered;
+
+    @JsonProperty("zebra")
+    public String getZebra() { return zebra; }
+    @JsonProperty("zebra")
+    public void setZebra(String value) { this.zebra = value; }
+
+    @JsonProperty("mango")
+    public double getMango() { return mango; }
+    @JsonProperty("mango")
+    public void setMango(double value) { this.mango = value; }
+
+    @JsonProperty("apple")
+    public boolean getApple() { return apple; }
+    @JsonProperty("apple")
+    public void setApple(boolean value) { this.apple = value; }
+
+    @JsonProperty("delta")
+    public String getDelta() { return delta; }
+    @JsonProperty("delta")
+    public void setDelta(String value) { this.delta = value; }
+
+    @JsonProperty("banana")
+    public long getBanana() { return banana; }
+    @JsonProperty("banana")
+    public void setBanana(long value) { this.banana = value; }
+
+    @JsonProperty("ordered")
+    public Ordered getOrdered() { return ordered; }
+    @JsonProperty("ordered")
+    public void setOrdered(Ordered value) { this.ordered = value; }
+}
diff --git a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java
index 57a4e6f..6b37145 100644
--- a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java
+++ b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Berry.java
@@ -4,20 +4,20 @@ import com.fasterxml.jackson.annotation.*;
 import java.util.List;
 
 public class Berry {
-    private Color color;
     private String name;
+    private Color color;
     private List<Shape> shapes;
 
-    @JsonProperty("color")
-    public Color getColor() { return color; }
-    @JsonProperty("color")
-    public void setColor(Color value) { this.color = value; }
-
     @JsonProperty("name")
     public String getName() { return name; }
     @JsonProperty("name")
     public void setName(String value) { this.name = value; }
 
+    @JsonProperty("color")
+    public Color getColor() { return color; }
+    @JsonProperty("color")
+    public void setColor(Color value) { this.color = value; }
+
     @JsonProperty("shapes")
     public List<Shape> getShapes() { return shapes; }
     @JsonProperty("shapes")
diff --git a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java
index 57f8d97..4e11b04 100644
--- a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java
+++ b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Fruit.java
@@ -5,21 +5,21 @@ import java.util.List;
 
 public class Fruit {
     private Boolean apple;
-    private List<Berry> berries;
     private Boolean orange;
+    private List<Berry> berries;
 
     @JsonProperty("apple")
     public Boolean getApple() { return apple; }
     @JsonProperty("apple")
     public void setApple(Boolean value) { this.apple = value; }
 
-    @JsonProperty("berries")
-    public List<Berry> getBerries() { return berries; }
-    @JsonProperty("berries")
-    public void setBerries(List<Berry> value) { this.berries = value; }
-
     @JsonProperty("orange")
     public Boolean getOrange() { return orange; }
     @JsonProperty("orange")
     public void setOrange(Boolean value) { this.orange = value; }
+
+    @JsonProperty("berries")
+    public List<Berry> getBerries() { return berries; }
+    @JsonProperty("berries")
+    public void setBerries(List<Berry> value) { this.berries = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java
index 008a89a..c076a76 100644
--- a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java
+++ b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Limit.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Limit {
-    private Double maximum;
     private Double minimum;
-
-    @JsonProperty("maximum")
-    public Double getMaximum() { return maximum; }
-    @JsonProperty("maximum")
-    public void setMaximum(Double value) { this.maximum = value; }
+    private Double maximum;
 
     @JsonProperty("minimum")
     public Double getMinimum() { return minimum; }
     @JsonProperty("minimum")
     public void setMinimum(Double value) { this.minimum = value; }
+
+    @JsonProperty("maximum")
+    public Double getMaximum() { return maximum; }
+    @JsonProperty("maximum")
+    public void setMaximum(Double value) { this.maximum = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java
index 26d2a78..1beb8c5 100644
--- a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java
+++ b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Part.java
@@ -3,14 +3,9 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Part {
-    private String depth;
     private String length;
     private String width;
-
-    @JsonProperty("depth")
-    public String getDepth() { return depth; }
-    @JsonProperty("depth")
-    public void setDepth(String value) { this.depth = value; }
+    private String depth;
 
     @JsonProperty("length")
     public String getLength() { return length; }
@@ -21,4 +16,9 @@ public class Part {
     public String getWidth() { return width; }
     @JsonProperty("width")
     public void setWidth(String value) { this.width = value; }
+
+    @JsonProperty("depth")
+    public String getDepth() { return depth; }
+    @JsonProperty("depth")
+    public void setDepth(String value) { this.depth = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java
index acf3e9b..382496b 100644
--- a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java
+++ b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Shape.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Shape {
-    private Geometry geometry;
     private History history;
-
-    @JsonProperty("geometry")
-    public Geometry getGeometry() { return geometry; }
-    @JsonProperty("geometry")
-    public void setGeometry(Geometry value) { this.geometry = value; }
+    private Geometry geometry;
 
     @JsonProperty("history")
     public History getHistory() { return history; }
     @JsonProperty("history")
     public void setHistory(History value) { this.history = value; }
+
+    @JsonProperty("geometry")
+    public Geometry getGeometry() { return geometry; }
+    @JsonProperty("geometry")
+    public void setGeometry(Geometry value) { this.geometry = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java
index f0be159..f18d133 100644
--- a/base/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java
+++ b/head/schema-java-lombok/test/inputs/schema/renaming-bug.schema/default/src/main/java/io/quicktype/Vehicle.java
@@ -3,40 +3,40 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Vehicle {
-    private String brand;
     private String id;
-    private Speed speed;
-    private Boolean subModule;
     private VehicleType type;
+    private Speed speed;
     private String year;
-
-    @JsonProperty("brand")
-    public String getBrand() { return brand; }
-    @JsonProperty("brand")
-    public void setBrand(String value) { this.brand = value; }
+    private String brand;
+    private Boolean subModule;
 
     @JsonProperty("id")
     public String getID() { return id; }
     @JsonProperty("id")
     public void setID(String value) { this.id = value; }
 
-    @JsonProperty("speed")
-    public Speed getSpeed() { return speed; }
-    @JsonProperty("speed")
-    public void setSpeed(Speed value) { this.speed = value; }
-
-    @JsonProperty("subModule")
-    public Boolean getSubModule() { return subModule; }
-    @JsonProperty("subModule")
-    public void setSubModule(Boolean value) { this.subModule = value; }
-
     @JsonProperty("type")
     public VehicleType getType() { return type; }
     @JsonProperty("type")
     public void setType(VehicleType value) { this.type = value; }
 
+    @JsonProperty("speed")
+    public Speed getSpeed() { return speed; }
+    @JsonProperty("speed")
+    public void setSpeed(Speed value) { this.speed = value; }
+
     @JsonProperty("year")
     public String getYear() { return year; }
     @JsonProperty("year")
     public void setYear(String value) { this.year = value; }
+
+    @JsonProperty("brand")
+    public String getBrand() { return brand; }
+    @JsonProperty("brand")
+    public void setBrand(String value) { this.brand = value; }
+
+    @JsonProperty("subModule")
+    public Boolean getSubModule() { return subModule; }
+    @JsonProperty("subModule")
+    public void setSubModule(Boolean value) { this.subModule = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java b/head/schema-java-lombok/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java
index f7fcf3b..7d6b5fd 100644
--- a/base/schema-java-lombok/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java
+++ b/head/schema-java-lombok/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/Node.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class Node {
-    private Next next;
     private String value;
-
-    @JsonProperty("next")
-    public Next getNext() { return next; }
-    @JsonProperty("next")
-    public void setNext(Next value) { this.next = value; }
+    private Next next;
 
     @JsonProperty("value")
     public String getValue() { return value; }
     @JsonProperty("value")
     public void setValue(String value) { this.value = value; }
+
+    @JsonProperty("next")
+    public Next getNext() { return next; }
+    @JsonProperty("next")
+    public void setNext(Next value) { this.next = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java
index 22cab10..2889b0e 100644
--- a/base/schema-java-lombok/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/rust-cycle-breaker-union.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,16 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
-    private Next next;
     private String value;
-
-    @JsonProperty("next")
-    public Next getNext() { return next; }
-    @JsonProperty("next")
-    public void setNext(Next value) { this.next = value; }
+    private Next next;
 
     @JsonProperty("value")
     public String getValue() { return value; }
     @JsonProperty("value")
     public void setValue(String value) { this.value = value; }
+
+    @JsonProperty("next")
+    public Next getNext() { return next; }
+    @JsonProperty("next")
+    public void setNext(Next value) { this.next = value; }
 }
diff --git a/base/schema-java-lombok/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java
index fe03561..5d18cbc 100644
--- a/base/schema-java-lombok/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/uuid.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -5,28 +5,13 @@ import java.util.List;
 import java.util.UUID;
 
 public class TopLevel {
-    private List<UUID> arrNullable;
-    private List<UUID> arrOne;
-    private UUID nullable;
     private UUID one;
     private UUID optional;
+    private UUID nullable;
+    private List<UUID> arrOne;
+    private List<UUID> arrNullable;
     private UnionWithEnumUnion unionWithEnum;
 
-    @JsonProperty("arrNullable")
-    public List<UUID> getArrNullable() { return arrNullable; }
-    @JsonProperty("arrNullable")
-    public void setArrNullable(List<UUID> value) { this.arrNullable = value; }
-
-    @JsonProperty("arrOne")
-    public List<UUID> getArrOne() { return arrOne; }
-    @JsonProperty("arrOne")
-    public void setArrOne(List<UUID> value) { this.arrOne = value; }
-
-    @JsonProperty("nullable")
-    public UUID getNullable() { return nullable; }
-    @JsonProperty("nullable")
-    public void setNullable(UUID value) { this.nullable = value; }
-
     @JsonProperty("one")
     public UUID getOne() { return one; }
     @JsonProperty("one")
@@ -37,6 +22,21 @@ public class TopLevel {
     @JsonProperty("optional")
     public void setOptional(UUID value) { this.optional = value; }
 
+    @JsonProperty("nullable")
+    public UUID getNullable() { return nullable; }
+    @JsonProperty("nullable")
+    public void setNullable(UUID value) { this.nullable = value; }
+
+    @JsonProperty("arrOne")
+    public List<UUID> getArrOne() { return arrOne; }
+    @JsonProperty("arrOne")
+    public void setArrOne(List<UUID> value) { this.arrOne = value; }
+
+    @JsonProperty("arrNullable")
+    public List<UUID> getArrNullable() { return arrNullable; }
+    @JsonProperty("arrNullable")
+    public void setArrNullable(List<UUID> value) { this.arrNullable = value; }
+
     @JsonProperty("unionWithEnum")
     public UnionWithEnumUnion getUnionWithEnum() { return unionWithEnum; }
     @JsonProperty("unionWithEnum")
diff --git a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java
index fcddfc1..ca316d4 100644
--- a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java
+++ b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/Axis.java
@@ -19,8 +19,8 @@ public class Axis {
     private TitleOrient orient;
     private Double position;
     private Double tickCount;
-    private Boolean ticks;
     private Double tickSize;
+    private Boolean ticks;
     private String title;
     private Double titleMaxLength;
     private Double titlePadding;
@@ -206,14 +206,6 @@ public class Axis {
     @JsonProperty("tickCount")
     public void setTickCount(Double value) { this.tickCount = value; }
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    @JsonProperty("ticks")
-    public Boolean getTicks() { return ticks; }
-    @JsonProperty("ticks")
-    public void setTicks(Boolean value) { this.ticks = value; }
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -222,6 +214,14 @@ public class Axis {
     @JsonProperty("tickSize")
     public void setTickSize(Double value) { this.tickSize = value; }
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    @JsonProperty("ticks")
+    public Boolean getTicks() { return ticks; }
+    @JsonProperty("ticks")
+    public void setTicks(Boolean value) { this.ticks = value; }
+
     /**
      * A title for the field. If `null`, the title will be removed.
      *
diff --git a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java
index 01c74e7..186dd65 100644
--- a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java
+++ b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/AxisConfig.java
@@ -33,9 +33,9 @@ public class AxisConfig {
     private Boolean shortTimeLabels;
     private String tickColor;
     private Boolean tickRound;
-    private Boolean ticks;
     private Double tickSize;
     private Double tickWidth;
+    private Boolean ticks;
     private String titleAlign;
     private Double titleAngle;
     private String titleBaseline;
@@ -288,14 +288,6 @@ public class AxisConfig {
     @JsonProperty("tickRound")
     public void setTickRound(Boolean value) { this.tickRound = value; }
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    @JsonProperty("ticks")
-    public Boolean getTicks() { return ticks; }
-    @JsonProperty("ticks")
-    public void setTicks(Boolean value) { this.ticks = value; }
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -312,6 +304,14 @@ public class AxisConfig {
     @JsonProperty("tickWidth")
     public void setTickWidth(Double value) { this.tickWidth = value; }
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    @JsonProperty("ticks")
+    public Boolean getTicks() { return ticks; }
+    @JsonProperty("ticks")
+    public void setTicks(Boolean value) { this.ticks = value; }
+
     /**
      * Horizontal text alignment of axis titles.
      */
diff --git a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java
index 07630d6..435eeda 100644
--- a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java
+++ b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/BarConfig.java
@@ -18,8 +18,8 @@ public class BarConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -147,6 +147,16 @@ public class BarConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -161,16 +171,6 @@ public class BarConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java
index 616bd74..a8c60f1 100644
--- a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java
+++ b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkConfig.java
@@ -31,8 +31,8 @@ public class MarkConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -130,6 +130,16 @@ public class MarkConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -144,16 +154,6 @@ public class MarkConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java
index 3f0f391..7fbf135 100644
--- a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java
+++ b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/MarkDef.java
@@ -13,8 +13,8 @@ public class MarkDef {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -122,6 +122,16 @@ public class MarkDef {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -136,16 +146,6 @@ public class MarkDef {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java
index ee45056..3b97814 100644
--- a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java
+++ b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TextConfig.java
@@ -15,8 +15,8 @@ public class TextConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -115,6 +115,16 @@ public class TextConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -129,16 +139,6 @@ public class TextConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java
index bfe41ea..0389a57 100644
--- a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java
+++ b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/TickConfig.java
@@ -16,8 +16,8 @@ public class TickConfig {
     private Double dx;
     private Double dy;
     private String fill;
-    private Boolean filled;
     private Double fillOpacity;
+    private Boolean filled;
     private String font;
     private Double fontSize;
     private FontStyle fontStyle;
@@ -126,6 +126,16 @@ public class TickConfig {
     @JsonProperty("fill")
     public void setFill(String value) { this.fill = value; }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    @JsonProperty("fillOpacity")
+    public Double getFillOpacity() { return fillOpacity; }
+    @JsonProperty("fillOpacity")
+    public void setFillOpacity(Double value) { this.fillOpacity = value; }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -140,16 +150,6 @@ public class TickConfig {
     @JsonProperty("filled")
     public void setFilled(Boolean value) { this.filled = value; }
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    @JsonProperty("fillOpacity")
-    public Double getFillOpacity() { return fillOpacity; }
-    @JsonProperty("fillOpacity")
-    public void setFillOpacity(Double value) { this.fillOpacity = value; }
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java
index f6ef6ea..6c3040e 100644
--- a/base/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java
+++ b/head/schema-java-lombok/test/inputs/schema/vega-lite.schema/default/src/main/java/io/quicktype/VGAxisConfig.java
@@ -42,9 +42,9 @@ public class VGAxisConfig {
     private Double minExtent;
     private String tickColor;
     private Boolean tickRound;
-    private Boolean ticks;
     private Double tickSize;
     private Double tickWidth;
+    private Boolean ticks;
     private String titleAlign;
     private Double titleAngle;
     private String titleBaseline;
@@ -287,14 +287,6 @@ public class VGAxisConfig {
     @JsonProperty("tickRound")
     public void setTickRound(Boolean value) { this.tickRound = value; }
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    @JsonProperty("ticks")
-    public Boolean getTicks() { return ticks; }
-    @JsonProperty("ticks")
-    public void setTicks(Boolean value) { this.ticks = value; }
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -311,6 +303,14 @@ public class VGAxisConfig {
     @JsonProperty("tickWidth")
     public void setTickWidth(Double value) { this.tickWidth = value; }
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    @JsonProperty("ticks")
+    public Boolean getTicks() { return ticks; }
+    @JsonProperty("ticks")
+    public void setTicks(Boolean value) { this.ticks = value; }
+
     /**
      * Horizontal text alignment of axis titles.
      */
diff --git a/base/schema-javascript/test/inputs/schema/accessors.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/accessors.schema/default/TopLevel.js
index 1bcc19b..11d73cc 100644
--- a/base/schema-javascript/test/inputs/schema/accessors.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/accessors.schema/default/TopLevel.js
@@ -172,10 +172,10 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: "" },
+        { json: "union", js: "union", typ: u(true, 3.14) },
         { json: "enum", js: "enum", typ: r("Enum") },
         { json: "foo", js: "foo", typ: "" },
-        { json: "union", js: "union", typ: u(true, 3.14) },
+        { json: "bar", js: "bar", typ: "" },
     ], false),
     "Enum": [
         "red",
diff --git a/base/schema-javascript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
index 78b5159..7184e83 100644
--- a/base/schema-javascript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
@@ -174,8 +174,8 @@ const typeMap = {
     "TopLevel": o([
         { json: "amount", js: "amount", typ: 3.14 },
         { json: "frequency", js: "frequency", typ: r("Frequency") },
-        { json: "description", js: "description", typ: u(undefined, "") },
         { json: "type", js: "type", typ: r("Type") },
+        { json: "description", js: "description", typ: u(undefined, "") },
     ], false),
     "Frequency": [
         "Weekly",
diff --git a/base/schema-javascript/test/inputs/schema/bool-string.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/bool-string.schema/default/TopLevel.js
index d304895..d9cf441 100644
--- a/base/schema-javascript/test/inputs/schema/bool-string.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/bool-string.schema/default/TopLevel.js
@@ -172,11 +172,11 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
-        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
-        { json: "nullable", js: "nullable", typ: u(null, "") },
         { json: "one", js: "one", typ: "" },
         { json: "optional", js: "optional", typ: u(undefined, "") },
+        { json: "nullable", js: "nullable", typ: u(null, "") },
+        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
+        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
         { json: "unionWithBool", js: "unionWithBool", typ: u(true, "") },
         { json: "unionWithBoolAndEnum", js: "unionWithBoolAndEnum", typ: u(true, "") },
     ], "any"),
diff --git a/base/schema-javascript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
index e6b450f..4cce010 100644
--- a/base/schema-javascript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
@@ -172,9 +172,9 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
+        { json: "foo", js: "foo", typ: "" },
         { json: "disallowed", js: "disallowed", typ: u(undefined, "any") },
         { json: "empty", js: "empty", typ: a("any") },
-        { json: "foo", js: "foo", typ: "" },
         { json: "impossible", js: "impossible", typ: u(undefined, "any") },
     ], false),
 };
diff --git a/base/schema-javascript/test/inputs/schema/comment-injection.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/comment-injection.schema/default/TopLevel.js
index d2d0e17..fe1c5ec 100644
--- a/base/schema-javascript/test/inputs/schema/comment-injection.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/comment-injection.schema/default/TopLevel.js
@@ -172,10 +172,10 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
+        { json: "value", js: "value", typ: "" },
         { json: "trailingBackslash", js: "trailingBackslash", typ: u(undefined, "") },
         { json: "trailingQuote", js: "trailingQuote", typ: u(undefined, "") },
         { json: "trailingTripleQuote", js: "trailingTripleQuote", typ: u(undefined, "") },
-        { json: "value", js: "value", typ: "" },
     ], false),
 };
 
diff --git a/base/schema-javascript/test/inputs/schema/const-non-string.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/const-non-string.schema/default/TopLevel.js
index 075ec32..f6c2d7e 100644
--- a/base/schema-javascript/test/inputs/schema/const-non-string.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/const-non-string.schema/default/TopLevel.js
@@ -172,11 +172,11 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
+        { json: "version", js: "version", typ: 3.14 },
         { json: "amount", js: "amount", typ: 0 },
+        { json: "ratio", js: "ratio", typ: 3.14 },
         { json: "enabled", js: "enabled", typ: true },
         { json: "kind", js: "kind", typ: r("Kind") },
-        { json: "ratio", js: "ratio", typ: 3.14 },
-        { json: "version", js: "version", typ: 3.14 },
     ], "any"),
     "Kind": [
         "widget",
diff --git a/base/schema-javascript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
index 991000b..6a1b1c2 100644
--- a/base/schema-javascript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
@@ -172,8 +172,8 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: u(Date, r("BarEnum")) },
         { json: "foo", js: "foo", typ: "" },
+        { json: "bar", js: "bar", typ: u(Date, r("BarEnum")) },
     ], "any"),
     "BarEnum": [
         "quux",
diff --git a/base/schema-javascript/test/inputs/schema/date-time.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/date-time.schema/default/TopLevel.js
index d4e180d..c125454 100644
--- a/base/schema-javascript/test/inputs/schema/date-time.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/date-time.schema/default/TopLevel.js
@@ -172,11 +172,11 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "complex-union-array", js: "complex-union-array", typ: a(u(Date, r("ComplexUnionArrayEnum"), 0)) },
         { json: "date", js: "date", typ: Date },
-        { json: "date-time", js: "date-time", typ: Date },
         { json: "time", js: "time", typ: "" },
+        { json: "date-time", js: "date-time", typ: Date },
         { json: "union-array", js: "union-array", typ: a("") },
+        { json: "complex-union-array", js: "complex-union-array", typ: a(u(Date, r("ComplexUnionArrayEnum"), 0)) },
     ], false),
     "ComplexUnionArrayEnum": [
         "foo",
diff --git a/base/schema-javascript/test/inputs/schema/description.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/description.schema/default/TopLevel.js
index d03604c..165dd13 100644
--- a/base/schema-javascript/test/inputs/schema/description.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/description.schema/default/TopLevel.js
@@ -172,11 +172,11 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: u(undefined, true) },
+        { json: "union", js: "union", typ: u(3.14, "") },
         { json: "enum", js: "enum", typ: r("Enum") },
         { json: "foo", js: "foo", typ: u(undefined, 3.14) },
+        { json: "bar", js: "bar", typ: u(undefined, true) },
         { json: "object-or-string", js: "object-or-string", typ: u(r("ObjectOrStringObject"), "") },
-        { json: "union", js: "union", typ: u(3.14, "") },
     ], false),
     "ObjectOrStringObject": o([
         { json: "prop", js: "prop", typ: 3.14 },
diff --git a/base/schema-javascript/test/inputs/schema/direct-union.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/direct-union.schema/default/TopLevel.js
index 19fd808..25d2f12 100644
--- a/base/schema-javascript/test/inputs/schema/direct-union.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/direct-union.schema/default/TopLevel.js
@@ -175,8 +175,8 @@ const typeMap = {
         { json: "stuff", js: "stuff", typ: m(r("Thing")) },
     ], false),
     "Thing": o([
-        { json: "optional", js: "optional", typ: u(undefined, u(a("any"), true, 3.14, 0, m("any"), null, "")) },
         { json: "required", js: "required", typ: u(a("any"), true, 3.14, 0, m("any"), null, "") },
+        { json: "optional", js: "optional", typ: u(undefined, u(a("any"), true, 3.14, 0, m("any"), null, "")) },
     ], false),
 };
 
diff --git a/base/schema-javascript/test/inputs/schema/enum.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/enum.schema/default/TopLevel.js
index b10c441..be1c22c 100644
--- a/base/schema-javascript/test/inputs/schema/enum.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/enum.schema/default/TopLevel.js
@@ -172,11 +172,11 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "arr", js: "arr", typ: u(undefined, a(u(r("OtherArr"), 0))) },
-        { json: "for", js: "for", typ: u(undefined, "") },
-        { json: "gve", js: "gve", typ: r("Gve") },
         { json: "lvc", js: "lvc", typ: u(undefined, r("Lvc")) },
+        { json: "gve", js: "gve", typ: r("Gve") },
+        { json: "arr", js: "arr", typ: u(undefined, a(u(r("OtherArr"), 0))) },
         { json: "otherArr", js: "otherArr", typ: u(undefined, a(r("OtherArr"))) },
+        { json: "for", js: "for", typ: u(undefined, "") },
     ], "any"),
     "OtherArr": [
         "foo",
diff --git a/base/schema-javascript/test/inputs/schema/integer-string.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/integer-string.schema/default/TopLevel.js
index 7d20798..e938010 100644
--- a/base/schema-javascript/test/inputs/schema/integer-string.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/integer-string.schema/default/TopLevel.js
@@ -172,11 +172,11 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
-        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
-        { json: "nullable", js: "nullable", typ: u(null, "") },
         { json: "one", js: "one", typ: "" },
         { json: "optional", js: "optional", typ: u(undefined, "") },
+        { json: "nullable", js: "nullable", typ: u(null, "") },
+        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
+        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
         { json: "unionWithInt", js: "unionWithInt", typ: u(0, "") },
         { json: "unionWithIntAndEnum", js: "unionWithIntAndEnum", typ: u(0, "") },
     ], "any"),
diff --git a/base/schema-javascript/test/inputs/schema/integer-type.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/integer-type.schema/default/TopLevel.js
index 0f676b4..c1b32a9 100644
--- a/base/schema-javascript/test/inputs/schema/integer-type.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/integer-type.schema/default/TopLevel.js
@@ -172,15 +172,15 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
+        { json: "small_positive", js: "small_positive", typ: 0 },
+        { json: "small_negative", js: "small_negative", typ: 0 },
+        { json: "i32_range", js: "i32_range", typ: 0 },
         { json: "above_i32_max", js: "above_i32_max", typ: 0 },
         { json: "below_i32_min", js: "below_i32_min", typ: 0 },
-        { json: "i32_range", js: "i32_range", typ: 0 },
-        { json: "large_bounds", js: "large_bounds", typ: 0 },
-        { json: "only_maximum", js: "only_maximum", typ: 0 },
         { json: "only_minimum", js: "only_minimum", typ: 0 },
-        { json: "small_negative", js: "small_negative", typ: 0 },
-        { json: "small_positive", js: "small_positive", typ: 0 },
+        { json: "only_maximum", js: "only_maximum", typ: 0 },
         { json: "unbounded", js: "unbounded", typ: 0 },
+        { json: "large_bounds", js: "large_bounds", typ: 0 },
     ], "any"),
 };
 
diff --git a/base/schema-javascript/test/inputs/schema/light.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/light.schema/default/TopLevel.js
index eb00c99..b13b08a 100644
--- a/base/schema-javascript/test/inputs/schema/light.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/light.schema/default/TopLevel.js
@@ -175,8 +175,8 @@ const typeMap = {
         { json: "LightParams", js: "LightParams", typ: r("LightParams") },
     ], false),
     "LightParams": o([
-        { json: "app_id", js: "app_id", typ: "" },
         { json: "outlet_id", js: "outlet_id", typ: "" },
+        { json: "app_id", js: "app_id", typ: "" },
         { json: "rgba", js: "rgba", typ: "" },
     ], false),
 };
diff --git a/base/schema-javascript/test/inputs/schema/min-max-items.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/min-max-items.schema/default/TopLevel.js
index 89e5662..0f700cd 100644
--- a/base/schema-javascript/test/inputs/schema/min-max-items.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/min-max-items.schema/default/TopLevel.js
@@ -172,9 +172,9 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
+        { json: "minOnly", js: "minOnly", typ: a("") },
         { json: "maxOnly", js: "maxOnly", typ: a(0) },
         { json: "minAndMax", js: "minAndMax", typ: a(3.14) },
-        { json: "minOnly", js: "minOnly", typ: a("") },
         { json: "plain", js: "plain", typ: a("") },
         { json: "unionItems", js: "unionItems", typ: a(u(0, "")) },
     ], "any"),
diff --git a/base/schema-javascript/test/inputs/schema/minmax-integer.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
index b8f0307..c9fc449 100644
--- a/base/schema-javascript/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
@@ -173,13 +173,13 @@ function r(name) {
 const typeMap = {
     "TopLevel": o([
         { json: "free", js: "free", typ: 0 },
-        { json: "intersection", js: "intersection", typ: 0 },
-        { json: "max", js: "max", typ: 0 },
         { json: "min", js: "min", typ: 0 },
+        { json: "max", js: "max", typ: 0 },
         { json: "minmax", js: "minmax", typ: 0 },
-        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 0 },
-        { json: "minMaxUnion", js: "minMaxUnion", typ: 0 },
         { json: "union", js: "union", typ: 0 },
+        { json: "minMaxUnion", js: "minMaxUnion", typ: 0 },
+        { json: "intersection", js: "intersection", typ: 0 },
+        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 0 },
     ], "any"),
 };
 
diff --git a/base/schema-javascript/test/inputs/schema/minmax.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/minmax.schema/default/TopLevel.js
index 4f8ad34..639b082 100644
--- a/base/schema-javascript/test/inputs/schema/minmax.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/minmax.schema/default/TopLevel.js
@@ -173,13 +173,13 @@ function r(name) {
 const typeMap = {
     "TopLevel": o([
         { json: "free", js: "free", typ: 3.14 },
-        { json: "intersection", js: "intersection", typ: 3.14 },
-        { json: "max", js: "max", typ: 3.14 },
         { json: "min", js: "min", typ: 3.14 },
+        { json: "max", js: "max", typ: 3.14 },
         { json: "minmax", js: "minmax", typ: 3.14 },
-        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 3.14 },
-        { json: "minMaxUnion", js: "minMaxUnion", typ: 3.14 },
         { json: "union", js: "union", typ: 3.14 },
+        { json: "minMaxUnion", js: "minMaxUnion", typ: 3.14 },
+        { json: "intersection", js: "intersection", typ: 3.14 },
+        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 3.14 },
     ], "any"),
 };
 
diff --git a/base/schema-javascript/test/inputs/schema/minmaxlength.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
index 5a56424..d20c018 100644
--- a/base/schema-javascript/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
@@ -172,14 +172,14 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "intersection", js: "intersection", typ: "" },
-        { json: "inUnion", js: "inUnion", typ: u(3.14, "") },
-        { json: "maxlength", js: "maxlength", typ: "" },
         { json: "minlength", js: "minlength", typ: "" },
-        { json: "minMaxIntersection", js: "minMaxIntersection", typ: "" },
+        { json: "maxlength", js: "maxlength", typ: "" },
         { json: "minmaxlength", js: "minmaxlength", typ: "" },
-        { json: "minMaxUnion", js: "minMaxUnion", typ: "" },
         { json: "union", js: "union", typ: "" },
+        { json: "inUnion", js: "inUnion", typ: u(3.14, "") },
+        { json: "minMaxUnion", js: "minMaxUnion", typ: "" },
+        { json: "intersection", js: "intersection", typ: "" },
+        { json: "minMaxIntersection", js: "minMaxIntersection", typ: "" },
     ], "any"),
 };
 
diff --git a/base/schema-javascript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
index 50ada8d..b7cf68d 100644
--- a/base/schema-javascript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
@@ -172,8 +172,8 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: 0 },
         { json: "foo", js: "foo", typ: 0 },
+        { json: "bar", js: "bar", typ: 0 },
         { json: "quux", js: "quux", typ: true },
     ], "any"),
 };
diff --git a/base/schema-javascript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
index eab286e..ec0271d 100644
--- a/base/schema-javascript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
@@ -172,8 +172,8 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "b", js: "b", typ: u(undefined, u(null, "")) },
         { json: "kind", js: "kind", typ: r("Kind") },
+        { json: "b", js: "b", typ: u(undefined, u(null, "")) },
     ], "any"),
     "Kind": [
         "one",
diff --git a/base/schema-javascript/test/inputs/schema/optional-any.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/optional-any.schema/default/TopLevel.js
index 9e1dbbb..b2c233f 100644
--- a/base/schema-javascript/test/inputs/schema/optional-any.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/optional-any.schema/default/TopLevel.js
@@ -172,8 +172,8 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: true },
         { json: "foo", js: "foo", typ: u(undefined, "any") },
+        { json: "bar", js: "bar", typ: true },
     ], false),
 };
 
diff --git a/base/schema-javascript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
index 8018fa5..41949af 100644
--- a/base/schema-javascript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
@@ -173,12 +173,12 @@ function r(name) {
 const typeMap = {
     "TopLevel": o([
         { json: "coordinates", js: "coordinates", typ: u(undefined, a(r("Coordinate"))) },
-        { json: "count", js: "count", typ: u(undefined, 0) },
-        { json: "label", js: "label", typ: u(undefined, "") },
         { json: "requiredCoordinates", js: "requiredCoordinates", typ: a(r("Coordinate")) },
+        { json: "count", js: "count", typ: u(undefined, 0) },
         { json: "requiredCount", js: "requiredCount", typ: 0 },
-        { json: "requiredLabel", js: "requiredLabel", typ: "" },
         { json: "weight", js: "weight", typ: u(undefined, 3.14) },
+        { json: "label", js: "label", typ: u(undefined, "") },
+        { json: "requiredLabel", js: "requiredLabel", typ: "" },
     ], false),
     "Coordinate": o([
         { json: "latitude", js: "latitude", typ: 3.14 },
diff --git a/base/schema-javascript/test/inputs/schema/optional-constraints.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
index f2a2cf6..4d012f7 100644
--- a/base/schema-javascript/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
@@ -172,11 +172,11 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "optDouble", js: "optDouble", typ: u(undefined, 3.14) },
+        { json: "reqZeroMin", js: "reqZeroMin", typ: 0 },
         { json: "optInt", js: "optInt", typ: u(undefined, 0) },
-        { json: "optPattern", js: "optPattern", typ: u(undefined, "") },
+        { json: "optDouble", js: "optDouble", typ: u(undefined, 3.14) },
         { json: "optString", js: "optString", typ: u(undefined, "") },
-        { json: "reqZeroMin", js: "reqZeroMin", typ: 0 },
+        { json: "optPattern", js: "optPattern", typ: u(undefined, "") },
     ], "any"),
 };
 
diff --git a/base/schema-javascript/test/inputs/schema/optional-date-time.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
index ad8ac6b..2217177 100644
--- a/base/schema-javascript/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
@@ -172,12 +172,12 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "optional-date", js: "optional-date", typ: u(undefined, Date) },
-        { json: "optional-date-time", js: "optional-date-time", typ: u(undefined, Date) },
-        { json: "optional-time", js: "optional-time", typ: u(undefined, "") },
         { json: "required-date", js: "required-date", typ: Date },
-        { json: "required-date-time", js: "required-date-time", typ: Date },
         { json: "required-time", js: "required-time", typ: "" },
+        { json: "required-date-time", js: "required-date-time", typ: Date },
+        { json: "optional-date", js: "optional-date", typ: u(undefined, Date) },
+        { json: "optional-time", js: "optional-time", typ: u(undefined, "") },
+        { json: "optional-date-time", js: "optional-date-time", typ: u(undefined, Date) },
     ], false),
 };
 
diff --git a/base/schema-javascript/test/inputs/schema/prefix-items.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/prefix-items.schema/default/TopLevel.js
index ac45feb..a198b30 100644
--- a/base/schema-javascript/test/inputs/schema/prefix-items.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/prefix-items.schema/default/TopLevel.js
@@ -172,8 +172,8 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "open", js: "open", typ: a(u(true, 0)) },
         { json: "tuple", js: "tuple", typ: a(u(true, 0)) },
+        { json: "open", js: "open", typ: a(u(true, 0)) },
     ], "any"),
 };
 
diff --git a/head/schema-javascript/test/inputs/schema/property-order.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/property-order.schema/default/TopLevel.js
new file mode 100644
index 0000000..6e0bad4
--- /dev/null
+++ b/head/schema-javascript/test/inputs/schema/property-order.schema/default/TopLevel.js
@@ -0,0 +1,192 @@
+// To parse this data:
+//
+//   const Convert = require("./TopLevel");
+//
+//   const topLevel = Convert.toTopLevel(json);
+//
+// These functions will throw an error if the JSON doesn't
+// match the expected interface, even if the JSON is valid.
+
+// Converts JSON strings to/from your types
+// and asserts the results of JSON.parse at runtime
+function toTopLevel(json) {
+    return cast(JSON.parse(json), r("TopLevel"));
+}
+
+function topLevelToJson(value) {
+    return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
+}
+
+function invalidValue(typ, val, key, parent = '') {
+    const prettyTyp = prettyTypeName(typ);
+    const parentText = parent ? ` on ${parent}` : '';
+    const keyText = key ? ` for key "${key}"` : '';
+    throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
+}
+
+function prettyTypeName(typ) {
+    if (Array.isArray(typ)) {
+        if (typ.length === 2 && typ[0] === undefined) {
+            return `an optional ${prettyTypeName(typ[1])}`;
+        } else {
+            return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
+        }
+    } else if (typeof typ === "object" && typ.literal !== undefined) {
+        return typ.literal;
+    } else {
+        return typeof typ;
+    }
+}
+
+function jsonToJSProps(typ) {
+    if (typ.jsonToJS === undefined) {
+        const map = {};
+        typ.props.forEach((p) => map[p.json] = { key: p.js, typ: p.typ });
+        typ.jsonToJS = map;
+    }
+    return typ.jsonToJS;
+}
+
+function jsToJSONProps(typ) {
+    if (typ.jsToJSON === undefined) {
+        const map = {};
+        typ.props.forEach((p) => map[p.js] = { key: p.json, typ: p.typ });
+        typ.jsToJSON = map;
+    }
+    return typ.jsToJSON;
+}
+
+function transform(val, typ, getProps, key = '', parent = '') {
+    function transformPrimitive(typ, val) {
+        if (typeof typ === typeof val) return val;
+        return invalidValue(typ, val, key, parent);
+    }
+
+    function transformUnion(typs, val) {
+        // val must validate against one typ in typs
+        const l = typs.length;
+        for (let i = 0; i < l; i++) {
+            const typ = typs[i];
+            try {
+                return transform(val, typ, getProps);
+            } catch (_) {}
+        }
+        return invalidValue(typs, val, key, parent);
+    }
+
+    function transformEnum(cases, val) {
+        if (cases.indexOf(val) !== -1) return val;
+        return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
+    }
+
+    function transformArray(typ, val) {
+        // val must be an array with no invalid elements
+        if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
+        return val.map(el => transform(el, typ, getProps));
+    }
+
+    function transformDate(val) {
+        if (val === null) {
+            return null;
+        }
+        const d = new Date(val);
+        if (isNaN(d.valueOf())) {
+            return invalidValue(l("Date"), val, key, parent);
+        }
+        return d;
+    }
+
+    function transformObject(props, additional, val) {
+        if (val === null || typeof val !== "object" || Array.isArray(val)) {
+            return invalidValue(l(ref || "object"), val, key, parent);
+        }
+        const result = {};
+        Object.getOwnPropertyNames(props).forEach(key => {
+            const prop = props[key];
+            const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
+            result[prop.key] = transform(v, prop.typ, getProps, key, ref);
+        });
+        Object.getOwnPropertyNames(val).forEach(key => {
+            if (!Object.prototype.hasOwnProperty.call(props, key)) {
+                result[key] = transform(val[key], additional, getProps, key, ref);
+            }
+        });
+        return result;
+    }
+
+    if (typ === "any") return val;
+    if (typ === null) {
+        if (val === null) return val;
+        return invalidValue(typ, val, key, parent);
+    }
+    if (typ === false) return invalidValue(typ, val, key, parent);
+    let ref = undefined;
+    while (typeof typ === "object" && typ.ref !== undefined) {
+        ref = typ.ref;
+        typ = typeMap[typ.ref];
+    }
+    if (Array.isArray(typ)) return transformEnum(typ, val);
+    if (typeof typ === "object") {
+        return typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
+            : typ.hasOwnProperty("arrayItems")    ? transformArray(typ.arrayItems, val)
+            : typ.hasOwnProperty("props")         ? transformObject(getProps(typ), typ.additional, val)
+            : invalidValue(typ, val, key, parent);
+    }
+    // Numbers can be parsed by Date but shouldn't be.
+    if (typ === Date && typeof val !== "number") return transformDate(val);
+    return transformPrimitive(typ, val);
+}
+
+function cast(val, typ) {
+    return transform(val, typ, jsonToJSProps);
+}
+
+function uncast(val, typ) {
+    return transform(val, typ, jsToJSONProps);
+}
+
+function l(typ) {
+    return { literal: typ };
+}
+
+function a(typ) {
+    return { arrayItems: typ };
+}
+
+function u(...typs) {
+    return { unionMembers: typs };
+}
+
+function o(props, additional) {
+    return { props, additional };
+}
+
+function m(additional) {
+    const props = [];
+    return { props, additional };
+}
+
+function r(name) {
+    return { ref: name };
+}
+
+const typeMap = {
+    "TopLevel": o([
+        { json: "zebra", js: "zebra", typ: "" },
+        { json: "mango", js: "mango", typ: 3.14 },
+        { json: "apple", js: "apple", typ: true },
+        { json: "delta", js: "delta", typ: "" },
+        { json: "banana", js: "banana", typ: 0 },
+        { json: "ordered", js: "ordered", typ: r("Ordered") },
+    ], false),
+    "Ordered": o([
+        { json: "mango", js: "mango", typ: 3.14 },
+        { json: "zebra", js: "zebra", typ: "" },
+        { json: "apple", js: "apple", typ: true },
+    ], false),
+};
+
+module.exports = {
+    "topLevelToJson": topLevelToJson,
+    "toTopLevel": toTopLevel,
+};
diff --git a/base/schema-javascript/test/inputs/schema/renaming-bug.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
index afb9232..ee05229 100644
--- a/base/schema-javascript/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
@@ -178,20 +178,20 @@ const typeMap = {
     ], "any"),
     "Fruit": o([
         { json: "apple", js: "apple", typ: u(undefined, true) },
-        { json: "berries", js: "berries", typ: u(undefined, a(r("Berry"))) },
         { json: "orange", js: "orange", typ: u(undefined, true) },
+        { json: "berries", js: "berries", typ: u(undefined, a(r("Berry"))) },
     ], "any"),
     "Berry": o([
-        { json: "color", js: "color", typ: u(undefined, r("Color")) },
         { json: "name", js: "name", typ: u(undefined, "") },
+        { json: "color", js: "color", typ: u(undefined, r("Color")) },
         { json: "shapes", js: "shapes", typ: u(undefined, a(r("Shape"))) },
     ], "any"),
     "Color": o([
         { json: "rgb", js: "rgb", typ: u(undefined, 3.14) },
     ], "any"),
     "Shape": o([
-        { json: "geometry", js: "geometry", typ: u(undefined, r("Geometry")) },
         { json: "history", js: "history", typ: u(undefined, r("History")) },
+        { json: "geometry", js: "geometry", typ: u(undefined, r("Geometry")) },
     ], "any"),
     "Geometry": o([
         { json: "rectShape", js: "rectShape", typ: u(undefined, r("RectShape")) },
@@ -204,27 +204,27 @@ const typeMap = {
         { json: "parts", js: "parts", typ: u(undefined, a(r("Part"))) },
     ], "any"),
     "Part": o([
-        { json: "depth", js: "depth", typ: u(undefined, "") },
         { json: "length", js: "length", typ: u(undefined, "") },
         { json: "width", js: "width", typ: u(undefined, "") },
+        { json: "depth", js: "depth", typ: u(undefined, "") },
     ], "any"),
     "History": o([
         { json: "class", js: "class", typ: u(undefined, "") },
     ], "any"),
     "Vehicle": o([
-        { json: "brand", js: "brand", typ: u(undefined, "") },
         { json: "id", js: "id", typ: u(undefined, "") },
-        { json: "speed", js: "speed", typ: u(undefined, r("Speed")) },
-        { json: "subModule", js: "subModule", typ: u(undefined, true) },
         { json: "type", js: "type", typ: u(undefined, r("VehicleType")) },
+        { json: "speed", js: "speed", typ: u(undefined, r("Speed")) },
         { json: "year", js: "year", typ: u(undefined, "") },
+        { json: "brand", js: "brand", typ: u(undefined, "") },
+        { json: "subModule", js: "subModule", typ: u(undefined, true) },
     ], "any"),
     "Speed": o([
         { json: "velocity", js: "velocity", typ: u(undefined, r("Limit")) },
     ], "any"),
     "Limit": o([
-        { json: "maximum", js: "maximum", typ: u(undefined, 3.14) },
         { json: "minimum", js: "minimum", typ: u(undefined, 3.14) },
+        { json: "maximum", js: "maximum", typ: u(undefined, 3.14) },
     ], "any"),
     "VehicleType": o([
         { json: "name", js: "name", typ: u(undefined, r("Name")) },
diff --git a/base/schema-javascript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
index 9a76089..828d31f 100644
--- a/base/schema-javascript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
@@ -172,12 +172,12 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
         { json: "value", js: "value", typ: "" },
+        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
     ], "any"),
     "Node": o([
-        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
         { json: "value", js: "value", typ: "" },
+        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
     ], "any"),
 };
 
diff --git a/base/schema-javascript/test/inputs/schema/uuid.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/uuid.schema/default/TopLevel.js
index 9f54273..acf9890 100644
--- a/base/schema-javascript/test/inputs/schema/uuid.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/uuid.schema/default/TopLevel.js
@@ -172,11 +172,11 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
-        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
-        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
-        { json: "nullable", js: "nullable", typ: u(null, "") },
         { json: "one", js: "one", typ: "" },
         { json: "optional", js: "optional", typ: u(undefined, "") },
+        { json: "nullable", js: "nullable", typ: u(null, "") },
+        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
+        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
         { json: "unionWithEnum", js: "unionWithEnum", typ: "" },
     ], "any"),
 };
diff --git a/base/schema-javascript/test/inputs/schema/vega-lite.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/vega-lite.schema/default/TopLevel.js
index 06dcc21..29cc53e 100644
--- a/base/schema-javascript/test/inputs/schema/vega-lite.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/vega-lite.schema/default/TopLevel.js
@@ -249,8 +249,8 @@ const typeMap = {
         { json: "dx", js: "dx", typ: u(undefined, 3.14) },
         { json: "dy", js: "dy", typ: u(undefined, 3.14) },
         { json: "fill", js: "fill", typ: u(undefined, "") },
-        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "fillOpacity", js: "fillOpacity", typ: u(undefined, 3.14) },
+        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "font", js: "font", typ: u(undefined, "") },
         { json: "fontSize", js: "fontSize", typ: u(undefined, 3.14) },
         { json: "fontStyle", js: "fontStyle", typ: u(undefined, r("FontStyle")) },
@@ -297,9 +297,9 @@ const typeMap = {
         { json: "shortTimeLabels", js: "shortTimeLabels", typ: u(undefined, true) },
         { json: "tickColor", js: "tickColor", typ: u(undefined, "") },
         { json: "tickRound", js: "tickRound", typ: u(undefined, true) },
-        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "tickSize", js: "tickSize", typ: u(undefined, 3.14) },
         { json: "tickWidth", js: "tickWidth", typ: u(undefined, 3.14) },
+        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "titleAlign", js: "titleAlign", typ: u(undefined, "") },
         { json: "titleAngle", js: "titleAngle", typ: u(undefined, 3.14) },
         { json: "titleBaseline", js: "titleBaseline", typ: u(undefined, "") },
@@ -337,9 +337,9 @@ const typeMap = {
         { json: "minExtent", js: "minExtent", typ: u(undefined, 3.14) },
         { json: "tickColor", js: "tickColor", typ: u(undefined, "") },
         { json: "tickRound", js: "tickRound", typ: u(undefined, true) },
-        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "tickSize", js: "tickSize", typ: u(undefined, 3.14) },
         { json: "tickWidth", js: "tickWidth", typ: u(undefined, 3.14) },
+        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "titleAlign", js: "titleAlign", typ: u(undefined, "") },
         { json: "titleAngle", js: "titleAngle", typ: u(undefined, 3.14) },
         { json: "titleBaseline", js: "titleBaseline", typ: u(undefined, "") },
@@ -365,8 +365,8 @@ const typeMap = {
         { json: "dx", js: "dx", typ: u(undefined, 3.14) },
         { json: "dy", js: "dy", typ: u(undefined, 3.14) },
         { json: "fill", js: "fill", typ: u(undefined, "") },
-        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "fillOpacity", js: "fillOpacity", typ: u(undefined, 3.14) },
+        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "font", js: "font", typ: u(undefined, "") },
         { json: "fontSize", js: "fontSize", typ: u(undefined, 3.14) },
         { json: "fontStyle", js: "fontStyle", typ: u(undefined, r("FontStyle")) },
@@ -582,8 +582,8 @@ const typeMap = {
         { json: "dx", js: "dx", typ: u(undefined, 3.14) },
         { json: "dy", js: "dy", typ: u(undefined, 3.14) },
         { json: "fill", js: "fill", typ: u(undefined, "") },
-        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "fillOpacity", js: "fillOpacity", typ: u(undefined, 3.14) },
+        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "font", js: "font", typ: u(undefined, "") },
         { json: "fontSize", js: "fontSize", typ: u(undefined, 3.14) },
         { json: "fontStyle", js: "fontStyle", typ: u(undefined, r("FontStyle")) },
@@ -616,8 +616,8 @@ const typeMap = {
         { json: "dx", js: "dx", typ: u(undefined, 3.14) },
         { json: "dy", js: "dy", typ: u(undefined, 3.14) },
         { json: "fill", js: "fill", typ: u(undefined, "") },
-        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "fillOpacity", js: "fillOpacity", typ: u(undefined, 3.14) },
+        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "font", js: "font", typ: u(undefined, "") },
         { json: "fontSize", js: "fontSize", typ: u(undefined, 3.14) },
         { json: "fontStyle", js: "fontStyle", typ: u(undefined, r("FontStyle")) },
@@ -913,8 +913,8 @@ const typeMap = {
         { json: "orient", js: "orient", typ: u(undefined, r("TitleOrient")) },
         { json: "position", js: "position", typ: u(undefined, 3.14) },
         { json: "tickCount", js: "tickCount", typ: u(undefined, 3.14) },
-        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "tickSize", js: "tickSize", typ: u(undefined, 3.14) },
+        { json: "ticks", js: "ticks", typ: u(undefined, true) },
         { json: "title", js: "title", typ: u(undefined, u(null, "")) },
         { json: "titleMaxLength", js: "titleMaxLength", typ: u(undefined, 3.14) },
         { json: "titlePadding", js: "titlePadding", typ: u(undefined, 3.14) },
@@ -993,8 +993,8 @@ const typeMap = {
         { json: "dx", js: "dx", typ: u(undefined, 3.14) },
         { json: "dy", js: "dy", typ: u(undefined, 3.14) },
         { json: "fill", js: "fill", typ: u(undefined, "") },
-        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "fillOpacity", js: "fillOpacity", typ: u(undefined, 3.14) },
+        { json: "filled", js: "filled", typ: u(undefined, true) },
         { json: "font", js: "font", typ: u(undefined, "") },
         { json: "fontSize", js: "fontSize", typ: u(undefined, 3.14) },
         { json: "fontStyle", js: "fontStyle", typ: u(undefined, r("FontStyle")) },
diff --git a/base/schema-kotlin/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt
index 567d001..d7949d7 100644
--- a/base/schema-kotlin/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt
@@ -21,8 +21,8 @@ private val klaxon = Klaxon()
 data class TopLevel (
     val amount: Double,
     val frequency: Frequency,
-    val description: String? = null,
-    val type: Type
+    val type: Type,
+    val description: String? = null
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt
index 2f0cebc..5f2b136 100644
--- a/base/schema-kotlin/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt
@@ -9,9 +9,9 @@ import com.beust.klaxon.*
 private val klaxon = Klaxon()
 
 data class TopLevel (
+    val foo: String,
     val disallowed: Any? = null,
     val empty: List<Any?>,
-    val foo: String,
     val impossible: Any? = null
 ) {
     public fun toJson() = klaxon.toJsonString(this)
diff --git a/base/schema-kotlin/test/inputs/schema/comment-injection.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/comment-injection.schema/default/TopLevel.kt
index 3dbf28c..49ad56b 100644
--- a/base/schema-kotlin/test/inputs/schema/comment-injection.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/comment-injection.schema/default/TopLevel.kt
@@ -23,21 +23,6 @@ private val klaxon = Klaxon()
  * }
  */
 data class TopLevel (
-    /**
-     * Ends with a backslash \
-     */
-    val trailingBackslash: String? = null,
-
-    /**
-     * Ends with a quote "
-     */
-    val trailingQuote: String? = null,
-
-    /**
-     * Ends with a triple quote """
-     */
-    val trailingTripleQuote: String? = null,
-
     /**
      * Property delimiters:
      * * /
@@ -52,7 +37,22 @@ data class TopLevel (
      * }
      * }
      */
-    val value: String
+    val value: String,
+
+    /**
+     * Ends with a backslash \
+     */
+    val trailingBackslash: String? = null,
+
+    /**
+     * Ends with a quote "
+     */
+    val trailingQuote: String? = null,
+
+    /**
+     * Ends with a triple quote """
+     */
+    val trailingTripleQuote: String? = null
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/const-non-string.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/const-non-string.schema/default/TopLevel.kt
index 89997bf..3b31aca 100644
--- a/base/schema-kotlin/test/inputs/schema/const-non-string.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/const-non-string.schema/default/TopLevel.kt
@@ -18,11 +18,11 @@ private val klaxon = Klaxon()
     .convert(Kind::class, { Kind.fromValue(it.string!!) }, { "\"${it.value}\"" })
 
 data class TopLevel (
+    val version: Double,
     val amount: Long,
-    val enabled: Boolean,
-    val kind: Kind,
     val ratio: Double,
-    val version: Double
+    val enabled: Boolean,
+    val kind: Kind
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/date-time-or-string.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/date-time-or-string.schema/default/TopLevel.kt
index ffa064a..b56ad56 100644
--- a/base/schema-kotlin/test/inputs/schema/date-time-or-string.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/date-time-or-string.schema/default/TopLevel.kt
@@ -22,8 +22,8 @@ private val klaxon = Klaxon()
     .convert(BarUnion::class,       { BarUnion.fromJson(it) },             { it.toJson() }, true)
 
 data class TopLevel (
-    val bar: BarUnion,
-    val foo: String
+    val foo: String,
+    val bar: BarUnion
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/date-time.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/date-time.schema/default/TopLevel.kt
index 8327d6e..50d6c43 100644
--- a/base/schema-kotlin/test/inputs/schema/date-time.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/date-time.schema/default/TopLevel.kt
@@ -27,18 +27,17 @@ private val klaxon = Klaxon()
     .convert(UnionArray::class,               { UnionArray.fromJson(it) },                      { it.toJson() }, true)
 
 data class TopLevel (
-    @Json(name = "complex-union-array")
-    val complexUnionArray: List<ComplexUnionArrayElement>,
-
     val date: LocalDate,
+    val time: OffsetTime,
 
     @Json(name = "date-time")
     val dateTime: OffsetDateTime,
 
-    val time: OffsetTime,
-
     @Json(name = "union-array")
-    val unionArray: List<UnionArray>
+    val unionArray: List<UnionArray>,
+
+    @Json(name = "complex-union-array")
+    val complexUnionArray: List<ComplexUnionArrayElement>
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/enum.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/enum.schema/default/TopLevel.kt
index a3502f2..97dafc7 100644
--- a/base/schema-kotlin/test/inputs/schema/enum.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/enum.schema/default/TopLevel.kt
@@ -21,14 +21,13 @@ private val klaxon = Klaxon()
     .convert(Arr::class,      { Arr.fromJson(it) },                { it.toJson() }, true)
 
 data class TopLevel (
+    val lvc: Lvc? = null,
+    val gve: Gve,
     val arr: List<Arr>? = null,
+    val otherArr: List<OtherArr>? = null,
 
     @Json(name = "for")
-    val topLevelFor: String? = null,
-
-    val gve: Gve,
-    val lvc: Lvc? = null,
-    val otherArr: List<OtherArr>? = null
+    val topLevelFor: String? = null
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/integer-type.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/integer-type.schema/default/TopLevel.kt
index 0c3d790..99688df 100644
--- a/base/schema-kotlin/test/inputs/schema/integer-type.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/integer-type.schema/default/TopLevel.kt
@@ -9,31 +9,31 @@ import com.beust.klaxon.*
 private val klaxon = Klaxon()
 
 data class TopLevel (
-    @Json(name = "above_i32_max")
-    val aboveI32Max: Long,
+    @Json(name = "small_positive")
+    val smallPositive: Long,
 
-    @Json(name = "below_i32_min")
-    val belowI32Min: Long,
+    @Json(name = "small_negative")
+    val smallNegative: Long,
 
     @Json(name = "i32_range")
     val i32Range: Long,
 
-    @Json(name = "large_bounds")
-    val largeBounds: Long,
+    @Json(name = "above_i32_max")
+    val aboveI32Max: Long,
 
-    @Json(name = "only_maximum")
-    val onlyMaximum: Long,
+    @Json(name = "below_i32_min")
+    val belowI32Min: Long,
 
     @Json(name = "only_minimum")
     val onlyMinimum: Long,
 
-    @Json(name = "small_negative")
-    val smallNegative: Long,
+    @Json(name = "only_maximum")
+    val onlyMaximum: Long,
 
-    @Json(name = "small_positive")
-    val smallPositive: Long,
+    val unbounded: Long,
 
-    val unbounded: Long
+    @Json(name = "large_bounds")
+    val largeBounds: Long
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/light.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/light.schema/default/TopLevel.kt
index b840048..63a6baa 100644
--- a/base/schema-kotlin/test/inputs/schema/light.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/light.schema/default/TopLevel.kt
@@ -20,11 +20,11 @@ data class TopLevel (
 }
 
 data class LightParams (
-    @Json(name = "app_id")
-    val appID: String,
-
     @Json(name = "outlet_id")
     val outletID: String,
 
+    @Json(name = "app_id")
+    val appID: String,
+
     val rgba: String
 )
diff --git a/base/schema-kotlin/test/inputs/schema/min-max-items.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/min-max-items.schema/default/TopLevel.kt
index a2c996e..344525e 100644
--- a/base/schema-kotlin/test/inputs/schema/min-max-items.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/min-max-items.schema/default/TopLevel.kt
@@ -18,9 +18,9 @@ private val klaxon = Klaxon()
     .convert(UnionItem::class, { UnionItem.fromJson(it) }, { it.toJson() }, true)
 
 data class TopLevel (
+    val minOnly: List<String>,
     val maxOnly: List<Long>,
     val minAndMax: List<Double>,
-    val minOnly: List<String>,
     val plain: List<String>,
     val unionItems: List<UnionItem>
 ) {
diff --git a/base/schema-kotlin/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt
index 2f2ffc7..1389c13 100644
--- a/base/schema-kotlin/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt
@@ -10,13 +10,13 @@ private val klaxon = Klaxon()
 
 data class TopLevel (
     val free: Long,
-    val intersection: Long,
-    val max: Long,
     val min: Long,
+    val max: Long,
     val minmax: Long,
-    val minMaxIntersection: Long,
+    val union: Long,
     val minMaxUnion: Long,
-    val union: Long
+    val intersection: Long,
+    val minMaxIntersection: Long
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/minmax.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/minmax.schema/default/TopLevel.kt
index d81860a..ebd4702 100644
--- a/base/schema-kotlin/test/inputs/schema/minmax.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/minmax.schema/default/TopLevel.kt
@@ -10,13 +10,13 @@ private val klaxon = Klaxon()
 
 data class TopLevel (
     val free: Double,
-    val intersection: Double,
-    val max: Double,
     val min: Double,
+    val max: Double,
     val minmax: Double,
-    val minMaxIntersection: Double,
+    val union: Double,
     val minMaxUnion: Double,
-    val union: Double
+    val intersection: Double,
+    val minMaxIntersection: Double
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
index b6cabeb..ab7ddaa 100644
--- a/base/schema-kotlin/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
@@ -18,14 +18,14 @@ private val klaxon = Klaxon()
     .convert(InUnion::class, { InUnion.fromJson(it) }, { it.toJson() }, true)
 
 data class TopLevel (
-    val intersection: String,
-    val inUnion: InUnion,
-    val maxlength: String,
     val minlength: String,
-    val minMaxIntersection: String,
+    val maxlength: String,
     val minmaxlength: String,
+    val union: String,
+    val inUnion: InUnion,
     val minMaxUnion: String,
-    val union: String
+    val intersection: String,
+    val minMaxIntersection: String
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt
index bd0fb7a..018b189 100644
--- a/base/schema-kotlin/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt
@@ -9,8 +9,8 @@ import com.beust.klaxon.*
 private val klaxon = Klaxon()
 
 data class TopLevel (
-    val bar: Long,
     val foo: Long,
+    val bar: Long,
     val quux: Boolean
 ) {
     public fun toJson() = klaxon.toJsonString(this)
diff --git a/base/schema-kotlin/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt
index 4097cbc..9345323 100644
--- a/base/schema-kotlin/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt
@@ -18,8 +18,8 @@ private val klaxon = Klaxon()
     .convert(Kind::class, { Kind.fromValue(it.string!!) }, { "\"${it.value}\"" })
 
 data class TopLevel (
-    val b: String? = null,
-    val kind: Kind
+    val kind: Kind,
+    val b: String? = null
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/optional-any.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/optional-any.schema/default/TopLevel.kt
index ef2fc6e..60ffd8f 100644
--- a/base/schema-kotlin/test/inputs/schema/optional-any.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/optional-any.schema/default/TopLevel.kt
@@ -9,8 +9,8 @@ import com.beust.klaxon.*
 private val klaxon = Klaxon()
 
 data class TopLevel (
-    val bar: Boolean,
-    val foo: Any? = null
+    val foo: Any? = null,
+    val bar: Boolean
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt
index 6462ec1..2254a7d 100644
--- a/base/schema-kotlin/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt
@@ -10,12 +10,12 @@ private val klaxon = Klaxon()
 
 data class TopLevel (
     val coordinates: List<Coordinate>? = null,
-    val count: Long? = null,
-    val label: String? = null,
     val requiredCoordinates: List<Coordinate>,
+    val count: Long? = null,
     val requiredCount: Long,
-    val requiredLabel: String,
-    val weight: Double? = null
+    val weight: Double? = null,
+    val label: String? = null,
+    val requiredLabel: String
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt
index 3d6b5f1..ffe0803 100644
--- a/base/schema-kotlin/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt
@@ -9,11 +9,11 @@ import com.beust.klaxon.*
 private val klaxon = Klaxon()
 
 data class TopLevel (
-    val optDouble: Double? = null,
+    val reqZeroMin: Long,
     val optInt: Long? = null,
-    val optPattern: String? = null,
+    val optDouble: Double? = null,
     val optString: String? = null,
-    val reqZeroMin: Long
+    val optPattern: String? = null
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt
index 2340240..37b69f1 100644
--- a/base/schema-kotlin/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt
@@ -24,23 +24,23 @@ private val klaxon = Klaxon()
     .convert(OffsetTime::class,     { OffsetTime.parse(it.string!!) },     { "\"${java.time.format.DateTimeFormatter.ISO_OFFSET_TIME.format(it)}\"" })
 
 data class TopLevel (
-    @Json(name = "optional-date")
-    val optionalDate: LocalDate? = null,
-
-    @Json(name = "optional-date-time")
-    val optionalDateTime: OffsetDateTime? = null,
-
-    @Json(name = "optional-time")
-    val optionalTime: OffsetTime? = null,
-
     @Json(name = "required-date")
     val requiredDate: LocalDate,
 
+    @Json(name = "required-time")
+    val requiredTime: OffsetTime,
+
     @Json(name = "required-date-time")
     val requiredDateTime: OffsetDateTime,
 
-    @Json(name = "required-time")
-    val requiredTime: OffsetTime
+    @Json(name = "optional-date")
+    val optionalDate: LocalDate? = null,
+
+    @Json(name = "optional-time")
+    val optionalTime: OffsetTime? = null,
+
+    @Json(name = "optional-date-time")
+    val optionalDateTime: OffsetDateTime? = null
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/base/schema-kotlin/test/inputs/schema/prefix-items.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/prefix-items.schema/default/TopLevel.kt
index 5a2adc3..45eec23 100644
--- a/base/schema-kotlin/test/inputs/schema/prefix-items.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/prefix-items.schema/default/TopLevel.kt
@@ -18,8 +18,8 @@ private val klaxon = Klaxon()
     .convert(Open::class, { Open.fromJson(it) }, { it.toJson() }, true)
 
 data class TopLevel (
-    val open: List<Open>,
-    val tuple: List<Open>
+    val tuple: List<Open>,
+    val open: List<Open>
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
diff --git a/head/schema-kotlin/test/inputs/schema/property-order.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/property-order.schema/default/TopLevel.kt
new file mode 100644
index 0000000..04b60c4
--- /dev/null
+++ b/head/schema-kotlin/test/inputs/schema/property-order.schema/default/TopLevel.kt
@@ -0,0 +1,30 @@
+// To parse the JSON, install Klaxon and do:
+//
+//   val topLevel = TopLevel.fromJson(jsonString)
+
+package quicktype
+
+import com.beust.klaxon.*
+
+private val klaxon = Klaxon()
+
+data class TopLevel (
+    val zebra: String,
+    val mango: Double,
+    val apple: Boolean,
+    val delta: String,
+    val banana: Long,
+    val ordered: Ordered
+) {
+    public fun toJson() = klaxon.toJsonString(this)
+
+    companion object {
+        public fun fromJson(json: String) = klaxon.parse<TopLevel>(json)
+    }
+}
+
+data class Ordered (
+    val mango: Double,
+    val zebra: String,
+    val apple: Boolean
+)
diff --git a/base/schema-kotlin/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt
index 45683a2..841729f 100644
--- a/base/schema-kotlin/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt
@@ -32,13 +32,13 @@ data class TopLevel (
 
 data class Fruit (
     val apple: Boolean? = null,
-    val berries: List<Berry>? = null,
-    val orange: Boolean? = null
+    val orange: Boolean? = null,
+    val berries: List<Berry>? = null
 )
 
 data class Berry (
-    val color: Color? = null,
     val name: String? = null,
+    val color: Color? = null,
     val shapes: List<Shape>? = null
 )
 
@@ -47,8 +47,8 @@ data class Color (
 )
 
 data class Shape (
-    val geometry: Geometry? = null,
-    val history: History? = null
+    val history: History? = null,
+    val geometry: Geometry? = null
 )
 
 data class Geometry (
@@ -65,9 +65,9 @@ data class RectShape (
 )
 
 data class Part (
-    val depth: String? = null,
     val length: String? = null,
-    val width: String? = null
+    val width: String? = null,
+    val depth: String? = null
 )
 
 data class History (
@@ -76,12 +76,12 @@ data class History (
 )
 
 data class Vehicle (
-    val brand: String? = null,
     val id: String? = null,
-    val speed: Speed? = null,
-    val subModule: Boolean? = null,
     val type: VehicleType? = null,
-    val year: String? = null
+    val speed: Speed? = null,
+    val year: String? = null,
+    val brand: String? = null,
+    val subModule: Boolean? = null
 )
 
 data class Speed (
@@ -89,8 +89,8 @@ data class Speed (
 )
 
 data class Limit (
-    val maximum: Double? = null,
-    val minimum: Double? = null
+    val minimum: Double? = null,
+    val maximum: Double? = null
 )
 
 data class VehicleType (
diff --git a/base/schema-kotlin/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.kt
index e91f58c..99c1967 100644
--- a/base/schema-kotlin/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.kt
@@ -18,8 +18,8 @@ private val klaxon = Klaxon()
     .convert(Next::class, { Next.fromJson(it) }, { it.toJson() }, true)
 
 data class TopLevel (
-    val next: Next? = null,
-    val value: String
+    val value: String,
+    val next: Next? = null
 ) {
     public fun toJson() = klaxon.toJsonString(this)
 
@@ -29,8 +29,8 @@ data class TopLevel (
 }
 
 data class Node (
-    val next: Next? = null,
-    val value: String
+    val value: String,
+    val next: Next? = null
 )
 
 sealed class Next {
diff --git a/base/schema-kotlin/test/inputs/schema/vega-lite.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/vega-lite.schema/default/TopLevel.kt
index 31c56c7..01b5ec7 100644
--- a/base/schema-kotlin/test/inputs/schema/vega-lite.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/vega-lite.schema/default/TopLevel.kt
@@ -693,6 +693,13 @@ data class MarkConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -704,13 +711,6 @@ data class MarkConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -1285,11 +1285,6 @@ data class AxisConfig (
      */
     val tickRound: Boolean? = null,
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    val ticks: Boolean? = null,
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -1300,6 +1295,11 @@ data class AxisConfig (
      */
     val tickWidth: Double? = null,
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    val ticks: Boolean? = null,
+
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1629,11 +1629,6 @@ data class VGAxisConfig (
      */
     val tickRound: Boolean? = null,
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    val ticks: Boolean? = null,
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -1644,6 +1639,11 @@ data class VGAxisConfig (
      */
     val tickWidth: Double? = null,
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    val ticks: Boolean? = null,
+
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1783,6 +1783,13 @@ data class BarConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -1794,13 +1801,6 @@ data class BarConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -3239,6 +3239,13 @@ data class TextConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -3250,13 +3257,6 @@ data class TextConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -3470,6 +3470,13 @@ data class TickConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -3481,13 +3488,6 @@ data class TickConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -6603,14 +6603,14 @@ data class Axis (
     val tickCount: Double? = null,
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      */
-    val ticks: Boolean? = null,
+    val tickSize: Double? = null,
 
     /**
-     * The size in pixels of axis ticks.
+     * Boolean value that determines whether the axis should include ticks.
      */
-    val tickSize: Double? = null,
+    val ticks: Boolean? = null,
 
     /**
      * A title for the field. If `null`, the title will be removed.
@@ -7194,6 +7194,13 @@ data class MarkDef (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -7205,13 +7212,6 @@ data class MarkDef (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt
index b02b919..3b591a8 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt
@@ -38,10 +38,10 @@ data class TopLevel (
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val frequency: Frequency,
 
-    val description: String? = null,
-
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val type: Type
+    val type: Type,
+
+    val description: String? = null
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt
index 7701a0c..a3847b0 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt
@@ -19,14 +19,14 @@ val mapper = jacksonObjectMapper().apply {
 }
 
 data class TopLevel (
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val foo: String,
+
     val disallowed: Any? = null,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val empty: List<Any?>,
 
-    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val foo: String,
-
     val impossible: Any? = null
 ) {
     fun toJson() = mapper.writeValueAsString(this)
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/comment-injection.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/comment-injection.schema/default/TopLevel.kt
index 432cbc7..c40b2f3 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/comment-injection.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/comment-injection.schema/default/TopLevel.kt
@@ -33,21 +33,6 @@ val mapper = jacksonObjectMapper().apply {
  * }
  */
 data class TopLevel (
-    /**
-     * Ends with a backslash \
-     */
-    val trailingBackslash: String? = null,
-
-    /**
-     * Ends with a quote "
-     */
-    val trailingQuote: String? = null,
-
-    /**
-     * Ends with a triple quote """
-     */
-    val trailingTripleQuote: String? = null,
-
     /**
      * Property delimiters:
      * * /
@@ -63,7 +48,22 @@ data class TopLevel (
      * }
      */
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val value: String
+    val value: String,
+
+    /**
+     * Ends with a backslash \
+     */
+    val trailingBackslash: String? = null,
+
+    /**
+     * Ends with a quote "
+     */
+    val trailingQuote: String? = null,
+
+    /**
+     * Ends with a triple quote """
+     */
+    val trailingTripleQuote: String? = null
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/const-non-string.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/const-non-string.schema/default/TopLevel.kt
index b116d29..ef1089a 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/const-non-string.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/const-non-string.schema/default/TopLevel.kt
@@ -32,19 +32,19 @@ val mapper = jacksonObjectMapper().apply {
 
 data class TopLevel (
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val amount: Long,
+    val version: Double,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val enabled: Boolean,
+    val amount: Long,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val kind: Kind,
+    val ratio: Double,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val ratio: Double,
+    val enabled: Boolean,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val version: Double
+    val kind: Kind
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.kt
index 90baba4..6840a6d 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/date-time-or-string.schema/default/TopLevel.kt
@@ -36,10 +36,10 @@ val mapper = jacksonObjectMapper().apply {
 
 data class TopLevel (
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val bar: BarUnion,
+    val foo: String,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val foo: String
+    val bar: BarUnion
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/date-time.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/date-time.schema/default/TopLevel.kt
index 0feb684..2bd2822 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/date-time.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/date-time.schema/default/TopLevel.kt
@@ -40,20 +40,20 @@ val mapper = jacksonObjectMapper().apply {
 }
 
 data class TopLevel (
-    @get:JsonProperty("complex-union-array", required=true)@field:JsonProperty("complex-union-array", required=true)
-    val complexUnionArray: List<ComplexUnionArrayElement>,
-
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val date: LocalDate,
 
-    @get:JsonProperty("date-time", required=true)@field:JsonProperty("date-time", required=true)
-    val dateTime: OffsetDateTime,
-
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val time: OffsetTime,
 
+    @get:JsonProperty("date-time", required=true)@field:JsonProperty("date-time", required=true)
+    val dateTime: OffsetDateTime,
+
     @get:JsonProperty("union-array", required=true)@field:JsonProperty("union-array", required=true)
-    val unionArray: List<UnionArray>
+    val unionArray: List<UnionArray>,
+
+    @get:JsonProperty("complex-union-array", required=true)@field:JsonProperty("complex-union-array", required=true)
+    val complexUnionArray: List<ComplexUnionArrayElement>
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/enum.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/enum.schema/default/TopLevel.kt
index f7370d7..668e788 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/enum.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/enum.schema/default/TopLevel.kt
@@ -34,16 +34,16 @@ val mapper = jacksonObjectMapper().apply {
 }
 
 data class TopLevel (
-    val arr: List<Arr>? = null,
-
-    @get:JsonProperty("for")@field:JsonProperty("for")
-    val topLevelFor: String? = null,
+    val lvc: Lvc? = null,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val gve: Gve,
 
-    val lvc: Lvc? = null,
-    val otherArr: List<OtherArr>? = null
+    val arr: List<Arr>? = null,
+    val otherArr: List<OtherArr>? = null,
+
+    @get:JsonProperty("for")@field:JsonProperty("for")
+    val topLevelFor: String? = null
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/integer-type.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/integer-type.schema/default/TopLevel.kt
index b55571c..0a6ffd2 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/integer-type.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/integer-type.schema/default/TopLevel.kt
@@ -19,32 +19,32 @@ val mapper = jacksonObjectMapper().apply {
 }
 
 data class TopLevel (
-    @get:JsonProperty("above_i32_max", required=true)@field:JsonProperty("above_i32_max", required=true)
-    val aboveI32Max: Long,
+    @get:JsonProperty("small_positive", required=true)@field:JsonProperty("small_positive", required=true)
+    val smallPositive: Long,
 
-    @get:JsonProperty("below_i32_min", required=true)@field:JsonProperty("below_i32_min", required=true)
-    val belowI32Min: Long,
+    @get:JsonProperty("small_negative", required=true)@field:JsonProperty("small_negative", required=true)
+    val smallNegative: Long,
 
     @get:JsonProperty("i32_range", required=true)@field:JsonProperty("i32_range", required=true)
     val i32Range: Long,
 
-    @get:JsonProperty("large_bounds", required=true)@field:JsonProperty("large_bounds", required=true)
-    val largeBounds: Long,
+    @get:JsonProperty("above_i32_max", required=true)@field:JsonProperty("above_i32_max", required=true)
+    val aboveI32Max: Long,
 
-    @get:JsonProperty("only_maximum", required=true)@field:JsonProperty("only_maximum", required=true)
-    val onlyMaximum: Long,
+    @get:JsonProperty("below_i32_min", required=true)@field:JsonProperty("below_i32_min", required=true)
+    val belowI32Min: Long,
 
     @get:JsonProperty("only_minimum", required=true)@field:JsonProperty("only_minimum", required=true)
     val onlyMinimum: Long,
 
-    @get:JsonProperty("small_negative", required=true)@field:JsonProperty("small_negative", required=true)
-    val smallNegative: Long,
-
-    @get:JsonProperty("small_positive", required=true)@field:JsonProperty("small_positive", required=true)
-    val smallPositive: Long,
+    @get:JsonProperty("only_maximum", required=true)@field:JsonProperty("only_maximum", required=true)
+    val onlyMaximum: Long,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val unbounded: Long
+    val unbounded: Long,
+
+    @get:JsonProperty("large_bounds", required=true)@field:JsonProperty("large_bounds", required=true)
+    val largeBounds: Long
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/light.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/light.schema/default/TopLevel.kt
index 6951661..4dac237 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/light.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/light.schema/default/TopLevel.kt
@@ -30,12 +30,12 @@ data class TopLevel (
 }
 
 data class LightParams (
-    @get:JsonProperty("app_id", required=true)@field:JsonProperty("app_id", required=true)
-    val appID: String,
-
     @get:JsonProperty("outlet_id", required=true)@field:JsonProperty("outlet_id", required=true)
     val outletID: String,
 
+    @get:JsonProperty("app_id", required=true)@field:JsonProperty("app_id", required=true)
+    val appID: String,
+
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val rgba: String
 )
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/min-max-items.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/min-max-items.schema/default/TopLevel.kt
index 47099df..26bed0b 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/min-max-items.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/min-max-items.schema/default/TopLevel.kt
@@ -32,13 +32,13 @@ val mapper = jacksonObjectMapper().apply {
 
 data class TopLevel (
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val maxOnly: List<Long>,
+    val minOnly: List<String>,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val minAndMax: List<Double>,
+    val maxOnly: List<Long>,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val minOnly: List<String>,
+    val minAndMax: List<Double>,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val plain: List<String>,
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt
index e9ed299..b44ad1f 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt
@@ -23,25 +23,25 @@ data class TopLevel (
     val free: Long,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val intersection: Long,
+    val min: Long,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val max: Long,
 
-    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val min: Long,
-
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val minmax: Long,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val minMaxIntersection: Long,
+    val union: Long,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val minMaxUnion: Long,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val union: Long
+    val intersection: Long,
+
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val minMaxIntersection: Long
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/minmax.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/minmax.schema/default/TopLevel.kt
index f6b762d..f99a54b 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/minmax.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/minmax.schema/default/TopLevel.kt
@@ -23,25 +23,25 @@ data class TopLevel (
     val free: Double,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val intersection: Double,
+    val min: Double,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val max: Double,
 
-    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val min: Double,
-
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val minmax: Double,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val minMaxIntersection: Double,
+    val union: Double,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val minMaxUnion: Double,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val union: Double
+    val intersection: Double,
+
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val minMaxIntersection: Double
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
index 1bad4ec..4404d70 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
@@ -32,28 +32,28 @@ val mapper = jacksonObjectMapper().apply {
 
 data class TopLevel (
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val intersection: String,
-
-    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val inUnion: InUnion,
+    val minlength: String,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val maxlength: String,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val minlength: String,
+    val minmaxlength: String,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val minMaxIntersection: String,
+    val union: String,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val minmaxlength: String,
+    val inUnion: InUnion,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val minMaxUnion: String,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val union: String
+    val intersection: String,
+
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val minMaxIntersection: String
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt
index 50ed9dd..b5be145 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt
@@ -20,10 +20,10 @@ val mapper = jacksonObjectMapper().apply {
 
 data class TopLevel (
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val bar: Long,
+    val foo: Long,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val foo: Long,
+    val bar: Long,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val quux: Boolean
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt
index 4bfebe9..265182b 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt
@@ -31,10 +31,10 @@ val mapper = jacksonObjectMapper().apply {
 }
 
 data class TopLevel (
-    val b: String? = null,
-
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val kind: Kind
+    val kind: Kind,
+
+    val b: String? = null
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/optional-any.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/optional-any.schema/default/TopLevel.kt
index e659d9c..d3f6497 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/optional-any.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/optional-any.schema/default/TopLevel.kt
@@ -19,10 +19,10 @@ val mapper = jacksonObjectMapper().apply {
 }
 
 data class TopLevel (
-    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val bar: Boolean,
+    val foo: Any? = null,
 
-    val foo: Any? = null
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val bar: Boolean
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt
index 725b9b4..898516f 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt
@@ -20,19 +20,20 @@ val mapper = jacksonObjectMapper().apply {
 
 data class TopLevel (
     val coordinates: List<Coordinate>? = null,
-    val count: Long? = null,
-    val label: String? = null,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val requiredCoordinates: List<Coordinate>,
 
+    val count: Long? = null,
+
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val requiredCount: Long,
 
-    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val requiredLabel: String,
+    val weight: Double? = null,
+    val label: String? = null,
 
-    val weight: Double? = null
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val requiredLabel: String
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt
index 185626c..4cf13d8 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt
@@ -19,13 +19,13 @@ val mapper = jacksonObjectMapper().apply {
 }
 
 data class TopLevel (
-    val optDouble: Double? = null,
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val reqZeroMin: Long,
+
     val optInt: Long? = null,
-    val optPattern: String? = null,
+    val optDouble: Double? = null,
     val optString: String? = null,
-
-    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val reqZeroMin: Long
+    val optPattern: String? = null
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt
index f528aad..e72bfe1 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt
@@ -37,23 +37,23 @@ val mapper = jacksonObjectMapper().apply {
 }
 
 data class TopLevel (
-    @get:JsonProperty("optional-date")@field:JsonProperty("optional-date")
-    val optionalDate: LocalDate? = null,
-
-    @get:JsonProperty("optional-date-time")@field:JsonProperty("optional-date-time")
-    val optionalDateTime: OffsetDateTime? = null,
-
-    @get:JsonProperty("optional-time")@field:JsonProperty("optional-time")
-    val optionalTime: OffsetTime? = null,
-
     @get:JsonProperty("required-date", required=true)@field:JsonProperty("required-date", required=true)
     val requiredDate: LocalDate,
 
+    @get:JsonProperty("required-time", required=true)@field:JsonProperty("required-time", required=true)
+    val requiredTime: OffsetTime,
+
     @get:JsonProperty("required-date-time", required=true)@field:JsonProperty("required-date-time", required=true)
     val requiredDateTime: OffsetDateTime,
 
-    @get:JsonProperty("required-time", required=true)@field:JsonProperty("required-time", required=true)
-    val requiredTime: OffsetTime
+    @get:JsonProperty("optional-date")@field:JsonProperty("optional-date")
+    val optionalDate: LocalDate? = null,
+
+    @get:JsonProperty("optional-time")@field:JsonProperty("optional-time")
+    val optionalTime: OffsetTime? = null,
+
+    @get:JsonProperty("optional-date-time")@field:JsonProperty("optional-date-time")
+    val optionalDateTime: OffsetDateTime? = null
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/prefix-items.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/prefix-items.schema/default/TopLevel.kt
index b06e6ea..24650a1 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/prefix-items.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/prefix-items.schema/default/TopLevel.kt
@@ -32,10 +32,10 @@ val mapper = jacksonObjectMapper().apply {
 
 data class TopLevel (
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val open: List<Open>,
+    val tuple: List<Open>,
 
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val tuple: List<Open>
+    val open: List<Open>
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
diff --git a/head/schema-kotlin-jackson/test/inputs/schema/property-order.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/property-order.schema/default/TopLevel.kt
new file mode 100644
index 0000000..f6a41ea
--- /dev/null
+++ b/head/schema-kotlin-jackson/test/inputs/schema/property-order.schema/default/TopLevel.kt
@@ -0,0 +1,56 @@
+// To parse the JSON, install jackson-module-kotlin and do:
+//
+//   val topLevel = TopLevel.fromJson(jsonString)
+
+package quicktype
+
+import com.fasterxml.jackson.annotation.*
+import com.fasterxml.jackson.core.*
+import com.fasterxml.jackson.databind.*
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer
+import com.fasterxml.jackson.databind.module.SimpleModule
+import com.fasterxml.jackson.databind.node.*
+import com.fasterxml.jackson.databind.ser.std.StdSerializer
+import com.fasterxml.jackson.module.kotlin.*
+
+val mapper = jacksonObjectMapper().apply {
+    propertyNamingStrategy = PropertyNamingStrategy.LOWER_CAMEL_CASE
+    setSerializationInclusion(JsonInclude.Include.NON_NULL)
+}
+
+data class TopLevel (
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val zebra: String,
+
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val mango: Double,
+
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val apple: Boolean,
+
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val delta: String,
+
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val banana: Long,
+
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val ordered: Ordered
+) {
+    fun toJson() = mapper.writeValueAsString(this)
+
+    companion object {
+        fun fromJson(json: String) = mapper.readValue<TopLevel>(json)
+    }
+}
+
+data class Ordered (
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val mango: Double,
+
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val zebra: String,
+
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val apple: Boolean
+)
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt
index 9fb1715..becab64 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt
@@ -45,13 +45,13 @@ data class TopLevel (
 
 data class Fruit (
     val apple: Boolean? = null,
-    val berries: List<Berry>? = null,
-    val orange: Boolean? = null
+    val orange: Boolean? = null,
+    val berries: List<Berry>? = null
 )
 
 data class Berry (
-    val color: Color? = null,
     val name: String? = null,
+    val color: Color? = null,
     val shapes: List<Shape>? = null
 )
 
@@ -60,8 +60,8 @@ data class Color (
 )
 
 data class Shape (
-    val geometry: Geometry? = null,
-    val history: History? = null
+    val history: History? = null,
+    val geometry: Geometry? = null
 )
 
 data class Geometry (
@@ -78,9 +78,9 @@ data class RectShape (
 )
 
 data class Part (
-    val depth: String? = null,
     val length: String? = null,
-    val width: String? = null
+    val width: String? = null,
+    val depth: String? = null
 )
 
 data class History (
@@ -89,12 +89,12 @@ data class History (
 )
 
 data class Vehicle (
-    val brand: String? = null,
     val id: String? = null,
-    val speed: Speed? = null,
-    val subModule: Boolean? = null,
     val type: VehicleType? = null,
-    val year: String? = null
+    val speed: Speed? = null,
+    val year: String? = null,
+    val brand: String? = null,
+    val subModule: Boolean? = null
 )
 
 data class Speed (
@@ -102,8 +102,8 @@ data class Speed (
 )
 
 data class Limit (
-    val maximum: Double? = null,
-    val minimum: Double? = null
+    val minimum: Double? = null,
+    val maximum: Double? = null
 )
 
 data class VehicleType (
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.kt
index fc0ceff..a19b8aa 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.kt
@@ -31,10 +31,10 @@ val mapper = jacksonObjectMapper().apply {
 }
 
 data class TopLevel (
-    val next: Next? = null,
-
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val value: String
+    val value: String,
+
+    val next: Next? = null
 ) {
     fun toJson() = mapper.writeValueAsString(this)
 
@@ -44,10 +44,10 @@ data class TopLevel (
 }
 
 data class Node (
-    val next: Next? = null,
-
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
-    val value: String
+    val value: String,
+
+    val next: Next? = null
 )
 
 sealed class Next {
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/vega-lite.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/vega-lite.schema/default/TopLevel.kt
index bd9d865..5d59061 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/vega-lite.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/vega-lite.schema/default/TopLevel.kt
@@ -706,6 +706,13 @@ data class MarkConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -717,13 +724,6 @@ data class MarkConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -1298,11 +1298,6 @@ data class AxisConfig (
      */
     val tickRound: Boolean? = null,
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    val ticks: Boolean? = null,
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -1313,6 +1308,11 @@ data class AxisConfig (
      */
     val tickWidth: Double? = null,
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    val ticks: Boolean? = null,
+
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1642,11 +1642,6 @@ data class VGAxisConfig (
      */
     val tickRound: Boolean? = null,
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    val ticks: Boolean? = null,
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -1657,6 +1652,11 @@ data class VGAxisConfig (
      */
     val tickWidth: Double? = null,
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    val ticks: Boolean? = null,
+
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1796,6 +1796,13 @@ data class BarConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -1807,13 +1814,6 @@ data class BarConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -3255,6 +3255,13 @@ data class TextConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -3266,13 +3273,6 @@ data class TextConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -3486,6 +3486,13 @@ data class TickConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -3497,13 +3504,6 @@ data class TickConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -6632,14 +6632,14 @@ data class Axis (
     val tickCount: Double? = null,
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      */
-    val ticks: Boolean? = null,
+    val tickSize: Double? = null,
 
     /**
-     * The size in pixels of axis ticks.
+     * Boolean value that determines whether the axis should include ticks.
      */
-    val tickSize: Double? = null,
+    val ticks: Boolean? = null,
 
     /**
      * A title for the field. If `null`, the title will be removed.
@@ -7223,6 +7223,13 @@ data class MarkDef (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -7234,13 +7241,6 @@ data class MarkDef (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-kotlinx/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt
index 34f3c08..344de80 100644
--- a/base/schema-kotlinx/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.kt
@@ -14,8 +14,8 @@ import kotlinx.serialization.encoding.*
 data class TopLevel (
     val amount: Double,
     val frequency: Frequency,
-    val description: String? = null,
-    val type: Type
+    val type: Type,
+    val description: String? = null
 )
 
 @Serializable
diff --git a/base/schema-kotlinx/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt
index 74fc888..01f609a 100644
--- a/base/schema-kotlinx/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/boolean-subschema.schema/default/TopLevel.kt
@@ -12,8 +12,8 @@ import kotlinx.serialization.encoding.*
 
 @Serializable
 data class TopLevel (
+    val foo: String,
     val disallowed: JsonElement? = null,
     val empty: JsonArray,
-    val foo: String,
     val impossible: JsonElement? = null
 )
diff --git a/base/schema-kotlinx/test/inputs/schema/comment-injection.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/comment-injection.schema/default/TopLevel.kt
index a60b0fd..0295130 100644
--- a/base/schema-kotlinx/test/inputs/schema/comment-injection.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/comment-injection.schema/default/TopLevel.kt
@@ -26,21 +26,6 @@ import kotlinx.serialization.encoding.*
  */
 @Serializable
 data class TopLevel (
-    /**
-     * Ends with a backslash \
-     */
-    val trailingBackslash: String? = null,
-
-    /**
-     * Ends with a quote "
-     */
-    val trailingQuote: String? = null,
-
-    /**
-     * Ends with a triple quote """
-     */
-    val trailingTripleQuote: String? = null,
-
     /**
      * Property delimiters:
      * * /
@@ -55,5 +40,20 @@ data class TopLevel (
      * }
      * }
      */
-    val value: String
+    val value: String,
+
+    /**
+     * Ends with a backslash \
+     */
+    val trailingBackslash: String? = null,
+
+    /**
+     * Ends with a quote "
+     */
+    val trailingQuote: String? = null,
+
+    /**
+     * Ends with a triple quote """
+     */
+    val trailingTripleQuote: String? = null
 )
diff --git a/base/schema-kotlinx/test/inputs/schema/const-non-string.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/const-non-string.schema/default/TopLevel.kt
index e97dee3..884bc46 100644
--- a/base/schema-kotlinx/test/inputs/schema/const-non-string.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/const-non-string.schema/default/TopLevel.kt
@@ -12,11 +12,11 @@ import kotlinx.serialization.encoding.*
 
 @Serializable
 data class TopLevel (
+    val version: Double,
     val amount: Long,
-    val enabled: Boolean,
-    val kind: Kind,
     val ratio: Double,
-    val version: Double
+    val enabled: Boolean,
+    val kind: Kind
 )
 
 @Serializable
diff --git a/base/schema-kotlinx/test/inputs/schema/integer-type.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/integer-type.schema/default/TopLevel.kt
index 6518652..1f50efe 100644
--- a/base/schema-kotlinx/test/inputs/schema/integer-type.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/integer-type.schema/default/TopLevel.kt
@@ -12,29 +12,29 @@ import kotlinx.serialization.encoding.*
 
 @Serializable
 data class TopLevel (
-    @SerialName("above_i32_max")
-    val aboveI32Max: Long,
+    @SerialName("small_positive")
+    val smallPositive: Long,
 
-    @SerialName("below_i32_min")
-    val belowI32Min: Long,
+    @SerialName("small_negative")
+    val smallNegative: Long,
 
     @SerialName("i32_range")
     val i32Range: Long,
 
-    @SerialName("large_bounds")
-    val largeBounds: Long,
+    @SerialName("above_i32_max")
+    val aboveI32Max: Long,
 
-    @SerialName("only_maximum")
-    val onlyMaximum: Long,
+    @SerialName("below_i32_min")
+    val belowI32Min: Long,
 
     @SerialName("only_minimum")
     val onlyMinimum: Long,
 
-    @SerialName("small_negative")
-    val smallNegative: Long,
+    @SerialName("only_maximum")
+    val onlyMaximum: Long,
 
-    @SerialName("small_positive")
-    val smallPositive: Long,
+    val unbounded: Long,
 
-    val unbounded: Long
+    @SerialName("large_bounds")
+    val largeBounds: Long
 )
diff --git a/base/schema-kotlinx/test/inputs/schema/light.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/light.schema/default/TopLevel.kt
index 1d69fea..29a7c62 100644
--- a/base/schema-kotlinx/test/inputs/schema/light.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/light.schema/default/TopLevel.kt
@@ -18,11 +18,11 @@ data class TopLevel (
 
 @Serializable
 data class LightParams (
-    @SerialName("app_id")
-    val appID: String,
-
     @SerialName("outlet_id")
     val outletID: String,
 
+    @SerialName("app_id")
+    val appID: String,
+
     val rgba: String
 )
diff --git a/base/schema-kotlinx/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt
index 4e63efc..99601b5 100644
--- a/base/schema-kotlinx/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/minmax-integer.schema/default/TopLevel.kt
@@ -13,11 +13,11 @@ import kotlinx.serialization.encoding.*
 @Serializable
 data class TopLevel (
     val free: Long,
-    val intersection: Long,
-    val max: Long,
     val min: Long,
+    val max: Long,
     val minmax: Long,
-    val minMaxIntersection: Long,
+    val union: Long,
     val minMaxUnion: Long,
-    val union: Long
+    val intersection: Long,
+    val minMaxIntersection: Long
 )
diff --git a/base/schema-kotlinx/test/inputs/schema/minmax.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/minmax.schema/default/TopLevel.kt
index 7134bdb..e89e11f 100644
--- a/base/schema-kotlinx/test/inputs/schema/minmax.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/minmax.schema/default/TopLevel.kt
@@ -13,11 +13,11 @@ import kotlinx.serialization.encoding.*
 @Serializable
 data class TopLevel (
     val free: Double,
-    val intersection: Double,
-    val max: Double,
     val min: Double,
+    val max: Double,
     val minmax: Double,
-    val minMaxIntersection: Double,
+    val union: Double,
     val minMaxUnion: Double,
-    val union: Double
+    val intersection: Double,
+    val minMaxIntersection: Double
 )
diff --git a/base/schema-kotlinx/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt
index 6c73789..185330d 100644
--- a/base/schema-kotlinx/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/non-standard-ref.schema/default/TopLevel.kt
@@ -12,7 +12,7 @@ import kotlinx.serialization.encoding.*
 
 @Serializable
 data class TopLevel (
-    val bar: Long,
     val foo: Long,
+    val bar: Long,
     val quux: Boolean
 )
diff --git a/base/schema-kotlinx/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt
index 0af31d1..d59677b 100644
--- a/base/schema-kotlinx/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.kt
@@ -12,8 +12,8 @@ import kotlinx.serialization.encoding.*
 
 @Serializable
 data class TopLevel (
-    val b: String? = null,
-    val kind: Kind
+    val kind: Kind,
+    val b: String? = null
 )
 
 @Serializable
diff --git a/base/schema-kotlinx/test/inputs/schema/optional-any.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/optional-any.schema/default/TopLevel.kt
index 21669e4..84efc58 100644
--- a/base/schema-kotlinx/test/inputs/schema/optional-any.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/optional-any.schema/default/TopLevel.kt
@@ -12,6 +12,6 @@ import kotlinx.serialization.encoding.*
 
 @Serializable
 data class TopLevel (
-    val bar: Boolean,
-    val foo: JsonElement? = null
+    val foo: JsonElement? = null,
+    val bar: Boolean
 )
diff --git a/base/schema-kotlinx/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt
index 300cb54..da965c3 100644
--- a/base/schema-kotlinx/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/optional-const-ref.schema/default/TopLevel.kt
@@ -13,12 +13,12 @@ import kotlinx.serialization.encoding.*
 @Serializable
 data class TopLevel (
     val coordinates: List<Coordinate>? = null,
-    val count: Long? = null,
-    val label: String? = null,
     val requiredCoordinates: List<Coordinate>,
+    val count: Long? = null,
     val requiredCount: Long,
-    val requiredLabel: String,
-    val weight: Double? = null
+    val weight: Double? = null,
+    val label: String? = null,
+    val requiredLabel: String
 )
 
 @Serializable
diff --git a/base/schema-kotlinx/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt
index 10b4ed1..3b2992c 100644
--- a/base/schema-kotlinx/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/optional-constraints.schema/default/TopLevel.kt
@@ -12,9 +12,9 @@ import kotlinx.serialization.encoding.*
 
 @Serializable
 data class TopLevel (
-    val optDouble: Double? = null,
+    val reqZeroMin: Long,
     val optInt: Long? = null,
-    val optPattern: String? = null,
+    val optDouble: Double? = null,
     val optString: String? = null,
-    val reqZeroMin: Long
+    val optPattern: String? = null
 )
diff --git a/base/schema-kotlinx/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt
index 61259a5..2b41bf6 100644
--- a/base/schema-kotlinx/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/optional-date-time.schema/default/TopLevel.kt
@@ -18,23 +18,23 @@ import kotlinx.serialization.encoding.*
 
 @Serializable
 data class TopLevel (
-    @SerialName("optional-date")
-    val optionalDate: LocalDate? = null,
-
-    @SerialName("optional-date-time")
-    val optionalDateTime: OffsetDateTime? = null,
-
-    @SerialName("optional-time")
-    val optionalTime: OffsetTime? = null,
-
     @SerialName("required-date")
     val requiredDate: LocalDate,
 
+    @SerialName("required-time")
+    val requiredTime: OffsetTime,
+
     @SerialName("required-date-time")
     val requiredDateTime: OffsetDateTime,
 
-    @SerialName("required-time")
-    val requiredTime: OffsetTime
+    @SerialName("optional-date")
+    val optionalDate: LocalDate? = null,
+
+    @SerialName("optional-time")
+    val optionalTime: OffsetTime? = null,
+
+    @SerialName("optional-date-time")
+    val optionalDateTime: OffsetDateTime? = null
 )
 
 object OffsetDateTimeSerializer : KSerializer<OffsetDateTime> {
diff --git a/head/schema-kotlinx/test/inputs/schema/property-order.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/property-order.schema/default/TopLevel.kt
new file mode 100644
index 0000000..1ac9f64
--- /dev/null
+++ b/head/schema-kotlinx/test/inputs/schema/property-order.schema/default/TopLevel.kt
@@ -0,0 +1,28 @@
+// To parse the JSON, install kotlin's serialization plugin and do:
+//
+// val json     = Json { allowStructuredMapKeys = true }
+// val topLevel = json.parse(TopLevel.serializer(), jsonString)
+
+package quicktype
+
+import kotlinx.serialization.*
+import kotlinx.serialization.json.*
+import kotlinx.serialization.descriptors.*
+import kotlinx.serialization.encoding.*
+
+@Serializable
+data class TopLevel (
+    val zebra: String,
+    val mango: Double,
+    val apple: Boolean,
+    val delta: String,
+    val banana: Long,
+    val ordered: Ordered
+)
+
+@Serializable
+data class Ordered (
+    val mango: Double,
+    val zebra: String,
+    val apple: Boolean
+)
diff --git a/base/schema-kotlinx/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt
index f99df89..c8b8b33 100644
--- a/base/schema-kotlinx/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/renaming-bug.schema/default/TopLevel.kt
@@ -20,14 +20,14 @@ data class TopLevel (
 @Serializable
 data class Fruit (
     val apple: Boolean? = null,
-    val berries: List<Berry>? = null,
-    val orange: Boolean? = null
+    val orange: Boolean? = null,
+    val berries: List<Berry>? = null
 )
 
 @Serializable
 data class Berry (
-    val color: Color? = null,
     val name: String? = null,
+    val color: Color? = null,
     val shapes: List<Shape>? = null
 )
 
@@ -38,8 +38,8 @@ data class Color (
 
 @Serializable
 data class Shape (
-    val geometry: Geometry? = null,
-    val history: History? = null
+    val history: History? = null,
+    val geometry: Geometry? = null
 )
 
 @Serializable
@@ -60,9 +60,9 @@ data class RectShape (
 
 @Serializable
 data class Part (
-    val depth: String? = null,
     val length: String? = null,
-    val width: String? = null
+    val width: String? = null,
+    val depth: String? = null
 )
 
 @Serializable
@@ -73,12 +73,12 @@ data class History (
 
 @Serializable
 data class Vehicle (
-    val brand: String? = null,
     val id: String? = null,
-    val speed: Speed? = null,
-    val subModule: Boolean? = null,
     val type: VehicleType? = null,
-    val year: String? = null
+    val speed: Speed? = null,
+    val year: String? = null,
+    val brand: String? = null,
+    val subModule: Boolean? = null
 )
 
 @Serializable
@@ -88,8 +88,8 @@ data class Speed (
 
 @Serializable
 data class Limit (
-    val maximum: Double? = null,
-    val minimum: Double? = null
+    val minimum: Double? = null,
+    val maximum: Double? = null
 )
 
 @Serializable
diff --git a/base/schema-kotlinx/test/inputs/schema/uuid.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/uuid.schema/default/TopLevel.kt
index 030b950..b567be5 100644
--- a/base/schema-kotlinx/test/inputs/schema/uuid.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/uuid.schema/default/TopLevel.kt
@@ -12,10 +12,10 @@ import kotlinx.serialization.encoding.*
 
 @Serializable
 data class TopLevel (
-    val arrNullable: List<String?>? = null,
-    val arrOne: List<String>? = null,
-    val nullable: String? = null,
     val one: String,
     val optional: String? = null,
+    val nullable: String? = null,
+    val arrOne: List<String>? = null,
+    val arrNullable: List<String?>? = null,
     val unionWithEnum: String
 )
diff --git a/base/schema-kotlinx/test/inputs/schema/vega-lite.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/vega-lite.schema/default/TopLevel.kt
index c155c12..35a7dd0 100644
--- a/base/schema-kotlinx/test/inputs/schema/vega-lite.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/vega-lite.schema/default/TopLevel.kt
@@ -585,6 +585,13 @@ data class MarkConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -596,13 +603,6 @@ data class MarkConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -1070,11 +1070,6 @@ data class AxisConfig (
      */
     val tickRound: Boolean? = null,
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    val ticks: Boolean? = null,
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -1085,6 +1080,11 @@ data class AxisConfig (
      */
     val tickWidth: Double? = null,
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    val ticks: Boolean? = null,
+
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1372,11 +1372,6 @@ data class VGAxisConfig (
      */
     val tickRound: Boolean? = null,
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    val ticks: Boolean? = null,
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -1387,6 +1382,11 @@ data class VGAxisConfig (
      */
     val tickWidth: Double? = null,
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    val ticks: Boolean? = null,
+
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1527,6 +1527,13 @@ data class BarConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -1538,13 +1545,6 @@ data class BarConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -2869,6 +2869,13 @@ data class TextConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -2880,13 +2887,6 @@ data class TextConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -3101,6 +3101,13 @@ data class TickConfig (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -3112,13 +3119,6 @@ data class TickConfig (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -5769,14 +5769,14 @@ data class Axis (
     val tickCount: Double? = null,
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      */
-    val ticks: Boolean? = null,
+    val tickSize: Double? = null,
 
     /**
-     * The size in pixels of axis ticks.
+     * Boolean value that determines whether the axis should include ticks.
      */
-    val tickSize: Double? = null,
+    val ticks: Boolean? = null,
 
     /**
      * A title for the field. If `null`, the title will be removed.
@@ -6342,6 +6342,13 @@ data class MarkDef (
      */
     val fill: String? = null,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity: Double? = null,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -6353,13 +6360,6 @@ data class MarkDef (
      */
     val filled: Boolean? = null,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity: Double? = null,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-php/test/inputs/schema/accessors.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/accessors.schema/default/TopLevel.php
index 7b17a54..86560ac 100644
--- a/base/schema-php/test/inputs/schema/accessors.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/accessors.schema/default/TopLevel.php
@@ -4,69 +4,92 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private string $barre; // json:bar Required
+    private bool|float $unionization; // json:union Required
     private EnumEnum $enumerification; // json:enum Required
     private string $foo; // json:foo Required
-    private bool|float $unionization; // json:union Required
+    private string $barre; // json:bar Required
 
     /**
-     * @param string $barre
+     * @param bool|float $unionization
      * @param EnumEnum $enumerification
      * @param string $foo
-     * @param bool|float $unionization
+     * @param string $barre
      */
-    public function __construct(string $barre, EnumEnum $enumerification, string $foo, bool|float $unionization) {
-        $this->barre = $barre;
+    public function __construct(bool|float $unionization, EnumEnum $enumerification, string $foo, string $barre) {
+        $this->unionization = $unionization;
         $this->enumerification = $enumerification;
         $this->foo = $foo;
-        $this->unionization = $unionization;
+        $this->barre = $barre;
     }
 
     /**
-     * @param string $value
+     * @param bool|float $value
      * @throws Exception
-     * @return string
+     * @return bool|float
      */
-    public static function fromBarre(string $value): string {
-        return $value; /*string*/
+    public static function fromUnionization(bool|float $value): bool|float {
+        if (is_bool($value)) {
+            return $value; /*bool*/
+        } elseif (is_float($value) || is_int($value)) {
+            return $value; /*float*/
+        } else {
+            throw new Exception('Cannot deserialize union value in TopLevel');
+        }
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return bool|float
      */
-    public function toBarre(): string {
-        if (TopLevel::validateBarre($this->barre))  {
-            return $this->barre; /*string*/
+    public function toUnionization(): bool|float {
+        if (TopLevel::validateUnionization($this->unionization))  {
+            if (is_bool($this->unionization)) {
+                return $this->unionization; /*bool*/
+            } elseif (is_float($this->unionization) || is_int($this->unionization)) {
+                return $this->unionization; /*float*/
+            } else {
+                throw new Exception('Union value has no matching member in TopLevel');
+            }
         }
-        throw new Exception('never get to this TopLevel::barre');
+        throw new Exception('never get to this TopLevel::unionization');
     }
 
     /**
-     * @param string
+     * @param bool|float
      * @return bool
      * @throws Exception
      */
-    public static function validateBarre(string $value): bool {
+    public static function validateUnionization(bool|float $value): bool {
+        if (is_bool($value)) {
+            if (!is_bool($value)) {
+                throw new Exception("Attribute Error:TopLevel::unionization");
+            }
+        } elseif (is_float($value) || is_int($value)) {
+            if (!is_float($value) && !is_int($value)) {
+                throw new Exception("Attribute Error:TopLevel::unionization");
+            }
+        } else {
+            throw new Exception("Attribute Error:TopLevel::unionization");
+        }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return bool|float
      */
-    public function getBarre(): string {
-        if (TopLevel::validateBarre($this->barre))  {
-            return $this->barre;
+    public function getUnionization(): bool|float {
+        if (TopLevel::validateUnionization($this->unionization))  {
+            return $this->unionization;
         }
-        throw new Exception('never get to getBarre TopLevel::barre');
+        throw new Exception('never get to getUnionization TopLevel::unionization');
     }
 
     /**
-     * @return string
+     * @return bool|float
      */
-    public static function sampleBarre(): string {
-        return 'TopLevel::barre::31'; /*31:barre*/
+    public static function sampleUnionization(): bool|float {
+        return true; /*31:unionization*/
     }
 
     /**
@@ -165,73 +188,50 @@ class TopLevel {
     }
 
     /**
-     * @param bool|float $value
+     * @param string $value
      * @throws Exception
-     * @return bool|float
+     * @return string
      */
-    public static function fromUnionization(bool|float $value): bool|float {
-        if (is_bool($value)) {
-            return $value; /*bool*/
-        } elseif (is_float($value) || is_int($value)) {
-            return $value; /*float*/
-        } else {
-            throw new Exception('Cannot deserialize union value in TopLevel');
-        }
+    public static function fromBarre(string $value): string {
+        return $value; /*string*/
     }
 
     /**
      * @throws Exception
-     * @return bool|float
+     * @return string
      */
-    public function toUnionization(): bool|float {
-        if (TopLevel::validateUnionization($this->unionization))  {
-            if (is_bool($this->unionization)) {
-                return $this->unionization; /*bool*/
-            } elseif (is_float($this->unionization) || is_int($this->unionization)) {
-                return $this->unionization; /*float*/
-            } else {
-                throw new Exception('Union value has no matching member in TopLevel');
-            }
+    public function toBarre(): string {
+        if (TopLevel::validateBarre($this->barre))  {
+            return $this->barre; /*string*/
         }
-        throw new Exception('never get to this TopLevel::unionization');
+        throw new Exception('never get to this TopLevel::barre');
     }
 
     /**
-     * @param bool|float
+     * @param string
      * @return bool
      * @throws Exception
      */
-    public static function validateUnionization(bool|float $value): bool {
-        if (is_bool($value)) {
-            if (!is_bool($value)) {
-                throw new Exception("Attribute Error:TopLevel::unionization");
-            }
-        } elseif (is_float($value) || is_int($value)) {
-            if (!is_float($value) && !is_int($value)) {
-                throw new Exception("Attribute Error:TopLevel::unionization");
-            }
-        } else {
-            throw new Exception("Attribute Error:TopLevel::unionization");
-        }
+    public static function validateBarre(string $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return bool|float
+     * @return string
      */
-    public function getUnionization(): bool|float {
-        if (TopLevel::validateUnionization($this->unionization))  {
-            return $this->unionization;
+    public function getBarre(): string {
+        if (TopLevel::validateBarre($this->barre))  {
+            return $this->barre;
         }
-        throw new Exception('never get to getUnionization TopLevel::unionization');
+        throw new Exception('never get to getBarre TopLevel::barre');
     }
 
     /**
-     * @return bool|float
+     * @return string
      */
-    public static function sampleUnionization(): bool|float {
-        return true; /*34:unionization*/
+    public static function sampleBarre(): string {
+        return 'TopLevel::barre::34'; /*34:barre*/
     }
 
     /**
@@ -239,10 +239,10 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateBarre($this->barre)
+        return TopLevel::validateUnionization($this->unionization)
         || TopLevel::validateEnumerification($this->enumerification)
         || TopLevel::validateFoo($this->foo)
-        || TopLevel::validateUnionization($this->unionization);
+        || TopLevel::validateBarre($this->barre);
     }
 
     /**
@@ -251,10 +251,10 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'bar'} = $this->toBarre();
+        $out->{'union'} = $this->toUnionization();
         $out->{'enum'} = $this->toEnumerification();
         $out->{'foo'} = $this->toFoo();
-        $out->{'union'} = $this->toUnionization();
+        $out->{'bar'} = $this->toBarre();
         return $out;
     }
 
@@ -265,10 +265,10 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromBarre($obj->{'bar'})
+         TopLevel::fromUnionization($obj->{'union'})
         ,TopLevel::fromEnumerification($obj->{'enum'})
         ,TopLevel::fromFoo($obj->{'foo'})
-        ,TopLevel::fromUnionization($obj->{'union'})
+        ,TopLevel::fromBarre($obj->{'bar'})
         );
     }
 
@@ -277,10 +277,10 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleBarre()
+         TopLevel::sampleUnionization()
         ,TopLevel::sampleEnumerification()
         ,TopLevel::sampleFoo()
-        ,TopLevel::sampleUnionization()
+        ,TopLevel::sampleBarre()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.php
index 76426e3..0b1d10b 100644
--- a/base/schema-php/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.php
@@ -6,20 +6,20 @@ declare(strict_types=1);
 class TopLevel {
     private float $amount; // json:amount Required
     private Frequency $frequency; // json:frequency Required
-    private ?string $description; // json:description Optional
     private Type $type; // json:type Required
+    private ?string $description; // json:description Optional
 
     /**
      * @param float $amount
      * @param Frequency $frequency
-     * @param string|null $description
      * @param Type $type
+     * @param string|null $description
      */
-    public function __construct(float $amount, Frequency $frequency, ?string $description, Type $type) {
+    public function __construct(float $amount, Frequency $frequency, Type $type, ?string $description) {
         $this->amount = $amount;
         $this->frequency = $frequency;
-        $this->description = $description;
         $this->type = $type;
+        $this->description = $description;
     }
 
     /**
@@ -118,108 +118,108 @@ class TopLevel {
     }
 
     /**
-     * @param ?string $value
+     * @param string $value
      * @throws Exception
-     * @return ?string
+     * @return Type
      */
-    public static function fromDescription(?string $value): ?string {
-        if (!is_null($value)) {
-            return $value; /*string*/
-        } else {
-            return  null;
-        }
+    public static function fromType(string $value): Type {
+        return Type::from($value); /*enum*/
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return string
      */
-    public function toDescription(): ?string {
-        if (TopLevel::validateDescription($this->description))  {
-            if (!is_null($this->description)) {
-                return $this->description; /*string*/
-            } else {
-                return  null;
-            }
+    public function toType(): string {
+        if (TopLevel::validateType($this->type))  {
+            return Type::to($this->type); /*enum*/
         }
-        throw new Exception('never get to this TopLevel::description');
+        throw new Exception('never get to this TopLevel::type');
     }
 
     /**
-     * @param string|null
+     * @param Type
      * @return bool
      * @throws Exception
      */
-    public static function validateDescription(?string $value): bool {
-        if (!is_null($value)) {
-        }
+    public static function validateType(Type $value): bool {
+        Type::to($value);
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return Type
      */
-    public function getDescription(): ?string {
-        if (TopLevel::validateDescription($this->description))  {
-            return $this->description;
+    public function getType(): Type {
+        if (TopLevel::validateType($this->type))  {
+            return $this->type;
         }
-        throw new Exception('never get to getDescription TopLevel::description');
+        throw new Exception('never get to getType TopLevel::type');
     }
 
     /**
-     * @return ?string
+     * @return Type
      */
-    public static function sampleDescription(): ?string {
-        return 'TopLevel::description::33'; /*33:description*/
+    public static function sampleType(): Type {
+        return Type::sample(); /*enum*/
     }
 
     /**
-     * @param string $value
+     * @param ?string $value
      * @throws Exception
-     * @return Type
+     * @return ?string
      */
-    public static function fromType(string $value): Type {
-        return Type::from($value); /*enum*/
+    public static function fromDescription(?string $value): ?string {
+        if (!is_null($value)) {
+            return $value; /*string*/
+        } else {
+            return  null;
+        }
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?string
      */
-    public function toType(): string {
-        if (TopLevel::validateType($this->type))  {
-            return Type::to($this->type); /*enum*/
+    public function toDescription(): ?string {
+        if (TopLevel::validateDescription($this->description))  {
+            if (!is_null($this->description)) {
+                return $this->description; /*string*/
+            } else {
+                return  null;
+            }
         }
-        throw new Exception('never get to this TopLevel::type');
+        throw new Exception('never get to this TopLevel::description');
     }
 
     /**
-     * @param Type
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateType(Type $value): bool {
-        Type::to($value);
+    public static function validateDescription(?string $value): bool {
+        if (!is_null($value)) {
+        }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return Type
+     * @return ?string
      */
-    public function getType(): Type {
-        if (TopLevel::validateType($this->type))  {
-            return $this->type;
+    public function getDescription(): ?string {
+        if (TopLevel::validateDescription($this->description))  {
+            return $this->description;
         }
-        throw new Exception('never get to getType TopLevel::type');
+        throw new Exception('never get to getDescription TopLevel::description');
     }
 
     /**
-     * @return Type
+     * @return ?string
      */
-    public static function sampleType(): Type {
-        return Type::sample(); /*enum*/
+    public static function sampleDescription(): ?string {
+        return 'TopLevel::description::34'; /*34:description*/
     }
 
     /**
@@ -229,8 +229,8 @@ class TopLevel {
     public function validate(): bool {
         return TopLevel::validateAmount($this->amount)
         || TopLevel::validateFrequency($this->frequency)
-        || TopLevel::validateDescription($this->description)
-        || TopLevel::validateType($this->type);
+        || TopLevel::validateType($this->type)
+        || TopLevel::validateDescription($this->description);
     }
 
     /**
@@ -241,8 +241,8 @@ class TopLevel {
         $out = new stdClass();
         $out->{'amount'} = $this->toAmount();
         $out->{'frequency'} = $this->toFrequency();
-        $out->{'description'} = $this->toDescription();
         $out->{'type'} = $this->toType();
+        $out->{'description'} = $this->toDescription();
         return $out;
     }
 
@@ -255,8 +255,8 @@ class TopLevel {
         return new TopLevel(
          TopLevel::fromAmount($obj->{'amount'})
         ,TopLevel::fromFrequency($obj->{'frequency'})
-        ,TopLevel::fromDescription($obj->{'description'})
         ,TopLevel::fromType($obj->{'type'})
+        ,TopLevel::fromDescription($obj->{'description'})
         );
     }
 
@@ -267,8 +267,8 @@ class TopLevel {
         return new TopLevel(
          TopLevel::sampleAmount()
         ,TopLevel::sampleFrequency()
-        ,TopLevel::sampleDescription()
         ,TopLevel::sampleType()
+        ,TopLevel::sampleDescription()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/bool-string.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/bool-string.schema/default/TopLevel.php
index c782f59..0cdebc2 100644
--- a/base/schema-php/test/inputs/schema/bool-string.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/bool-string.schema/default/TopLevel.php
@@ -4,124 +4,88 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private ?array $arrNullable; // json:arrNullable Optional
-    private ?array $arrOne; // json:arrOne Optional
-    private ?string $nullable; // json:nullable Optional
     private string $one; // json:one Required
     private ?string $optional; // json:optional Optional
+    private ?string $nullable; // json:nullable Optional
+    private ?array $arrOne; // json:arrOne Optional
+    private ?array $arrNullable; // json:arrNullable Optional
     private bool|string $unionWithBool; // json:unionWithBool Required
     private bool|string $unionWithBoolAndEnum; // json:unionWithBoolAndEnum Required
 
     /**
-     * @param array|null $arrNullable
-     * @param array|null $arrOne
-     * @param string|null $nullable
      * @param string $one
      * @param string|null $optional
+     * @param string|null $nullable
+     * @param array|null $arrOne
+     * @param array|null $arrNullable
      * @param bool|string $unionWithBool
      * @param bool|string $unionWithBoolAndEnum
      */
-    public function __construct(?array $arrNullable, ?array $arrOne, ?string $nullable, string $one, ?string $optional, bool|string $unionWithBool, bool|string $unionWithBoolAndEnum) {
-        $this->arrNullable = $arrNullable;
-        $this->arrOne = $arrOne;
-        $this->nullable = $nullable;
+    public function __construct(string $one, ?string $optional, ?string $nullable, ?array $arrOne, ?array $arrNullable, bool|string $unionWithBool, bool|string $unionWithBoolAndEnum) {
         $this->one = $one;
         $this->optional = $optional;
+        $this->nullable = $nullable;
+        $this->arrOne = $arrOne;
+        $this->arrNullable = $arrNullable;
         $this->unionWithBool = $unionWithBool;
         $this->unionWithBoolAndEnum = $unionWithBoolAndEnum;
     }
 
     /**
-     * @param ?array $value
+     * @param string $value
      * @throws Exception
-     * @return ?array
+     * @return string
      */
-    public static function fromArrNullable(?array $value): ?array {
-        if (!is_null($value)) {
-            return  array_map(function ($value) {
-                if (!is_null($value)) {
-                    return $value; /*string*/
-                } else {
-                    return  null;
-                }
-            }, $value);
-        } else {
-            return  null;
-        }
+    public static function fromOne(string $value): string {
+        return $value; /*string*/
     }
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return string
      */
-    public function toArrNullable(): ?array {
-        if (TopLevel::validateArrNullable($this->arrNullable))  {
-            if (!is_null($this->arrNullable)) {
-                return array_map(function ($value) {
-                    if (!is_null($value)) {
-                        return $value; /*string*/
-                    } else {
-                        return  null;
-                    }
-                }, $this->arrNullable);
-            } else {
-                return  null;
-            }
+    public function toOne(): string {
+        if (TopLevel::validateOne($this->one))  {
+            return $this->one; /*string*/
         }
-        throw new Exception('never get to this TopLevel::arrNullable');
+        throw new Exception('never get to this TopLevel::one');
     }
 
     /**
-     * @param array|null
+     * @param string
      * @return bool
      * @throws Exception
      */
-    public static function validateArrNullable(?array $value): bool {
-        if (!is_null($value)) {
-            if (!is_array($value)) {
-                throw new Exception("Attribute Error:TopLevel::arrNullable");
-            }
-            array_walk($value, function($value_v) {
-                if (!is_null($value_v)) {
-                    if (!is_string($value_v)) {
-                        throw new Exception("Attribute Error:TopLevel::arrNullable");
-                    }
-                }
-            });
-        }
+    public static function validateOne(string $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return string
      */
-    public function getArrNullable(): ?array {
-        if (TopLevel::validateArrNullable($this->arrNullable))  {
-            return $this->arrNullable;
+    public function getOne(): string {
+        if (TopLevel::validateOne($this->one))  {
+            return $this->one;
         }
-        throw new Exception('never get to getArrNullable TopLevel::arrNullable');
+        throw new Exception('never get to getOne TopLevel::one');
     }
 
     /**
-     * @return ?array
+     * @return string
      */
-    public static function sampleArrNullable(): ?array {
-        return  array(
-            'TopLevel::::31' /*31:*/
-        ); /* 31:arrNullable*/
+    public static function sampleOne(): string {
+        return 'TopLevel::one::31'; /*31:one*/
     }
 
     /**
-     * @param ?array $value
+     * @param ?string $value
      * @throws Exception
-     * @return ?array
+     * @return ?string
      */
-    public static function fromArrOne(?array $value): ?array {
+    public static function fromOptional(?string $value): ?string {
         if (!is_null($value)) {
-            return  array_map(function ($value) {
-                return $value; /*string*/
-            }, $value);
+            return $value; /*string*/
         } else {
             return  null;
         }
@@ -129,58 +93,46 @@ class TopLevel {
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return ?string
      */
-    public function toArrOne(): ?array {
-        if (TopLevel::validateArrOne($this->arrOne))  {
-            if (!is_null($this->arrOne)) {
-                return array_map(function ($value) {
-                    return $value; /*string*/
-                }, $this->arrOne);
+    public function toOptional(): ?string {
+        if (TopLevel::validateOptional($this->optional))  {
+            if (!is_null($this->optional)) {
+                return $this->optional; /*string*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this TopLevel::arrOne');
+        throw new Exception('never get to this TopLevel::optional');
     }
 
     /**
-     * @param array|null
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateArrOne(?array $value): bool {
+    public static function validateOptional(?string $value): bool {
         if (!is_null($value)) {
-            if (!is_array($value)) {
-                throw new Exception("Attribute Error:TopLevel::arrOne");
-            }
-            array_walk($value, function($value_v) {
-                if (!is_string($value_v)) {
-                    throw new Exception("Attribute Error:TopLevel::arrOne");
-                }
-            });
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return ?string
      */
-    public function getArrOne(): ?array {
-        if (TopLevel::validateArrOne($this->arrOne))  {
-            return $this->arrOne;
+    public function getOptional(): ?string {
+        if (TopLevel::validateOptional($this->optional))  {
+            return $this->optional;
         }
-        throw new Exception('never get to getArrOne TopLevel::arrOne');
+        throw new Exception('never get to getOptional TopLevel::optional');
     }
 
     /**
-     * @return ?array
+     * @return ?string
      */
-    public static function sampleArrOne(): ?array {
-        return  array(
-            'TopLevel::::32' /*32:*/
-        ); /* 32:arrOne*/
+    public static function sampleOptional(): ?string {
+        return 'TopLevel::optional::32'; /*32:optional*/
     }
 
     /**
@@ -241,60 +193,90 @@ class TopLevel {
     }
 
     /**
-     * @param string $value
+     * @param ?array $value
      * @throws Exception
-     * @return string
+     * @return ?array
      */
-    public static function fromOne(string $value): string {
-        return $value; /*string*/
+    public static function fromArrOne(?array $value): ?array {
+        if (!is_null($value)) {
+            return  array_map(function ($value) {
+                return $value; /*string*/
+            }, $value);
+        } else {
+            return  null;
+        }
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?array
      */
-    public function toOne(): string {
-        if (TopLevel::validateOne($this->one))  {
-            return $this->one; /*string*/
+    public function toArrOne(): ?array {
+        if (TopLevel::validateArrOne($this->arrOne))  {
+            if (!is_null($this->arrOne)) {
+                return array_map(function ($value) {
+                    return $value; /*string*/
+                }, $this->arrOne);
+            } else {
+                return  null;
+            }
         }
-        throw new Exception('never get to this TopLevel::one');
+        throw new Exception('never get to this TopLevel::arrOne');
     }
 
     /**
-     * @param string
+     * @param array|null
      * @return bool
      * @throws Exception
      */
-    public static function validateOne(string $value): bool {
+    public static function validateArrOne(?array $value): bool {
+        if (!is_null($value)) {
+            if (!is_array($value)) {
+                throw new Exception("Attribute Error:TopLevel::arrOne");
+            }
+            array_walk($value, function($value_v) {
+                if (!is_string($value_v)) {
+                    throw new Exception("Attribute Error:TopLevel::arrOne");
+                }
+            });
+        }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?array
      */
-    public function getOne(): string {
-        if (TopLevel::validateOne($this->one))  {
-            return $this->one;
+    public function getArrOne(): ?array {
+        if (TopLevel::validateArrOne($this->arrOne))  {
+            return $this->arrOne;
         }
-        throw new Exception('never get to getOne TopLevel::one');
+        throw new Exception('never get to getArrOne TopLevel::arrOne');
     }
 
     /**
-     * @return string
+     * @return ?array
      */
-    public static function sampleOne(): string {
-        return 'TopLevel::one::34'; /*34:one*/
+    public static function sampleArrOne(): ?array {
+        return  array(
+            'TopLevel::::34' /*34:*/
+        ); /* 34:arrOne*/
     }
 
     /**
-     * @param ?string $value
+     * @param ?array $value
      * @throws Exception
-     * @return ?string
+     * @return ?array
      */
-    public static function fromOptional(?string $value): ?string {
+    public static function fromArrNullable(?array $value): ?array {
         if (!is_null($value)) {
-            return $value; /*string*/
+            return  array_map(function ($value) {
+                if (!is_null($value)) {
+                    return $value; /*string*/
+                } else {
+                    return  null;
+                }
+            }, $value);
         } else {
             return  null;
         }
@@ -302,46 +284,64 @@ class TopLevel {
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?array
      */
-    public function toOptional(): ?string {
-        if (TopLevel::validateOptional($this->optional))  {
-            if (!is_null($this->optional)) {
-                return $this->optional; /*string*/
+    public function toArrNullable(): ?array {
+        if (TopLevel::validateArrNullable($this->arrNullable))  {
+            if (!is_null($this->arrNullable)) {
+                return array_map(function ($value) {
+                    if (!is_null($value)) {
+                        return $value; /*string*/
+                    } else {
+                        return  null;
+                    }
+                }, $this->arrNullable);
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this TopLevel::optional');
+        throw new Exception('never get to this TopLevel::arrNullable');
     }
 
     /**
-     * @param string|null
+     * @param array|null
      * @return bool
      * @throws Exception
      */
-    public static function validateOptional(?string $value): bool {
+    public static function validateArrNullable(?array $value): bool {
         if (!is_null($value)) {
+            if (!is_array($value)) {
+                throw new Exception("Attribute Error:TopLevel::arrNullable");
+            }
+            array_walk($value, function($value_v) {
+                if (!is_null($value_v)) {
+                    if (!is_string($value_v)) {
+                        throw new Exception("Attribute Error:TopLevel::arrNullable");
+                    }
+                }
+            });
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?array
      */
-    public function getOptional(): ?string {
-        if (TopLevel::validateOptional($this->optional))  {
-            return $this->optional;
+    public function getArrNullable(): ?array {
+        if (TopLevel::validateArrNullable($this->arrNullable))  {
+            return $this->arrNullable;
         }
-        throw new Exception('never get to getOptional TopLevel::optional');
+        throw new Exception('never get to getArrNullable TopLevel::arrNullable');
     }
 
     /**
-     * @return ?string
+     * @return ?array
      */
-    public static function sampleOptional(): ?string {
-        return 'TopLevel::optional::35'; /*35:optional*/
+    public static function sampleArrNullable(): ?array {
+        return  array(
+            'TopLevel::::35' /*35:*/
+        ); /* 35:arrNullable*/
     }
 
     /**
@@ -489,11 +489,11 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateArrNullable($this->arrNullable)
-        || TopLevel::validateArrOne($this->arrOne)
-        || TopLevel::validateNullable($this->nullable)
-        || TopLevel::validateOne($this->one)
+        return TopLevel::validateOne($this->one)
         || TopLevel::validateOptional($this->optional)
+        || TopLevel::validateNullable($this->nullable)
+        || TopLevel::validateArrOne($this->arrOne)
+        || TopLevel::validateArrNullable($this->arrNullable)
         || TopLevel::validateUnionWithBool($this->unionWithBool)
         || TopLevel::validateUnionWithBoolAndEnum($this->unionWithBoolAndEnum);
     }
@@ -504,11 +504,11 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'arrNullable'} = $this->toArrNullable();
-        $out->{'arrOne'} = $this->toArrOne();
-        $out->{'nullable'} = $this->toNullable();
         $out->{'one'} = $this->toOne();
         $out->{'optional'} = $this->toOptional();
+        $out->{'nullable'} = $this->toNullable();
+        $out->{'arrOne'} = $this->toArrOne();
+        $out->{'arrNullable'} = $this->toArrNullable();
         $out->{'unionWithBool'} = $this->toUnionWithBool();
         $out->{'unionWithBoolAndEnum'} = $this->toUnionWithBoolAndEnum();
         return $out;
@@ -521,11 +521,11 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromArrNullable($obj->{'arrNullable'})
-        ,TopLevel::fromArrOne($obj->{'arrOne'})
-        ,TopLevel::fromNullable($obj->{'nullable'})
-        ,TopLevel::fromOne($obj->{'one'})
+         TopLevel::fromOne($obj->{'one'})
         ,TopLevel::fromOptional($obj->{'optional'})
+        ,TopLevel::fromNullable($obj->{'nullable'})
+        ,TopLevel::fromArrOne($obj->{'arrOne'})
+        ,TopLevel::fromArrNullable($obj->{'arrNullable'})
         ,TopLevel::fromUnionWithBool($obj->{'unionWithBool'})
         ,TopLevel::fromUnionWithBoolAndEnum($obj->{'unionWithBoolAndEnum'})
         );
@@ -536,11 +536,11 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleArrNullable()
-        ,TopLevel::sampleArrOne()
-        ,TopLevel::sampleNullable()
-        ,TopLevel::sampleOne()
+         TopLevel::sampleOne()
         ,TopLevel::sampleOptional()
+        ,TopLevel::sampleNullable()
+        ,TopLevel::sampleArrOne()
+        ,TopLevel::sampleArrNullable()
         ,TopLevel::sampleUnionWithBool()
         ,TopLevel::sampleUnionWithBoolAndEnum()
         );
diff --git a/base/schema-php/test/inputs/schema/boolean-subschema.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/boolean-subschema.schema/default/TopLevel.php
index 07db69a..bfd4552 100644
--- a/base/schema-php/test/inputs/schema/boolean-subschema.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/boolean-subschema.schema/default/TopLevel.php
@@ -4,24 +4,71 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
+    private string $foo; // json:foo Required
     private mixed $disallowed; // json:disallowed Optional
     private array $empty; // json:empty Required
-    private string $foo; // json:foo Required
     private mixed $impossible; // json:impossible Optional
 
     /**
+     * @param string $foo
      * @param mixed $disallowed
      * @param array $empty
-     * @param string $foo
      * @param mixed $impossible
      */
-    public function __construct(mixed $disallowed, array $empty, string $foo, mixed $impossible) {
+    public function __construct(string $foo, mixed $disallowed, array $empty, mixed $impossible) {
+        $this->foo = $foo;
         $this->disallowed = $disallowed;
         $this->empty = $empty;
-        $this->foo = $foo;
         $this->impossible = $impossible;
     }
 
+    /**
+     * @param string $value
+     * @throws Exception
+     * @return string
+     */
+    public static function fromFoo(string $value): string {
+        return $value; /*string*/
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function toFoo(): string {
+        if (TopLevel::validateFoo($this->foo))  {
+            return $this->foo; /*string*/
+        }
+        throw new Exception('never get to this TopLevel::foo');
+    }
+
+    /**
+     * @param string
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateFoo(string $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function getFoo(): string {
+        if (TopLevel::validateFoo($this->foo))  {
+            return $this->foo;
+        }
+        throw new Exception('never get to getFoo TopLevel::foo');
+    }
+
+    /**
+     * @return string
+     */
+    public static function sampleFoo(): string {
+        return 'TopLevel::foo::31'; /*31:foo*/
+    }
+
     /**
      * @param mixed $value
      * @throws Exception
@@ -66,7 +113,7 @@ class TopLevel {
      * @return mixed
      */
     public static function sampleDisallowed(): mixed {
-        return 'AnyType::TopLevel::disallowed::31';/*31:disallowed*/
+        return 'AnyType::TopLevel::disallowed::32';/*32:disallowed*/
     }
 
     /**
@@ -123,55 +170,8 @@ class TopLevel {
      */
     public static function sampleEmpty(): array {
         return  array(
-            'AnyType::TopLevel::::32'/*32:*/
-        ); /* 32:empty*/
-    }
-
-    /**
-     * @param string $value
-     * @throws Exception
-     * @return string
-     */
-    public static function fromFoo(string $value): string {
-        return $value; /*string*/
-    }
-
-    /**
-     * @throws Exception
-     * @return string
-     */
-    public function toFoo(): string {
-        if (TopLevel::validateFoo($this->foo))  {
-            return $this->foo; /*string*/
-        }
-        throw new Exception('never get to this TopLevel::foo');
-    }
-
-    /**
-     * @param string
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateFoo(string $value): bool {
-        return true;
-    }
-
-    /**
-     * @throws Exception
-     * @return string
-     */
-    public function getFoo(): string {
-        if (TopLevel::validateFoo($this->foo))  {
-            return $this->foo;
-        }
-        throw new Exception('never get to getFoo TopLevel::foo');
-    }
-
-    /**
-     * @return string
-     */
-    public static function sampleFoo(): string {
-        return 'TopLevel::foo::33'; /*33:foo*/
+            'AnyType::TopLevel::::33'/*33:*/
+        ); /* 33:empty*/
     }
 
     /**
@@ -226,9 +226,9 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateDisallowed($this->disallowed)
+        return TopLevel::validateFoo($this->foo)
+        || TopLevel::validateDisallowed($this->disallowed)
         || TopLevel::validateEmpty($this->empty)
-        || TopLevel::validateFoo($this->foo)
         || TopLevel::validateImpossible($this->impossible);
     }
 
@@ -238,9 +238,9 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
+        $out->{'foo'} = $this->toFoo();
         $out->{'disallowed'} = $this->toDisallowed();
         $out->{'empty'} = $this->toEmpty();
-        $out->{'foo'} = $this->toFoo();
         $out->{'impossible'} = $this->toImpossible();
         return $out;
     }
@@ -252,9 +252,9 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromDisallowed($obj->{'disallowed'})
+         TopLevel::fromFoo($obj->{'foo'})
+        ,TopLevel::fromDisallowed($obj->{'disallowed'})
         ,TopLevel::fromEmpty($obj->{'empty'})
-        ,TopLevel::fromFoo($obj->{'foo'})
         ,TopLevel::fromImpossible($obj->{'impossible'})
         );
     }
@@ -264,9 +264,9 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleDisallowed()
+         TopLevel::sampleFoo()
+        ,TopLevel::sampleDisallowed()
         ,TopLevel::sampleEmpty()
-        ,TopLevel::sampleFoo()
         ,TopLevel::sampleImpossible()
         );
     }
diff --git a/base/schema-php/test/inputs/schema/comment-injection.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/comment-injection.schema/default/TopLevel.php
index 1ee01f2..0b3b321 100644
--- a/base/schema-php/test/inputs/schema/comment-injection.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/comment-injection.schema/default/TopLevel.php
@@ -4,22 +4,134 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
+    private string $value; // json:value Required
     private ?string $trailingBackslash; // json:trailingBackslash Optional
     private ?string $trailingQuote; // json:trailingQuote Optional
     private ?string $trailingTripleQuote; // json:trailingTripleQuote Optional
-    private string $value; // json:value Required
 
     /**
+     * @param string $value
      * @param string|null $trailingBackslash
      * @param string|null $trailingQuote
      * @param string|null $trailingTripleQuote
-     * @param string $value
      */
-    public function __construct(?string $trailingBackslash, ?string $trailingQuote, ?string $trailingTripleQuote, string $value) {
+    public function __construct(string $value, ?string $trailingBackslash, ?string $trailingQuote, ?string $trailingTripleQuote) {
+        $this->value = $value;
         $this->trailingBackslash = $trailingBackslash;
         $this->trailingQuote = $trailingQuote;
         $this->trailingTripleQuote = $trailingTripleQuote;
-        $this->value = $value;
+    }
+
+    /**
+     * Property delimiters:
+     * * /
+     * / *
+     * {-
+     * -}
+     * """
+     * </summary> & <br>
+     * }
+     * }
+     * }
+     * }
+     * }
+     *
+     * @param string $value
+     * @throws Exception
+     * @return string
+     */
+    public static function fromValue(string $value): string {
+        return $value; /*string*/
+    }
+
+    /**
+     * Property delimiters:
+     * * /
+     * / *
+     * {-
+     * -}
+     * """
+     * </summary> & <br>
+     * }
+     * }
+     * }
+     * }
+     * }
+     *
+     * @throws Exception
+     * @return string
+     */
+    public function toValue(): string {
+        if (TopLevel::validateValue($this->value))  {
+            return $this->value; /*string*/
+        }
+        throw new Exception('never get to this TopLevel::value');
+    }
+
+    /**
+     * Property delimiters:
+     * * /
+     * / *
+     * {-
+     * -}
+     * """
+     * </summary> & <br>
+     * }
+     * }
+     * }
+     * }
+     * }
+     *
+     * @param string
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateValue(string $value): bool {
+        return true;
+    }
+
+    /**
+     * Property delimiters:
+     * * /
+     * / *
+     * {-
+     * -}
+     * """
+     * </summary> & <br>
+     * }
+     * }
+     * }
+     * }
+     * }
+     *
+     * @throws Exception
+     * @return string
+     */
+    public function getValue(): string {
+        if (TopLevel::validateValue($this->value))  {
+            return $this->value;
+        }
+        throw new Exception('never get to getValue TopLevel::value');
+    }
+
+    /**
+     * Property delimiters:
+     * * /
+     * / *
+     * {-
+     * -}
+     * """
+     * </summary> & <br>
+     * }
+     * }
+     * }
+     * }
+     * }
+     *
+     * @return string
+     */
+    public static function sampleValue(): string {
+        return 'TopLevel::value::31'; /*31:value*/
     }
 
     /**
@@ -86,7 +198,7 @@ class TopLevel {
      * @return ?string
      */
     public static function sampleTrailingBackslash(): ?string {
-        return 'TopLevel::trailingBackslash::31'; /*31:trailingBackslash*/
+        return 'TopLevel::trailingBackslash::32'; /*32:trailingBackslash*/
     }
 
     /**
@@ -153,7 +265,7 @@ class TopLevel {
      * @return ?string
      */
     public static function sampleTrailingQuote(): ?string {
-        return 'TopLevel::trailingQuote::32'; /*32:trailingQuote*/
+        return 'TopLevel::trailingQuote::33'; /*33:trailingQuote*/
     }
 
     /**
@@ -220,119 +332,7 @@ class TopLevel {
      * @return ?string
      */
     public static function sampleTrailingTripleQuote(): ?string {
-        return 'TopLevel::trailingTripleQuote::33'; /*33:trailingTripleQuote*/
-    }
-
-    /**
-     * Property delimiters:
-     * * /
-     * / *
-     * {-
-     * -}
-     * """
-     * </summary> & <br>
-     * }
-     * }
-     * }
-     * }
-     * }
-     *
-     * @param string $value
-     * @throws Exception
-     * @return string
-     */
-    public static function fromValue(string $value): string {
-        return $value; /*string*/
-    }
-
-    /**
-     * Property delimiters:
-     * * /
-     * / *
-     * {-
-     * -}
-     * """
-     * </summary> & <br>
-     * }
-     * }
-     * }
-     * }
-     * }
-     *
-     * @throws Exception
-     * @return string
-     */
-    public function toValue(): string {
-        if (TopLevel::validateValue($this->value))  {
-            return $this->value; /*string*/
-        }
-        throw new Exception('never get to this TopLevel::value');
-    }
-
-    /**
-     * Property delimiters:
-     * * /
-     * / *
-     * {-
-     * -}
-     * """
-     * </summary> & <br>
-     * }
-     * }
-     * }
-     * }
-     * }
-     *
-     * @param string
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateValue(string $value): bool {
-        return true;
-    }
-
-    /**
-     * Property delimiters:
-     * * /
-     * / *
-     * {-
-     * -}
-     * """
-     * </summary> & <br>
-     * }
-     * }
-     * }
-     * }
-     * }
-     *
-     * @throws Exception
-     * @return string
-     */
-    public function getValue(): string {
-        if (TopLevel::validateValue($this->value))  {
-            return $this->value;
-        }
-        throw new Exception('never get to getValue TopLevel::value');
-    }
-
-    /**
-     * Property delimiters:
-     * * /
-     * / *
-     * {-
-     * -}
-     * """
-     * </summary> & <br>
-     * }
-     * }
-     * }
-     * }
-     * }
-     *
-     * @return string
-     */
-    public static function sampleValue(): string {
-        return 'TopLevel::value::34'; /*34:value*/
+        return 'TopLevel::trailingTripleQuote::34'; /*34:trailingTripleQuote*/
     }
 
     /**
@@ -340,10 +340,10 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateTrailingBackslash($this->trailingBackslash)
+        return TopLevel::validateValue($this->value)
+        || TopLevel::validateTrailingBackslash($this->trailingBackslash)
         || TopLevel::validateTrailingQuote($this->trailingQuote)
-        || TopLevel::validateTrailingTripleQuote($this->trailingTripleQuote)
-        || TopLevel::validateValue($this->value);
+        || TopLevel::validateTrailingTripleQuote($this->trailingTripleQuote);
     }
 
     /**
@@ -352,10 +352,10 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
+        $out->{'value'} = $this->toValue();
         $out->{'trailingBackslash'} = $this->toTrailingBackslash();
         $out->{'trailingQuote'} = $this->toTrailingQuote();
         $out->{'trailingTripleQuote'} = $this->toTrailingTripleQuote();
-        $out->{'value'} = $this->toValue();
         return $out;
     }
 
@@ -366,10 +366,10 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromTrailingBackslash($obj->{'trailingBackslash'})
+         TopLevel::fromValue($obj->{'value'})
+        ,TopLevel::fromTrailingBackslash($obj->{'trailingBackslash'})
         ,TopLevel::fromTrailingQuote($obj->{'trailingQuote'})
         ,TopLevel::fromTrailingTripleQuote($obj->{'trailingTripleQuote'})
-        ,TopLevel::fromValue($obj->{'value'})
         );
     }
 
@@ -378,10 +378,10 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleTrailingBackslash()
+         TopLevel::sampleValue()
+        ,TopLevel::sampleTrailingBackslash()
         ,TopLevel::sampleTrailingQuote()
         ,TopLevel::sampleTrailingTripleQuote()
-        ,TopLevel::sampleValue()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/const-non-string.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/const-non-string.schema/default/TopLevel.php
index 2c40360..9679ad0 100644
--- a/base/schema-php/test/inputs/schema/const-non-string.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/const-non-string.schema/default/TopLevel.php
@@ -4,261 +4,261 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
+    private float $version; // json:version Required
     private int $amount; // json:amount Required
+    private float $ratio; // json:ratio Required
     private bool $enabled; // json:enabled Required
     private Kind $kind; // json:kind Required
-    private float $ratio; // json:ratio Required
-    private float $version; // json:version Required
 
     /**
+     * @param float $version
      * @param int $amount
+     * @param float $ratio
      * @param bool $enabled
      * @param Kind $kind
-     * @param float $ratio
-     * @param float $version
      */
-    public function __construct(int $amount, bool $enabled, Kind $kind, float $ratio, float $version) {
+    public function __construct(float $version, int $amount, float $ratio, bool $enabled, Kind $kind) {
+        $this->version = $version;
         $this->amount = $amount;
+        $this->ratio = $ratio;
         $this->enabled = $enabled;
         $this->kind = $kind;
-        $this->ratio = $ratio;
-        $this->version = $version;
     }
 
     /**
-     * @param int $value
+     * @param float $value
      * @throws Exception
-     * @return int
+     * @return float
      */
-    public static function fromAmount(int $value): int {
-        return $value; /*int*/
+    public static function fromVersion(float $value): float {
+        return $value; /*float*/
     }
 
     /**
      * @throws Exception
-     * @return int
+     * @return float
      */
-    public function toAmount(): int {
-        if (TopLevel::validateAmount($this->amount))  {
-            return $this->amount; /*int*/
+    public function toVersion(): float {
+        if (TopLevel::validateVersion($this->version))  {
+            return $this->version; /*float*/
         }
-        throw new Exception('never get to this TopLevel::amount');
+        throw new Exception('never get to this TopLevel::version');
     }
 
     /**
-     * @param int
+     * @param float
      * @return bool
      * @throws Exception
      */
-    public static function validateAmount(int $value): bool {
+    public static function validateVersion(float $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return int
+     * @return float
      */
-    public function getAmount(): int {
-        if (TopLevel::validateAmount($this->amount))  {
-            return $this->amount;
+    public function getVersion(): float {
+        if (TopLevel::validateVersion($this->version))  {
+            return $this->version;
         }
-        throw new Exception('never get to getAmount TopLevel::amount');
+        throw new Exception('never get to getVersion TopLevel::version');
     }
 
     /**
-     * @return int
+     * @return float
      */
-    public static function sampleAmount(): int {
-        return 31; /*31:amount*/
+    public static function sampleVersion(): float {
+        return 31.031; /*31:version*/
     }
 
     /**
-     * @param bool $value
+     * @param int $value
      * @throws Exception
-     * @return bool
+     * @return int
      */
-    public static function fromEnabled(bool $value): bool {
-        return $value; /*bool*/
+    public static function fromAmount(int $value): int {
+        return $value; /*int*/
     }
 
     /**
      * @throws Exception
-     * @return bool
+     * @return int
      */
-    public function toEnabled(): bool {
-        if (TopLevel::validateEnabled($this->enabled))  {
-            return $this->enabled; /*bool*/
+    public function toAmount(): int {
+        if (TopLevel::validateAmount($this->amount))  {
+            return $this->amount; /*int*/
         }
-        throw new Exception('never get to this TopLevel::enabled');
+        throw new Exception('never get to this TopLevel::amount');
     }
 
     /**
-     * @param bool
+     * @param int
      * @return bool
      * @throws Exception
      */
-    public static function validateEnabled(bool $value): bool {
+    public static function validateAmount(int $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return bool
+     * @return int
      */
-    public function getEnabled(): bool {
-        if (TopLevel::validateEnabled($this->enabled))  {
-            return $this->enabled;
+    public function getAmount(): int {
+        if (TopLevel::validateAmount($this->amount))  {
+            return $this->amount;
         }
-        throw new Exception('never get to getEnabled TopLevel::enabled');
+        throw new Exception('never get to getAmount TopLevel::amount');
     }
 
     /**
-     * @return bool
+     * @return int
      */
-    public static function sampleEnabled(): bool {
-        return true; /*32:enabled*/
+    public static function sampleAmount(): int {
+        return 32; /*32:amount*/
     }
 
     /**
-     * @param string $value
+     * @param float $value
      * @throws Exception
-     * @return Kind
+     * @return float
      */
-    public static function fromKind(string $value): Kind {
-        return Kind::from($value); /*enum*/
+    public static function fromRatio(float $value): float {
+        return $value; /*float*/
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return float
      */
-    public function toKind(): string {
-        if (TopLevel::validateKind($this->kind))  {
-            return Kind::to($this->kind); /*enum*/
+    public function toRatio(): float {
+        if (TopLevel::validateRatio($this->ratio))  {
+            return $this->ratio; /*float*/
         }
-        throw new Exception('never get to this TopLevel::kind');
+        throw new Exception('never get to this TopLevel::ratio');
     }
 
     /**
-     * @param Kind
+     * @param float
      * @return bool
      * @throws Exception
      */
-    public static function validateKind(Kind $value): bool {
-        Kind::to($value);
+    public static function validateRatio(float $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return Kind
+     * @return float
      */
-    public function getKind(): Kind {
-        if (TopLevel::validateKind($this->kind))  {
-            return $this->kind;
+    public function getRatio(): float {
+        if (TopLevel::validateRatio($this->ratio))  {
+            return $this->ratio;
         }
-        throw new Exception('never get to getKind TopLevel::kind');
+        throw new Exception('never get to getRatio TopLevel::ratio');
     }
 
     /**
-     * @return Kind
+     * @return float
      */
-    public static function sampleKind(): Kind {
-        return Kind::sample(); /*enum*/
+    public static function sampleRatio(): float {
+        return 33.033; /*33:ratio*/
     }
 
     /**
-     * @param float $value
+     * @param bool $value
      * @throws Exception
-     * @return float
+     * @return bool
      */
-    public static function fromRatio(float $value): float {
-        return $value; /*float*/
+    public static function fromEnabled(bool $value): bool {
+        return $value; /*bool*/
     }
 
     /**
      * @throws Exception
-     * @return float
+     * @return bool
      */
-    public function toRatio(): float {
-        if (TopLevel::validateRatio($this->ratio))  {
-            return $this->ratio; /*float*/
+    public function toEnabled(): bool {
+        if (TopLevel::validateEnabled($this->enabled))  {
+            return $this->enabled; /*bool*/
         }
-        throw new Exception('never get to this TopLevel::ratio');
+        throw new Exception('never get to this TopLevel::enabled');
     }
 
     /**
-     * @param float
+     * @param bool
      * @return bool
      * @throws Exception
      */
-    public static function validateRatio(float $value): bool {
+    public static function validateEnabled(bool $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return float
+     * @return bool
      */
-    public function getRatio(): float {
-        if (TopLevel::validateRatio($this->ratio))  {
-            return $this->ratio;
+    public function getEnabled(): bool {
+        if (TopLevel::validateEnabled($this->enabled))  {
+            return $this->enabled;
         }
-        throw new Exception('never get to getRatio TopLevel::ratio');
+        throw new Exception('never get to getEnabled TopLevel::enabled');
     }
 
     /**
-     * @return float
+     * @return bool
      */
-    public static function sampleRatio(): float {
-        return 34.034; /*34:ratio*/
+    public static function sampleEnabled(): bool {
+        return true; /*34:enabled*/
     }
 
     /**
-     * @param float $value
+     * @param string $value
      * @throws Exception
-     * @return float
+     * @return Kind
      */
-    public static function fromVersion(float $value): float {
-        return $value; /*float*/
+    public static function fromKind(string $value): Kind {
+        return Kind::from($value); /*enum*/
     }
 
     /**
      * @throws Exception
-     * @return float
+     * @return string
      */
-    public function toVersion(): float {
-        if (TopLevel::validateVersion($this->version))  {
-            return $this->version; /*float*/
+    public function toKind(): string {
+        if (TopLevel::validateKind($this->kind))  {
+            return Kind::to($this->kind); /*enum*/
         }
-        throw new Exception('never get to this TopLevel::version');
+        throw new Exception('never get to this TopLevel::kind');
     }
 
     /**
-     * @param float
+     * @param Kind
      * @return bool
      * @throws Exception
      */
-    public static function validateVersion(float $value): bool {
+    public static function validateKind(Kind $value): bool {
+        Kind::to($value);
         return true;
     }
 
     /**
      * @throws Exception
-     * @return float
+     * @return Kind
      */
-    public function getVersion(): float {
-        if (TopLevel::validateVersion($this->version))  {
-            return $this->version;
+    public function getKind(): Kind {
+        if (TopLevel::validateKind($this->kind))  {
+            return $this->kind;
         }
-        throw new Exception('never get to getVersion TopLevel::version');
+        throw new Exception('never get to getKind TopLevel::kind');
     }
 
     /**
-     * @return float
+     * @return Kind
      */
-    public static function sampleVersion(): float {
-        return 35.035; /*35:version*/
+    public static function sampleKind(): Kind {
+        return Kind::sample(); /*enum*/
     }
 
     /**
@@ -266,11 +266,11 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateAmount($this->amount)
-        || TopLevel::validateEnabled($this->enabled)
-        || TopLevel::validateKind($this->kind)
+        return TopLevel::validateVersion($this->version)
+        || TopLevel::validateAmount($this->amount)
         || TopLevel::validateRatio($this->ratio)
-        || TopLevel::validateVersion($this->version);
+        || TopLevel::validateEnabled($this->enabled)
+        || TopLevel::validateKind($this->kind);
     }
 
     /**
@@ -279,11 +279,11 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
+        $out->{'version'} = $this->toVersion();
         $out->{'amount'} = $this->toAmount();
+        $out->{'ratio'} = $this->toRatio();
         $out->{'enabled'} = $this->toEnabled();
         $out->{'kind'} = $this->toKind();
-        $out->{'ratio'} = $this->toRatio();
-        $out->{'version'} = $this->toVersion();
         return $out;
     }
 
@@ -294,11 +294,11 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromAmount($obj->{'amount'})
+         TopLevel::fromVersion($obj->{'version'})
+        ,TopLevel::fromAmount($obj->{'amount'})
+        ,TopLevel::fromRatio($obj->{'ratio'})
         ,TopLevel::fromEnabled($obj->{'enabled'})
         ,TopLevel::fromKind($obj->{'kind'})
-        ,TopLevel::fromRatio($obj->{'ratio'})
-        ,TopLevel::fromVersion($obj->{'version'})
         );
     }
 
@@ -307,11 +307,11 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleAmount()
+         TopLevel::sampleVersion()
+        ,TopLevel::sampleAmount()
+        ,TopLevel::sampleRatio()
         ,TopLevel::sampleEnabled()
         ,TopLevel::sampleKind()
-        ,TopLevel::sampleRatio()
-        ,TopLevel::sampleVersion()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/date-time-or-string.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/date-time-or-string.schema/default/TopLevel.php
index 8bfb42d..81ceefe 100644
--- a/base/schema-php/test/inputs/schema/date-time-or-string.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/date-time-or-string.schema/default/TopLevel.php
@@ -4,16 +4,63 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private Bar|DateTime $bar; // json:bar Required
     private string $foo; // json:foo Required
+    private Bar|DateTime $bar; // json:bar Required
 
     /**
-     * @param Bar|DateTime $bar
      * @param string $foo
+     * @param Bar|DateTime $bar
      */
-    public function __construct(Bar|DateTime $bar, string $foo) {
-        $this->bar = $bar;
+    public function __construct(string $foo, Bar|DateTime $bar) {
         $this->foo = $foo;
+        $this->bar = $bar;
+    }
+
+    /**
+     * @param string $value
+     * @throws Exception
+     * @return string
+     */
+    public static function fromFoo(string $value): string {
+        return $value; /*string*/
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function toFoo(): string {
+        if (TopLevel::validateFoo($this->foo))  {
+            return $this->foo; /*string*/
+        }
+        throw new Exception('never get to this TopLevel::foo');
+    }
+
+    /**
+     * @param string
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateFoo(string $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function getFoo(): string {
+        if (TopLevel::validateFoo($this->foo))  {
+            return $this->foo;
+        }
+        throw new Exception('never get to getFoo TopLevel::foo');
+    }
+
+    /**
+     * @return string
+     */
+    public static function sampleFoo(): string {
+        return 'TopLevel::foo::31'; /*31:foo*/
     }
 
     /**
@@ -88,60 +135,13 @@ class TopLevel {
         return Bar::sample(); /*enum*/
     }
 
-    /**
-     * @param string $value
-     * @throws Exception
-     * @return string
-     */
-    public static function fromFoo(string $value): string {
-        return $value; /*string*/
-    }
-
-    /**
-     * @throws Exception
-     * @return string
-     */
-    public function toFoo(): string {
-        if (TopLevel::validateFoo($this->foo))  {
-            return $this->foo; /*string*/
-        }
-        throw new Exception('never get to this TopLevel::foo');
-    }
-
-    /**
-     * @param string
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateFoo(string $value): bool {
-        return true;
-    }
-
-    /**
-     * @throws Exception
-     * @return string
-     */
-    public function getFoo(): string {
-        if (TopLevel::validateFoo($this->foo))  {
-            return $this->foo;
-        }
-        throw new Exception('never get to getFoo TopLevel::foo');
-    }
-
-    /**
-     * @return string
-     */
-    public static function sampleFoo(): string {
-        return 'TopLevel::foo::32'; /*32:foo*/
-    }
-
     /**
      * @throws Exception
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateBar($this->bar)
-        || TopLevel::validateFoo($this->foo);
+        return TopLevel::validateFoo($this->foo)
+        || TopLevel::validateBar($this->bar);
     }
 
     /**
@@ -150,8 +150,8 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'bar'} = $this->toBar();
         $out->{'foo'} = $this->toFoo();
+        $out->{'bar'} = $this->toBar();
         return $out;
     }
 
@@ -162,8 +162,8 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromBar($obj->{'bar'})
-        ,TopLevel::fromFoo($obj->{'foo'})
+         TopLevel::fromFoo($obj->{'foo'})
+        ,TopLevel::fromBar($obj->{'bar'})
         );
     }
 
@@ -172,8 +172,8 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleBar()
-        ,TopLevel::sampleFoo()
+         TopLevel::sampleFoo()
+        ,TopLevel::sampleBar()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/date-time.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/date-time.schema/default/TopLevel.php
index a1d0782..695fa20 100644
--- a/base/schema-php/test/inputs/schema/date-time.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/date-time.schema/default/TopLevel.php
@@ -4,116 +4,72 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private array $complexUnionArray; // json:complex-union-array Required
     private string $date; // json:date Required
-    private DateTime $dateTime; // json:date-time Required
     private string $time; // json:time Required
+    private DateTime $dateTime; // json:date-time Required
     private array $unionArray; // json:union-array Required
+    private array $complexUnionArray; // json:complex-union-array Required
 
     /**
-     * @param array $complexUnionArray
      * @param string $date
-     * @param DateTime $dateTime
      * @param string $time
+     * @param DateTime $dateTime
      * @param array $unionArray
+     * @param array $complexUnionArray
      */
-    public function __construct(array $complexUnionArray, string $date, DateTime $dateTime, string $time, array $unionArray) {
-        $this->complexUnionArray = $complexUnionArray;
+    public function __construct(string $date, string $time, DateTime $dateTime, array $unionArray, array $complexUnionArray) {
         $this->date = $date;
-        $this->dateTime = $dateTime;
         $this->time = $time;
+        $this->dateTime = $dateTime;
         $this->unionArray = $unionArray;
+        $this->complexUnionArray = $complexUnionArray;
     }
 
     /**
-     * @param array $value
+     * @param string $value
      * @throws Exception
-     * @return array
+     * @return string
      */
-    public static function fromComplexUnionArray(array $value): array {
-        return  array_map(function ($value) {
-            if (is_string($value) && in_array($value, ['foo', 'bar'], true)) {
-                return ComplexUnionArray::from($value); /*enum*/
-            } elseif (is_string($value)) {
-                $tmp = DateTime::createFromFormat(DateTimeInterface::ISO8601, $value);
-                if (!is_a($tmp, 'DateTime')) {
-                    throw new Exception('Attribute Error:TopLevel::');
-                }
-                return $tmp;
-            } elseif (is_int($value)) {
-                return $value; /*int*/
-            } else {
-                throw new Exception('Cannot deserialize union value in TopLevel');
-            }
-        }, $value);
+    public static function fromDate(string $value): string {
+        return $value; /*string*/
     }
 
     /**
      * @throws Exception
-     * @return array
+     * @return string
      */
-    public function toComplexUnionArray(): array {
-        if (TopLevel::validateComplexUnionArray($this->complexUnionArray))  {
-            return array_map(function ($value) {
-                if ($value instanceof ComplexUnionArray) {
-                    return ComplexUnionArray::to($value); /*enum*/
-                } elseif ($value instanceof DateTime) {
-                    return $value->format(DateTimeInterface::ISO8601);
-                } elseif (is_int($value)) {
-                    return $value; /*int*/
-                } else {
-                    throw new Exception('Union value has no matching member in TopLevel');
-                }
-            }, $this->complexUnionArray);
+    public function toDate(): string {
+        if (TopLevel::validateDate($this->date))  {
+            return $this->date; /*string*/
         }
-        throw new Exception('never get to this TopLevel::complexUnionArray');
+        throw new Exception('never get to this TopLevel::date');
     }
 
     /**
-     * @param array
+     * @param string
      * @return bool
      * @throws Exception
      */
-    public static function validateComplexUnionArray(array $value): bool {
-        if (!is_array($value)) {
-            throw new Exception("Attribute Error:TopLevel::complexUnionArray");
-        }
-        array_walk($value, function($value_v) {
-            if ($value_v instanceof ComplexUnionArray) {
-                ComplexUnionArray::to($value_v);
-            } elseif ($value_v instanceof DateTime) {
-                if (!is_a($value_v, 'DateTime')) {
-                    throw new Exception('Attribute Error:TopLevel::complexUnionArray');
-                }
-            } elseif (is_int($value_v)) {
-                if (!is_integer($value_v)) {
-                    throw new Exception("Attribute Error:TopLevel::complexUnionArray");
-                }
-            } else {
-                throw new Exception("Attribute Error:TopLevel::complexUnionArray");
-            }
-        });
+    public static function validateDate(string $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return array
+     * @return string
      */
-    public function getComplexUnionArray(): array {
-        if (TopLevel::validateComplexUnionArray($this->complexUnionArray))  {
-            return $this->complexUnionArray;
+    public function getDate(): string {
+        if (TopLevel::validateDate($this->date))  {
+            return $this->date;
         }
-        throw new Exception('never get to getComplexUnionArray TopLevel::complexUnionArray');
+        throw new Exception('never get to getDate TopLevel::date');
     }
 
     /**
-     * @return array
+     * @return string
      */
-    public static function sampleComplexUnionArray(): array {
-        return  array(
-            ComplexUnionArray::sample() /*enum*/
-        ); /* 31:complexUnionArray*/
+    public static function sampleDate(): string {
+        return 'TopLevel::date::31'; /*31:date*/
     }
 
     /**
@@ -121,7 +77,7 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public static function fromDate(string $value): string {
+    public static function fromTime(string $value): string {
         return $value; /*string*/
     }
 
@@ -129,11 +85,11 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function toDate(): string {
-        if (TopLevel::validateDate($this->date))  {
-            return $this->date; /*string*/
+    public function toTime(): string {
+        if (TopLevel::validateTime($this->time))  {
+            return $this->time; /*string*/
         }
-        throw new Exception('never get to this TopLevel::date');
+        throw new Exception('never get to this TopLevel::time');
     }
 
     /**
@@ -141,7 +97,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateDate(string $value): bool {
+    public static function validateTime(string $value): bool {
         return true;
     }
 
@@ -149,18 +105,18 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function getDate(): string {
-        if (TopLevel::validateDate($this->date))  {
-            return $this->date;
+    public function getTime(): string {
+        if (TopLevel::validateTime($this->time))  {
+            return $this->time;
         }
-        throw new Exception('never get to getDate TopLevel::date');
+        throw new Exception('never get to getTime TopLevel::time');
     }
 
     /**
      * @return string
      */
-    public static function sampleDate(): string {
-        return 'TopLevel::date::32'; /*32:date*/
+    public static function sampleTime(): string {
+        return 'TopLevel::time::32'; /*32:time*/
     }
 
     /**
@@ -218,50 +174,64 @@ class TopLevel {
     }
 
     /**
-     * @param string $value
+     * @param array $value
      * @throws Exception
-     * @return string
+     * @return array
      */
-    public static function fromTime(string $value): string {
-        return $value; /*string*/
+    public static function fromUnionArray(array $value): array {
+        return  array_map(function ($value) {
+            return $value; /*string*/
+        }, $value);
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return array
      */
-    public function toTime(): string {
-        if (TopLevel::validateTime($this->time))  {
-            return $this->time; /*string*/
+    public function toUnionArray(): array {
+        if (TopLevel::validateUnionArray($this->unionArray))  {
+            return array_map(function ($value) {
+                return $value; /*string*/
+            }, $this->unionArray);
         }
-        throw new Exception('never get to this TopLevel::time');
+        throw new Exception('never get to this TopLevel::unionArray');
     }
 
     /**
-     * @param string
+     * @param array
      * @return bool
      * @throws Exception
      */
-    public static function validateTime(string $value): bool {
+    public static function validateUnionArray(array $value): bool {
+        if (!is_array($value)) {
+            throw new Exception("Attribute Error:TopLevel::unionArray");
+        }
+        array_walk($value, function($value_v) {
+            if (!is_string($value_v)) {
+                throw new Exception("Attribute Error:TopLevel::unionArray");
+            }
+        });
         return true;
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return array
      */
-    public function getTime(): string {
-        if (TopLevel::validateTime($this->time))  {
-            return $this->time;
+    public function getUnionArray(): array {
+        if (TopLevel::validateUnionArray($this->unionArray))  {
+            return $this->unionArray;
         }
-        throw new Exception('never get to getTime TopLevel::time');
+        throw new Exception('never get to getUnionArray TopLevel::unionArray');
     }
 
     /**
-     * @return string
+     * @return array
      */
-    public static function sampleTime(): string {
-        return 'TopLevel::time::34'; /*34:time*/
+    public static function sampleUnionArray(): array {
+        return  array(
+            'TopLevel::::34' /*34:*/
+        ); /* 34:unionArray*/
     }
 
     /**
@@ -269,9 +239,21 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public static function fromUnionArray(array $value): array {
+    public static function fromComplexUnionArray(array $value): array {
         return  array_map(function ($value) {
-            return $value; /*string*/
+            if (is_string($value) && in_array($value, ['foo', 'bar'], true)) {
+                return ComplexUnionArray::from($value); /*enum*/
+            } elseif (is_string($value)) {
+                $tmp = DateTime::createFromFormat(DateTimeInterface::ISO8601, $value);
+                if (!is_a($tmp, 'DateTime')) {
+                    throw new Exception('Attribute Error:TopLevel::');
+                }
+                return $tmp;
+            } elseif (is_int($value)) {
+                return $value; /*int*/
+            } else {
+                throw new Exception('Cannot deserialize union value in TopLevel');
+            }
         }, $value);
     }
 
@@ -279,13 +261,21 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function toUnionArray(): array {
-        if (TopLevel::validateUnionArray($this->unionArray))  {
+    public function toComplexUnionArray(): array {
+        if (TopLevel::validateComplexUnionArray($this->complexUnionArray))  {
             return array_map(function ($value) {
-                return $value; /*string*/
-            }, $this->unionArray);
+                if ($value instanceof ComplexUnionArray) {
+                    return ComplexUnionArray::to($value); /*enum*/
+                } elseif ($value instanceof DateTime) {
+                    return $value->format(DateTimeInterface::ISO8601);
+                } elseif (is_int($value)) {
+                    return $value; /*int*/
+                } else {
+                    throw new Exception('Union value has no matching member in TopLevel');
+                }
+            }, $this->complexUnionArray);
         }
-        throw new Exception('never get to this TopLevel::unionArray');
+        throw new Exception('never get to this TopLevel::complexUnionArray');
     }
 
     /**
@@ -293,13 +283,23 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateUnionArray(array $value): bool {
+    public static function validateComplexUnionArray(array $value): bool {
         if (!is_array($value)) {
-            throw new Exception("Attribute Error:TopLevel::unionArray");
+            throw new Exception("Attribute Error:TopLevel::complexUnionArray");
         }
         array_walk($value, function($value_v) {
-            if (!is_string($value_v)) {
-                throw new Exception("Attribute Error:TopLevel::unionArray");
+            if ($value_v instanceof ComplexUnionArray) {
+                ComplexUnionArray::to($value_v);
+            } elseif ($value_v instanceof DateTime) {
+                if (!is_a($value_v, 'DateTime')) {
+                    throw new Exception('Attribute Error:TopLevel::complexUnionArray');
+                }
+            } elseif (is_int($value_v)) {
+                if (!is_integer($value_v)) {
+                    throw new Exception("Attribute Error:TopLevel::complexUnionArray");
+                }
+            } else {
+                throw new Exception("Attribute Error:TopLevel::complexUnionArray");
             }
         });
         return true;
@@ -309,20 +309,20 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function getUnionArray(): array {
-        if (TopLevel::validateUnionArray($this->unionArray))  {
-            return $this->unionArray;
+    public function getComplexUnionArray(): array {
+        if (TopLevel::validateComplexUnionArray($this->complexUnionArray))  {
+            return $this->complexUnionArray;
         }
-        throw new Exception('never get to getUnionArray TopLevel::unionArray');
+        throw new Exception('never get to getComplexUnionArray TopLevel::complexUnionArray');
     }
 
     /**
      * @return array
      */
-    public static function sampleUnionArray(): array {
+    public static function sampleComplexUnionArray(): array {
         return  array(
-            'TopLevel::::35' /*35:*/
-        ); /* 35:unionArray*/
+            ComplexUnionArray::sample() /*enum*/
+        ); /* 35:complexUnionArray*/
     }
 
     /**
@@ -330,11 +330,11 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateComplexUnionArray($this->complexUnionArray)
-        || TopLevel::validateDate($this->date)
-        || TopLevel::validateDateTime($this->dateTime)
+        return TopLevel::validateDate($this->date)
         || TopLevel::validateTime($this->time)
-        || TopLevel::validateUnionArray($this->unionArray);
+        || TopLevel::validateDateTime($this->dateTime)
+        || TopLevel::validateUnionArray($this->unionArray)
+        || TopLevel::validateComplexUnionArray($this->complexUnionArray);
     }
 
     /**
@@ -343,11 +343,11 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'complex-union-array'} = $this->toComplexUnionArray();
         $out->{'date'} = $this->toDate();
-        $out->{'date-time'} = $this->toDateTime();
         $out->{'time'} = $this->toTime();
+        $out->{'date-time'} = $this->toDateTime();
         $out->{'union-array'} = $this->toUnionArray();
+        $out->{'complex-union-array'} = $this->toComplexUnionArray();
         return $out;
     }
 
@@ -358,11 +358,11 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromComplexUnionArray($obj->{'complex-union-array'})
-        ,TopLevel::fromDate($obj->{'date'})
-        ,TopLevel::fromDateTime($obj->{'date-time'})
+         TopLevel::fromDate($obj->{'date'})
         ,TopLevel::fromTime($obj->{'time'})
+        ,TopLevel::fromDateTime($obj->{'date-time'})
         ,TopLevel::fromUnionArray($obj->{'union-array'})
+        ,TopLevel::fromComplexUnionArray($obj->{'complex-union-array'})
         );
     }
 
@@ -371,11 +371,11 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleComplexUnionArray()
-        ,TopLevel::sampleDate()
-        ,TopLevel::sampleDateTime()
+         TopLevel::sampleDate()
         ,TopLevel::sampleTime()
+        ,TopLevel::sampleDateTime()
         ,TopLevel::sampleUnionArray()
+        ,TopLevel::sampleComplexUnionArray()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/description.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/description.schema/default/TopLevel.php
index 97c8d1c..cb7233a 100644
--- a/base/schema-php/test/inputs/schema/description.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/description.schema/default/TopLevel.php
@@ -4,92 +4,105 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private ?bool $bar; // json:bar Optional
+    private float|string $union; // json:union Required
     private EnumEnum $enum; // json:enum Required
     private ?float $foo; // json:foo Optional
+    private ?bool $bar; // json:bar Optional
     private ObjectOrString|string $objectOrString; // json:object-or-string Required
-    private float|string $union; // json:union Required
 
     /**
-     * @param bool|null $bar
+     * @param float|string $union
      * @param EnumEnum $enum
      * @param float|null $foo
+     * @param bool|null $bar
      * @param ObjectOrString|string $objectOrString
-     * @param float|string $union
      */
-    public function __construct(?bool $bar, EnumEnum $enum, ?float $foo, ObjectOrString|string $objectOrString, float|string $union) {
-        $this->bar = $bar;
+    public function __construct(float|string $union, EnumEnum $enum, ?float $foo, ?bool $bar, ObjectOrString|string $objectOrString) {
+        $this->union = $union;
         $this->enum = $enum;
         $this->foo = $foo;
+        $this->bar = $bar;
         $this->objectOrString = $objectOrString;
-        $this->union = $union;
     }
 
     /**
-     * A pretty boolean
+     * Either a number or a string
      *
-     * @param ?bool $value
+     * @param float|string $value
      * @throws Exception
-     * @return ?bool
+     * @return float|string
      */
-    public static function fromBar(?bool $value): ?bool {
-        if (!is_null($value)) {
-            return $value; /*bool*/
+    public static function fromUnion(float|string $value): float|string {
+        if (is_float($value) || is_int($value)) {
+            return $value; /*float*/
+        } elseif (is_string($value)) {
+            return $value; /*string*/
         } else {
-            return  null;
+            throw new Exception('Cannot deserialize union value in TopLevel');
         }
     }
 
     /**
-     * A pretty boolean
+     * Either a number or a string
      *
      * @throws Exception
-     * @return ?bool
+     * @return float|string
      */
-    public function toBar(): ?bool {
-        if (TopLevel::validateBar($this->bar))  {
-            if (!is_null($this->bar)) {
-                return $this->bar; /*bool*/
+    public function toUnion(): float|string {
+        if (TopLevel::validateUnion($this->union))  {
+            if (is_float($this->union) || is_int($this->union)) {
+                return $this->union; /*float*/
+            } elseif (is_string($this->union)) {
+                return $this->union; /*string*/
             } else {
-                return  null;
+                throw new Exception('Union value has no matching member in TopLevel');
             }
         }
-        throw new Exception('never get to this TopLevel::bar');
+        throw new Exception('never get to this TopLevel::union');
     }
 
     /**
-     * A pretty boolean
+     * Either a number or a string
      *
-     * @param bool|null
+     * @param float|string
      * @return bool
      * @throws Exception
      */
-    public static function validateBar(?bool $value): bool {
-        if (!is_null($value)) {
+    public static function validateUnion(float|string $value): bool {
+        if (is_float($value) || is_int($value)) {
+            if (!is_float($value) && !is_int($value)) {
+                throw new Exception("Attribute Error:TopLevel::union");
+            }
+        } elseif (is_string($value)) {
+            if (!is_string($value)) {
+                throw new Exception("Attribute Error:TopLevel::union");
+            }
+        } else {
+            throw new Exception("Attribute Error:TopLevel::union");
         }
         return true;
     }
 
     /**
-     * A pretty boolean
+     * Either a number or a string
      *
      * @throws Exception
-     * @return ?bool
+     * @return float|string
      */
-    public function getBar(): ?bool {
-        if (TopLevel::validateBar($this->bar))  {
-            return $this->bar;
+    public function getUnion(): float|string {
+        if (TopLevel::validateUnion($this->union))  {
+            return $this->union;
         }
-        throw new Exception('never get to getBar TopLevel::bar');
+        throw new Exception('never get to getUnion TopLevel::union');
     }
 
     /**
-     * A pretty boolean
+     * Either a number or a string
      *
-     * @return ?bool
+     * @return float|string
      */
-    public static function sampleBar(): ?bool {
-        return true; /*31:bar*/
+    public static function sampleUnion(): float|string {
+        return 31.031; /*31:union*/
     }
 
     /**
@@ -208,83 +221,80 @@ class TopLevel {
     }
 
     /**
-     * @param stdClass|string $value
+     * A pretty boolean
+     *
+     * @param ?bool $value
      * @throws Exception
-     * @return ObjectOrString|string
+     * @return ?bool
      */
-    public static function fromObjectOrString(stdClass|string $value): ObjectOrString|string {
-        if (is_object($value)) {
-            return ObjectOrString::from($value); /*class*/
-        } elseif (is_string($value)) {
-            return $value; /*string*/
+    public static function fromBar(?bool $value): ?bool {
+        if (!is_null($value)) {
+            return $value; /*bool*/
         } else {
-            throw new Exception('Cannot deserialize union value in TopLevel');
+            return  null;
         }
     }
 
     /**
+     * A pretty boolean
+     *
      * @throws Exception
-     * @return stdClass|string
+     * @return ?bool
      */
-    public function toObjectOrString(): stdClass|string {
-        if (TopLevel::validateObjectOrString($this->objectOrString))  {
-            if ($this->objectOrString instanceof ObjectOrString) {
-                return $this->objectOrString->to(); /*class*/
-            } elseif (is_string($this->objectOrString)) {
-                return $this->objectOrString; /*string*/
+    public function toBar(): ?bool {
+        if (TopLevel::validateBar($this->bar))  {
+            if (!is_null($this->bar)) {
+                return $this->bar; /*bool*/
             } else {
-                throw new Exception('Union value has no matching member in TopLevel');
+                return  null;
             }
         }
-        throw new Exception('never get to this TopLevel::objectOrString');
+        throw new Exception('never get to this TopLevel::bar');
     }
 
     /**
-     * @param ObjectOrString|string
+     * A pretty boolean
+     *
+     * @param bool|null
      * @return bool
      * @throws Exception
      */
-    public static function validateObjectOrString(ObjectOrString|string $value): bool {
-        if ($value instanceof ObjectOrString) {
-            $value->validate();
-        } elseif (is_string($value)) {
-            if (!is_string($value)) {
-                throw new Exception("Attribute Error:TopLevel::objectOrString");
-            }
-        } else {
-            throw new Exception("Attribute Error:TopLevel::objectOrString");
+    public static function validateBar(?bool $value): bool {
+        if (!is_null($value)) {
         }
         return true;
     }
 
     /**
+     * A pretty boolean
+     *
      * @throws Exception
-     * @return ObjectOrString|string
+     * @return ?bool
      */
-    public function getObjectOrString(): ObjectOrString|string {
-        if (TopLevel::validateObjectOrString($this->objectOrString))  {
-            return $this->objectOrString;
+    public function getBar(): ?bool {
+        if (TopLevel::validateBar($this->bar))  {
+            return $this->bar;
         }
-        throw new Exception('never get to getObjectOrString TopLevel::objectOrString');
+        throw new Exception('never get to getBar TopLevel::bar');
     }
 
     /**
-     * @return ObjectOrString|string
+     * A pretty boolean
+     *
+     * @return ?bool
      */
-    public static function sampleObjectOrString(): ObjectOrString|string {
-        return ObjectOrString::sample(); /*34:objectOrString*/
+    public static function sampleBar(): ?bool {
+        return true; /*34:bar*/
     }
 
     /**
-     * Either a number or a string
-     *
-     * @param float|string $value
+     * @param stdClass|string $value
      * @throws Exception
-     * @return float|string
+     * @return ObjectOrString|string
      */
-    public static function fromUnion(float|string $value): float|string {
-        if (is_float($value) || is_int($value)) {
-            return $value; /*float*/
+    public static function fromObjectOrString(stdClass|string $value): ObjectOrString|string {
+        if (is_object($value)) {
+            return ObjectOrString::from($value); /*class*/
         } elseif (is_string($value)) {
             return $value; /*string*/
         } else {
@@ -293,66 +303,56 @@ class TopLevel {
     }
 
     /**
-     * Either a number or a string
-     *
      * @throws Exception
-     * @return float|string
+     * @return stdClass|string
      */
-    public function toUnion(): float|string {
-        if (TopLevel::validateUnion($this->union))  {
-            if (is_float($this->union) || is_int($this->union)) {
-                return $this->union; /*float*/
-            } elseif (is_string($this->union)) {
-                return $this->union; /*string*/
+    public function toObjectOrString(): stdClass|string {
+        if (TopLevel::validateObjectOrString($this->objectOrString))  {
+            if ($this->objectOrString instanceof ObjectOrString) {
+                return $this->objectOrString->to(); /*class*/
+            } elseif (is_string($this->objectOrString)) {
+                return $this->objectOrString; /*string*/
             } else {
                 throw new Exception('Union value has no matching member in TopLevel');
             }
         }
-        throw new Exception('never get to this TopLevel::union');
+        throw new Exception('never get to this TopLevel::objectOrString');
     }
 
     /**
-     * Either a number or a string
-     *
-     * @param float|string
+     * @param ObjectOrString|string
      * @return bool
      * @throws Exception
      */
-    public static function validateUnion(float|string $value): bool {
-        if (is_float($value) || is_int($value)) {
-            if (!is_float($value) && !is_int($value)) {
-                throw new Exception("Attribute Error:TopLevel::union");
-            }
+    public static function validateObjectOrString(ObjectOrString|string $value): bool {
+        if ($value instanceof ObjectOrString) {
+            $value->validate();
         } elseif (is_string($value)) {
             if (!is_string($value)) {
-                throw new Exception("Attribute Error:TopLevel::union");
+                throw new Exception("Attribute Error:TopLevel::objectOrString");
             }
         } else {
-            throw new Exception("Attribute Error:TopLevel::union");
+            throw new Exception("Attribute Error:TopLevel::objectOrString");
         }
         return true;
     }
 
     /**
-     * Either a number or a string
-     *
      * @throws Exception
-     * @return float|string
+     * @return ObjectOrString|string
      */
-    public function getUnion(): float|string {
-        if (TopLevel::validateUnion($this->union))  {
-            return $this->union;
+    public function getObjectOrString(): ObjectOrString|string {
+        if (TopLevel::validateObjectOrString($this->objectOrString))  {
+            return $this->objectOrString;
         }
-        throw new Exception('never get to getUnion TopLevel::union');
+        throw new Exception('never get to getObjectOrString TopLevel::objectOrString');
     }
 
     /**
-     * Either a number or a string
-     *
-     * @return float|string
+     * @return ObjectOrString|string
      */
-    public static function sampleUnion(): float|string {
-        return 35.035; /*35:union*/
+    public static function sampleObjectOrString(): ObjectOrString|string {
+        return ObjectOrString::sample(); /*35:objectOrString*/
     }
 
     /**
@@ -360,11 +360,11 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateBar($this->bar)
+        return TopLevel::validateUnion($this->union)
         || TopLevel::validateEnum($this->enum)
         || TopLevel::validateFoo($this->foo)
-        || TopLevel::validateObjectOrString($this->objectOrString)
-        || TopLevel::validateUnion($this->union);
+        || TopLevel::validateBar($this->bar)
+        || TopLevel::validateObjectOrString($this->objectOrString);
     }
 
     /**
@@ -373,11 +373,11 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'bar'} = $this->toBar();
+        $out->{'union'} = $this->toUnion();
         $out->{'enum'} = $this->toEnum();
         $out->{'foo'} = $this->toFoo();
+        $out->{'bar'} = $this->toBar();
         $out->{'object-or-string'} = $this->toObjectOrString();
-        $out->{'union'} = $this->toUnion();
         return $out;
     }
 
@@ -388,11 +388,11 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromBar($obj->{'bar'})
+         TopLevel::fromUnion($obj->{'union'})
         ,TopLevel::fromEnum($obj->{'enum'})
         ,TopLevel::fromFoo($obj->{'foo'})
+        ,TopLevel::fromBar($obj->{'bar'})
         ,TopLevel::fromObjectOrString($obj->{'object-or-string'})
-        ,TopLevel::fromUnion($obj->{'union'})
         );
     }
 
@@ -401,11 +401,11 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleBar()
+         TopLevel::sampleUnion()
         ,TopLevel::sampleEnum()
         ,TopLevel::sampleFoo()
+        ,TopLevel::sampleBar()
         ,TopLevel::sampleObjectOrString()
-        ,TopLevel::sampleUnion()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/direct-union.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/direct-union.schema/default/TopLevel.php
index 97a77f3..d3c66b0 100644
--- a/base/schema-php/test/inputs/schema/direct-union.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/direct-union.schema/default/TopLevel.php
@@ -117,16 +117,16 @@ class TopLevel {
 // This is an autogenerated file:Thing
 
 class Thing {
-    private stdClass|array|bool|int|float|string|null $optional; // json:optional Optional
     private stdClass|array|bool|int|float|string|null $required; // json:required Optional
+    private stdClass|array|bool|int|float|string|null $optional; // json:optional Optional
 
     /**
-     * @param stdClass|array|bool|int|float|string|null $optional
      * @param stdClass|array|bool|int|float|string|null $required
+     * @param stdClass|array|bool|int|float|string|null $optional
      */
-    public function __construct(stdClass|array|bool|int|float|string|null $optional, stdClass|array|bool|int|float|string|null $required) {
-        $this->optional = $optional;
+    public function __construct(stdClass|array|bool|int|float|string|null $required, stdClass|array|bool|int|float|string|null $optional) {
         $this->required = $required;
+        $this->optional = $optional;
     }
 
     /**
@@ -134,7 +134,7 @@ class Thing {
      * @throws Exception
      * @return stdClass|array|bool|int|float|string|null
      */
-    public static function fromOptional(stdClass|array|bool|int|float|string|null $value): stdClass|array|bool|int|float|string|null {
+    public static function fromRequired(stdClass|array|bool|int|float|string|null $value): stdClass|array|bool|int|float|string|null {
         if (is_null($value)) {
             return $value; /*null*/
         } elseif (is_object($value)) {
@@ -164,33 +164,33 @@ class Thing {
      * @throws Exception
      * @return stdClass|array|bool|int|float|string|null
      */
-    public function toOptional(): stdClass|array|bool|int|float|string|null {
-        if (Thing::validateOptional($this->optional))  {
-            if (is_null($this->optional)) {
-                return $this->optional; /*null*/
-            } elseif ($this->optional instanceof stdClass) {
+    public function toRequired(): stdClass|array|bool|int|float|string|null {
+        if (Thing::validateRequired($this->required))  {
+            if (is_null($this->required)) {
+                return $this->required; /*null*/
+            } elseif ($this->required instanceof stdClass) {
                 $out = new stdClass();
-                foreach ($this->optional as $k => $v) {
+                foreach ($this->required as $k => $v) {
                     $out->$k = $v; /*any*/
                 }
                 return $out;
-            } elseif (is_array($this->optional)) {
+            } elseif (is_array($this->required)) {
                 return array_map(function ($value) {
                     return $value; /*any*/
-                }, $this->optional);
-            } elseif (is_bool($this->optional)) {
-                return $this->optional; /*bool*/
-            } elseif (is_int($this->optional)) {
-                return $this->optional; /*int*/
-            } elseif (is_float($this->optional) || is_int($this->optional)) {
-                return $this->optional; /*float*/
-            } elseif (is_string($this->optional)) {
-                return $this->optional; /*string*/
+                }, $this->required);
+            } elseif (is_bool($this->required)) {
+                return $this->required; /*bool*/
+            } elseif (is_int($this->required)) {
+                return $this->required; /*int*/
+            } elseif (is_float($this->required) || is_int($this->required)) {
+                return $this->required; /*float*/
+            } elseif (is_string($this->required)) {
+                return $this->required; /*string*/
             } else {
                 throw new Exception('Union value has no matching member in Thing');
             }
         }
-        throw new Exception('never get to this Thing::optional');
+        throw new Exception('never get to this Thing::required');
     }
 
     /**
@@ -198,38 +198,38 @@ class Thing {
      * @return bool
      * @throws Exception
      */
-    public static function validateOptional(stdClass|array|bool|int|float|string|null $value): bool {
+    public static function validateRequired(stdClass|array|bool|int|float|string|null $value): bool {
         if (is_null($value)) {
             if (!is_null($value)) {
-                throw new Exception("Attribute Error:Thing::optional");
+                throw new Exception("Attribute Error:Thing::required");
             }
         } elseif ($value instanceof stdClass) {
             foreach ($value as $k => $v) {
             }
         } elseif (is_array($value)) {
             if (!is_array($value)) {
-                throw new Exception("Attribute Error:Thing::optional");
+                throw new Exception("Attribute Error:Thing::required");
             }
             array_walk($value, function($value_v) {
             });
         } elseif (is_bool($value)) {
             if (!is_bool($value)) {
-                throw new Exception("Attribute Error:Thing::optional");
+                throw new Exception("Attribute Error:Thing::required");
             }
         } elseif (is_int($value)) {
             if (!is_integer($value)) {
-                throw new Exception("Attribute Error:Thing::optional");
+                throw new Exception("Attribute Error:Thing::required");
             }
         } elseif (is_float($value) || is_int($value)) {
             if (!is_float($value) && !is_int($value)) {
-                throw new Exception("Attribute Error:Thing::optional");
+                throw new Exception("Attribute Error:Thing::required");
             }
         } elseif (is_string($value)) {
             if (!is_string($value)) {
-                throw new Exception("Attribute Error:Thing::optional");
+                throw new Exception("Attribute Error:Thing::required");
             }
         } else {
-            throw new Exception("Attribute Error:Thing::optional");
+            throw new Exception("Attribute Error:Thing::required");
         }
         return true;
     }
@@ -238,22 +238,22 @@ class Thing {
      * @throws Exception
      * @return stdClass|array|bool|int|float|string|null
      */
-    public function getOptional(): stdClass|array|bool|int|float|string|null {
-        if (Thing::validateOptional($this->optional))  {
-            return $this->optional;
+    public function getRequired(): stdClass|array|bool|int|float|string|null {
+        if (Thing::validateRequired($this->required))  {
+            return $this->required;
         }
-        throw new Exception('never get to getOptional Thing::optional');
+        throw new Exception('never get to getRequired Thing::required');
     }
 
     /**
      * @return stdClass|array|bool|int|float|string|null
      */
-    public static function sampleOptional(): stdClass|array|bool|int|float|string|null {
+    public static function sampleRequired(): stdClass|array|bool|int|float|string|null {
         return  (function () {
             $out = new stdClass();
-            $out->{'Thing'} = 'AnyType::Thing::optional::31';/*31:optional*/
+            $out->{'Thing'} = 'AnyType::Thing::required::31';/*31:required*/
             return $out;
-        })(); /* 31:optional*/
+        })(); /* 31:required*/
     }
 
     /**
@@ -261,7 +261,7 @@ class Thing {
      * @throws Exception
      * @return stdClass|array|bool|int|float|string|null
      */
-    public static function fromRequired(stdClass|array|bool|int|float|string|null $value): stdClass|array|bool|int|float|string|null {
+    public static function fromOptional(stdClass|array|bool|int|float|string|null $value): stdClass|array|bool|int|float|string|null {
         if (is_null($value)) {
             return $value; /*null*/
         } elseif (is_object($value)) {
@@ -291,33 +291,33 @@ class Thing {
      * @throws Exception
      * @return stdClass|array|bool|int|float|string|null
      */
-    public function toRequired(): stdClass|array|bool|int|float|string|null {
-        if (Thing::validateRequired($this->required))  {
-            if (is_null($this->required)) {
-                return $this->required; /*null*/
-            } elseif ($this->required instanceof stdClass) {
+    public function toOptional(): stdClass|array|bool|int|float|string|null {
+        if (Thing::validateOptional($this->optional))  {
+            if (is_null($this->optional)) {
+                return $this->optional; /*null*/
+            } elseif ($this->optional instanceof stdClass) {
                 $out = new stdClass();
-                foreach ($this->required as $k => $v) {
+                foreach ($this->optional as $k => $v) {
                     $out->$k = $v; /*any*/
                 }
                 return $out;
-            } elseif (is_array($this->required)) {
+            } elseif (is_array($this->optional)) {
                 return array_map(function ($value) {
                     return $value; /*any*/
-                }, $this->required);
-            } elseif (is_bool($this->required)) {
-                return $this->required; /*bool*/
-            } elseif (is_int($this->required)) {
-                return $this->required; /*int*/
-            } elseif (is_float($this->required) || is_int($this->required)) {
-                return $this->required; /*float*/
-            } elseif (is_string($this->required)) {
-                return $this->required; /*string*/
+                }, $this->optional);
+            } elseif (is_bool($this->optional)) {
+                return $this->optional; /*bool*/
+            } elseif (is_int($this->optional)) {
+                return $this->optional; /*int*/
+            } elseif (is_float($this->optional) || is_int($this->optional)) {
+                return $this->optional; /*float*/
+            } elseif (is_string($this->optional)) {
+                return $this->optional; /*string*/
             } else {
                 throw new Exception('Union value has no matching member in Thing');
             }
         }
-        throw new Exception('never get to this Thing::required');
+        throw new Exception('never get to this Thing::optional');
     }
 
     /**
@@ -325,38 +325,38 @@ class Thing {
      * @return bool
      * @throws Exception
      */
-    public static function validateRequired(stdClass|array|bool|int|float|string|null $value): bool {
+    public static function validateOptional(stdClass|array|bool|int|float|string|null $value): bool {
         if (is_null($value)) {
             if (!is_null($value)) {
-                throw new Exception("Attribute Error:Thing::required");
+                throw new Exception("Attribute Error:Thing::optional");
             }
         } elseif ($value instanceof stdClass) {
             foreach ($value as $k => $v) {
             }
         } elseif (is_array($value)) {
             if (!is_array($value)) {
-                throw new Exception("Attribute Error:Thing::required");
+                throw new Exception("Attribute Error:Thing::optional");
             }
             array_walk($value, function($value_v) {
             });
         } elseif (is_bool($value)) {
             if (!is_bool($value)) {
-                throw new Exception("Attribute Error:Thing::required");
+                throw new Exception("Attribute Error:Thing::optional");
             }
         } elseif (is_int($value)) {
             if (!is_integer($value)) {
-                throw new Exception("Attribute Error:Thing::required");
+                throw new Exception("Attribute Error:Thing::optional");
             }
         } elseif (is_float($value) || is_int($value)) {
             if (!is_float($value) && !is_int($value)) {
-                throw new Exception("Attribute Error:Thing::required");
+                throw new Exception("Attribute Error:Thing::optional");
             }
         } elseif (is_string($value)) {
             if (!is_string($value)) {
-                throw new Exception("Attribute Error:Thing::required");
+                throw new Exception("Attribute Error:Thing::optional");
             }
         } else {
-            throw new Exception("Attribute Error:Thing::required");
+            throw new Exception("Attribute Error:Thing::optional");
         }
         return true;
     }
@@ -365,22 +365,22 @@ class Thing {
      * @throws Exception
      * @return stdClass|array|bool|int|float|string|null
      */
-    public function getRequired(): stdClass|array|bool|int|float|string|null {
-        if (Thing::validateRequired($this->required))  {
-            return $this->required;
+    public function getOptional(): stdClass|array|bool|int|float|string|null {
+        if (Thing::validateOptional($this->optional))  {
+            return $this->optional;
         }
-        throw new Exception('never get to getRequired Thing::required');
+        throw new Exception('never get to getOptional Thing::optional');
     }
 
     /**
      * @return stdClass|array|bool|int|float|string|null
      */
-    public static function sampleRequired(): stdClass|array|bool|int|float|string|null {
+    public static function sampleOptional(): stdClass|array|bool|int|float|string|null {
         return  (function () {
             $out = new stdClass();
-            $out->{'Thing'} = 'AnyType::Thing::required::32';/*32:required*/
+            $out->{'Thing'} = 'AnyType::Thing::optional::32';/*32:optional*/
             return $out;
-        })(); /* 32:required*/
+        })(); /* 32:optional*/
     }
 
     /**
@@ -388,8 +388,8 @@ class Thing {
      * @return bool
      */
     public function validate(): bool {
-        return Thing::validateOptional($this->optional)
-        || Thing::validateRequired($this->required);
+        return Thing::validateRequired($this->required)
+        || Thing::validateOptional($this->optional);
     }
 
     /**
@@ -398,8 +398,8 @@ class Thing {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'optional'} = $this->toOptional();
         $out->{'required'} = $this->toRequired();
+        $out->{'optional'} = $this->toOptional();
         return $out;
     }
 
@@ -410,8 +410,8 @@ class Thing {
      */
     public static function from(stdClass $obj): Thing {
         return new Thing(
-         Thing::fromOptional($obj->{'optional'})
-        ,Thing::fromRequired($obj->{'required'})
+         Thing::fromRequired($obj->{'required'})
+        ,Thing::fromOptional($obj->{'optional'})
         );
     }
 
@@ -420,8 +420,8 @@ class Thing {
      */
     public static function sample(): Thing {
         return new Thing(
-         Thing::sampleOptional()
-        ,Thing::sampleRequired()
+         Thing::sampleRequired()
+        ,Thing::sampleOptional()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/enum.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/enum.schema/default/TopLevel.php
index 2151f40..2415dce 100644
--- a/base/schema-php/test/inputs/schema/enum.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/enum.schema/default/TopLevel.php
@@ -4,124 +4,35 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private ?array $arr; // json:arr Optional
-    private ?string $for; // json:for Optional
-    private Gve $gve; // json:gve Required
     private ?Lvc $lvc; // json:lvc Optional
+    private Gve $gve; // json:gve Required
+    private ?array $arr; // json:arr Optional
     private ?array $otherArr; // json:otherArr Optional
+    private ?string $for; // json:for Optional
 
     /**
-     * @param array|null $arr
-     * @param string|null $for
-     * @param Gve $gve
      * @param Lvc|null $lvc
+     * @param Gve $gve
+     * @param array|null $arr
      * @param array|null $otherArr
+     * @param string|null $for
      */
-    public function __construct(?array $arr, ?string $for, Gve $gve, ?Lvc $lvc, ?array $otherArr) {
-        $this->arr = $arr;
-        $this->for = $for;
-        $this->gve = $gve;
+    public function __construct(?Lvc $lvc, Gve $gve, ?array $arr, ?array $otherArr, ?string $for) {
         $this->lvc = $lvc;
+        $this->gve = $gve;
+        $this->arr = $arr;
         $this->otherArr = $otherArr;
-    }
-
-    /**
-     * @param ?array $value
-     * @throws Exception
-     * @return ?array
-     */
-    public static function fromArr(?array $value): ?array {
-        if (!is_null($value)) {
-            return  array_map(function ($value) {
-                if (is_string($value) && in_array($value, ['foo', 'bar', 'if'], true)) {
-                    return OtherArr::from($value); /*enum*/
-                } elseif (is_int($value)) {
-                    return $value; /*int*/
-                } else {
-                    throw new Exception('Cannot deserialize union value in TopLevel');
-                }
-            }, $value);
-        } else {
-            return  null;
-        }
-    }
-
-    /**
-     * @throws Exception
-     * @return ?array
-     */
-    public function toArr(): ?array {
-        if (TopLevel::validateArr($this->arr))  {
-            if (!is_null($this->arr)) {
-                return array_map(function ($value) {
-                    if ($value instanceof OtherArr) {
-                        return OtherArr::to($value); /*enum*/
-                    } elseif (is_int($value)) {
-                        return $value; /*int*/
-                    } else {
-                        throw new Exception('Union value has no matching member in TopLevel');
-                    }
-                }, $this->arr);
-            } else {
-                return  null;
-            }
-        }
-        throw new Exception('never get to this TopLevel::arr');
-    }
-
-    /**
-     * @param array|null
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateArr(?array $value): bool {
-        if (!is_null($value)) {
-            if (!is_array($value)) {
-                throw new Exception("Attribute Error:TopLevel::arr");
-            }
-            array_walk($value, function($value_v) {
-                if ($value_v instanceof OtherArr) {
-                    OtherArr::to($value_v);
-                } elseif (is_int($value_v)) {
-                    if (!is_integer($value_v)) {
-                        throw new Exception("Attribute Error:TopLevel::arr");
-                    }
-                } else {
-                    throw new Exception("Attribute Error:TopLevel::arr");
-                }
-            });
-        }
-        return true;
-    }
-
-    /**
-     * @throws Exception
-     * @return ?array
-     */
-    public function getArr(): ?array {
-        if (TopLevel::validateArr($this->arr))  {
-            return $this->arr;
-        }
-        throw new Exception('never get to getArr TopLevel::arr');
-    }
-
-    /**
-     * @return ?array
-     */
-    public static function sampleArr(): ?array {
-        return  array(
-            OtherArr::sample() /*enum*/
-        ); /* 31:arr*/
+        $this->for = $for;
     }
 
     /**
      * @param ?string $value
      * @throws Exception
-     * @return ?string
+     * @return ?Lvc
      */
-    public static function fromFor(?string $value): ?string {
+    public static function fromLvc(?string $value): ?Lvc {
         if (!is_null($value)) {
-            return $value; /*string*/
+            return Lvc::from($value); /*enum*/
         } else {
             return  null;
         }
@@ -131,44 +42,45 @@ class TopLevel {
      * @throws Exception
      * @return ?string
      */
-    public function toFor(): ?string {
-        if (TopLevel::validateFor($this->for))  {
-            if (!is_null($this->for)) {
-                return $this->for; /*string*/
+    public function toLvc(): ?string {
+        if (TopLevel::validateLvc($this->lvc))  {
+            if (!is_null($this->lvc)) {
+                return Lvc::to($this->lvc); /*enum*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this TopLevel::for');
+        throw new Exception('never get to this TopLevel::lvc');
     }
 
     /**
-     * @param string|null
+     * @param Lvc|null
      * @return bool
      * @throws Exception
      */
-    public static function validateFor(?string $value): bool {
+    public static function validateLvc(?Lvc $value): bool {
         if (!is_null($value)) {
+            Lvc::to($value);
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?Lvc
      */
-    public function getFor(): ?string {
-        if (TopLevel::validateFor($this->for))  {
-            return $this->for;
+    public function getLvc(): ?Lvc {
+        if (TopLevel::validateLvc($this->lvc))  {
+            return $this->lvc;
         }
-        throw new Exception('never get to getFor TopLevel::for');
+        throw new Exception('never get to getLvc TopLevel::lvc');
     }
 
     /**
-     * @return ?string
+     * @return ?Lvc
      */
-    public static function sampleFor(): ?string {
-        return 'TopLevel::for::32'; /*32:for*/
+    public static function sampleLvc(): ?Lvc {
+        return Lvc::sample(); /*enum*/
     }
 
     /**
@@ -220,13 +132,21 @@ class TopLevel {
     }
 
     /**
-     * @param ?string $value
+     * @param ?array $value
      * @throws Exception
-     * @return ?Lvc
+     * @return ?array
      */
-    public static function fromLvc(?string $value): ?Lvc {
+    public static function fromArr(?array $value): ?array {
         if (!is_null($value)) {
-            return Lvc::from($value); /*enum*/
+            return  array_map(function ($value) {
+                if (is_string($value) && in_array($value, ['foo', 'bar', 'if'], true)) {
+                    return OtherArr::from($value); /*enum*/
+                } elseif (is_int($value)) {
+                    return $value; /*int*/
+                } else {
+                    throw new Exception('Cannot deserialize union value in TopLevel');
+                }
+            }, $value);
         } else {
             return  null;
         }
@@ -234,47 +154,70 @@ class TopLevel {
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?array
      */
-    public function toLvc(): ?string {
-        if (TopLevel::validateLvc($this->lvc))  {
-            if (!is_null($this->lvc)) {
-                return Lvc::to($this->lvc); /*enum*/
+    public function toArr(): ?array {
+        if (TopLevel::validateArr($this->arr))  {
+            if (!is_null($this->arr)) {
+                return array_map(function ($value) {
+                    if ($value instanceof OtherArr) {
+                        return OtherArr::to($value); /*enum*/
+                    } elseif (is_int($value)) {
+                        return $value; /*int*/
+                    } else {
+                        throw new Exception('Union value has no matching member in TopLevel');
+                    }
+                }, $this->arr);
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this TopLevel::lvc');
+        throw new Exception('never get to this TopLevel::arr');
     }
 
     /**
-     * @param Lvc|null
+     * @param array|null
      * @return bool
      * @throws Exception
      */
-    public static function validateLvc(?Lvc $value): bool {
+    public static function validateArr(?array $value): bool {
         if (!is_null($value)) {
-            Lvc::to($value);
+            if (!is_array($value)) {
+                throw new Exception("Attribute Error:TopLevel::arr");
+            }
+            array_walk($value, function($value_v) {
+                if ($value_v instanceof OtherArr) {
+                    OtherArr::to($value_v);
+                } elseif (is_int($value_v)) {
+                    if (!is_integer($value_v)) {
+                        throw new Exception("Attribute Error:TopLevel::arr");
+                    }
+                } else {
+                    throw new Exception("Attribute Error:TopLevel::arr");
+                }
+            });
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?Lvc
+     * @return ?array
      */
-    public function getLvc(): ?Lvc {
-        if (TopLevel::validateLvc($this->lvc))  {
-            return $this->lvc;
+    public function getArr(): ?array {
+        if (TopLevel::validateArr($this->arr))  {
+            return $this->arr;
         }
-        throw new Exception('never get to getLvc TopLevel::lvc');
+        throw new Exception('never get to getArr TopLevel::arr');
     }
 
     /**
-     * @return ?Lvc
+     * @return ?array
      */
-    public static function sampleLvc(): ?Lvc {
-        return Lvc::sample(); /*enum*/
+    public static function sampleArr(): ?array {
+        return  array(
+            OtherArr::sample() /*enum*/
+        ); /* 33:arr*/
     }
 
     /**
@@ -343,7 +286,64 @@ class TopLevel {
     public static function sampleOtherArr(): ?array {
         return  array(
             OtherArr::sample() /*enum*/
-        ); /* 35:otherArr*/
+        ); /* 34:otherArr*/
+    }
+
+    /**
+     * @param ?string $value
+     * @throws Exception
+     * @return ?string
+     */
+    public static function fromFor(?string $value): ?string {
+        if (!is_null($value)) {
+            return $value; /*string*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * @throws Exception
+     * @return ?string
+     */
+    public function toFor(): ?string {
+        if (TopLevel::validateFor($this->for))  {
+            if (!is_null($this->for)) {
+                return $this->for; /*string*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this TopLevel::for');
+    }
+
+    /**
+     * @param string|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateFor(?string $value): bool {
+        if (!is_null($value)) {
+        }
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return ?string
+     */
+    public function getFor(): ?string {
+        if (TopLevel::validateFor($this->for))  {
+            return $this->for;
+        }
+        throw new Exception('never get to getFor TopLevel::for');
+    }
+
+    /**
+     * @return ?string
+     */
+    public static function sampleFor(): ?string {
+        return 'TopLevel::for::35'; /*35:for*/
     }
 
     /**
@@ -351,11 +351,11 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateArr($this->arr)
-        || TopLevel::validateFor($this->for)
+        return TopLevel::validateLvc($this->lvc)
         || TopLevel::validateGve($this->gve)
-        || TopLevel::validateLvc($this->lvc)
-        || TopLevel::validateOtherArr($this->otherArr);
+        || TopLevel::validateArr($this->arr)
+        || TopLevel::validateOtherArr($this->otherArr)
+        || TopLevel::validateFor($this->for);
     }
 
     /**
@@ -364,11 +364,11 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'arr'} = $this->toArr();
-        $out->{'for'} = $this->toFor();
-        $out->{'gve'} = $this->toGve();
         $out->{'lvc'} = $this->toLvc();
+        $out->{'gve'} = $this->toGve();
+        $out->{'arr'} = $this->toArr();
         $out->{'otherArr'} = $this->toOtherArr();
+        $out->{'for'} = $this->toFor();
         return $out;
     }
 
@@ -379,11 +379,11 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromArr($obj->{'arr'})
-        ,TopLevel::fromFor($obj->{'for'})
+         TopLevel::fromLvc($obj->{'lvc'})
         ,TopLevel::fromGve($obj->{'gve'})
-        ,TopLevel::fromLvc($obj->{'lvc'})
+        ,TopLevel::fromArr($obj->{'arr'})
         ,TopLevel::fromOtherArr($obj->{'otherArr'})
+        ,TopLevel::fromFor($obj->{'for'})
         );
     }
 
@@ -392,11 +392,11 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleArr()
-        ,TopLevel::sampleFor()
+         TopLevel::sampleLvc()
         ,TopLevel::sampleGve()
-        ,TopLevel::sampleLvc()
+        ,TopLevel::sampleArr()
         ,TopLevel::sampleOtherArr()
+        ,TopLevel::sampleFor()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/integer-string.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/integer-string.schema/default/TopLevel.php
index e0e2bb4..6738d79 100644
--- a/base/schema-php/test/inputs/schema/integer-string.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/integer-string.schema/default/TopLevel.php
@@ -4,124 +4,88 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private ?array $arrNullable; // json:arrNullable Optional
-    private ?array $arrOne; // json:arrOne Optional
-    private ?string $nullable; // json:nullable Optional
     private string $one; // json:one Required
     private ?string $optional; // json:optional Optional
+    private ?string $nullable; // json:nullable Optional
+    private ?array $arrOne; // json:arrOne Optional
+    private ?array $arrNullable; // json:arrNullable Optional
     private int|string $unionWithInt; // json:unionWithInt Required
     private int|string $unionWithIntAndEnum; // json:unionWithIntAndEnum Required
 
     /**
-     * @param array|null $arrNullable
-     * @param array|null $arrOne
-     * @param string|null $nullable
      * @param string $one
      * @param string|null $optional
+     * @param string|null $nullable
+     * @param array|null $arrOne
+     * @param array|null $arrNullable
      * @param int|string $unionWithInt
      * @param int|string $unionWithIntAndEnum
      */
-    public function __construct(?array $arrNullable, ?array $arrOne, ?string $nullable, string $one, ?string $optional, int|string $unionWithInt, int|string $unionWithIntAndEnum) {
-        $this->arrNullable = $arrNullable;
-        $this->arrOne = $arrOne;
-        $this->nullable = $nullable;
+    public function __construct(string $one, ?string $optional, ?string $nullable, ?array $arrOne, ?array $arrNullable, int|string $unionWithInt, int|string $unionWithIntAndEnum) {
         $this->one = $one;
         $this->optional = $optional;
+        $this->nullable = $nullable;
+        $this->arrOne = $arrOne;
+        $this->arrNullable = $arrNullable;
         $this->unionWithInt = $unionWithInt;
         $this->unionWithIntAndEnum = $unionWithIntAndEnum;
     }
 
     /**
-     * @param ?array $value
+     * @param string $value
      * @throws Exception
-     * @return ?array
+     * @return string
      */
-    public static function fromArrNullable(?array $value): ?array {
-        if (!is_null($value)) {
-            return  array_map(function ($value) {
-                if (!is_null($value)) {
-                    return $value; /*string*/
-                } else {
-                    return  null;
-                }
-            }, $value);
-        } else {
-            return  null;
-        }
+    public static function fromOne(string $value): string {
+        return $value; /*string*/
     }
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return string
      */
-    public function toArrNullable(): ?array {
-        if (TopLevel::validateArrNullable($this->arrNullable))  {
-            if (!is_null($this->arrNullable)) {
-                return array_map(function ($value) {
-                    if (!is_null($value)) {
-                        return $value; /*string*/
-                    } else {
-                        return  null;
-                    }
-                }, $this->arrNullable);
-            } else {
-                return  null;
-            }
+    public function toOne(): string {
+        if (TopLevel::validateOne($this->one))  {
+            return $this->one; /*string*/
         }
-        throw new Exception('never get to this TopLevel::arrNullable');
+        throw new Exception('never get to this TopLevel::one');
     }
 
     /**
-     * @param array|null
+     * @param string
      * @return bool
      * @throws Exception
      */
-    public static function validateArrNullable(?array $value): bool {
-        if (!is_null($value)) {
-            if (!is_array($value)) {
-                throw new Exception("Attribute Error:TopLevel::arrNullable");
-            }
-            array_walk($value, function($value_v) {
-                if (!is_null($value_v)) {
-                    if (!is_string($value_v)) {
-                        throw new Exception("Attribute Error:TopLevel::arrNullable");
-                    }
-                }
-            });
-        }
+    public static function validateOne(string $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return string
      */
-    public function getArrNullable(): ?array {
-        if (TopLevel::validateArrNullable($this->arrNullable))  {
-            return $this->arrNullable;
+    public function getOne(): string {
+        if (TopLevel::validateOne($this->one))  {
+            return $this->one;
         }
-        throw new Exception('never get to getArrNullable TopLevel::arrNullable');
+        throw new Exception('never get to getOne TopLevel::one');
     }
 
     /**
-     * @return ?array
+     * @return string
      */
-    public static function sampleArrNullable(): ?array {
-        return  array(
-            'TopLevel::::31' /*31:*/
-        ); /* 31:arrNullable*/
+    public static function sampleOne(): string {
+        return 'TopLevel::one::31'; /*31:one*/
     }
 
     /**
-     * @param ?array $value
+     * @param ?string $value
      * @throws Exception
-     * @return ?array
+     * @return ?string
      */
-    public static function fromArrOne(?array $value): ?array {
+    public static function fromOptional(?string $value): ?string {
         if (!is_null($value)) {
-            return  array_map(function ($value) {
-                return $value; /*string*/
-            }, $value);
+            return $value; /*string*/
         } else {
             return  null;
         }
@@ -129,58 +93,46 @@ class TopLevel {
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return ?string
      */
-    public function toArrOne(): ?array {
-        if (TopLevel::validateArrOne($this->arrOne))  {
-            if (!is_null($this->arrOne)) {
-                return array_map(function ($value) {
-                    return $value; /*string*/
-                }, $this->arrOne);
+    public function toOptional(): ?string {
+        if (TopLevel::validateOptional($this->optional))  {
+            if (!is_null($this->optional)) {
+                return $this->optional; /*string*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this TopLevel::arrOne');
+        throw new Exception('never get to this TopLevel::optional');
     }
 
     /**
-     * @param array|null
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateArrOne(?array $value): bool {
+    public static function validateOptional(?string $value): bool {
         if (!is_null($value)) {
-            if (!is_array($value)) {
-                throw new Exception("Attribute Error:TopLevel::arrOne");
-            }
-            array_walk($value, function($value_v) {
-                if (!is_string($value_v)) {
-                    throw new Exception("Attribute Error:TopLevel::arrOne");
-                }
-            });
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return ?string
      */
-    public function getArrOne(): ?array {
-        if (TopLevel::validateArrOne($this->arrOne))  {
-            return $this->arrOne;
+    public function getOptional(): ?string {
+        if (TopLevel::validateOptional($this->optional))  {
+            return $this->optional;
         }
-        throw new Exception('never get to getArrOne TopLevel::arrOne');
+        throw new Exception('never get to getOptional TopLevel::optional');
     }
 
     /**
-     * @return ?array
+     * @return ?string
      */
-    public static function sampleArrOne(): ?array {
-        return  array(
-            'TopLevel::::32' /*32:*/
-        ); /* 32:arrOne*/
+    public static function sampleOptional(): ?string {
+        return 'TopLevel::optional::32'; /*32:optional*/
     }
 
     /**
@@ -241,60 +193,90 @@ class TopLevel {
     }
 
     /**
-     * @param string $value
+     * @param ?array $value
      * @throws Exception
-     * @return string
+     * @return ?array
      */
-    public static function fromOne(string $value): string {
-        return $value; /*string*/
+    public static function fromArrOne(?array $value): ?array {
+        if (!is_null($value)) {
+            return  array_map(function ($value) {
+                return $value; /*string*/
+            }, $value);
+        } else {
+            return  null;
+        }
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?array
      */
-    public function toOne(): string {
-        if (TopLevel::validateOne($this->one))  {
-            return $this->one; /*string*/
+    public function toArrOne(): ?array {
+        if (TopLevel::validateArrOne($this->arrOne))  {
+            if (!is_null($this->arrOne)) {
+                return array_map(function ($value) {
+                    return $value; /*string*/
+                }, $this->arrOne);
+            } else {
+                return  null;
+            }
         }
-        throw new Exception('never get to this TopLevel::one');
+        throw new Exception('never get to this TopLevel::arrOne');
     }
 
     /**
-     * @param string
+     * @param array|null
      * @return bool
      * @throws Exception
      */
-    public static function validateOne(string $value): bool {
+    public static function validateArrOne(?array $value): bool {
+        if (!is_null($value)) {
+            if (!is_array($value)) {
+                throw new Exception("Attribute Error:TopLevel::arrOne");
+            }
+            array_walk($value, function($value_v) {
+                if (!is_string($value_v)) {
+                    throw new Exception("Attribute Error:TopLevel::arrOne");
+                }
+            });
+        }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?array
      */
-    public function getOne(): string {
-        if (TopLevel::validateOne($this->one))  {
-            return $this->one;
+    public function getArrOne(): ?array {
+        if (TopLevel::validateArrOne($this->arrOne))  {
+            return $this->arrOne;
         }
-        throw new Exception('never get to getOne TopLevel::one');
+        throw new Exception('never get to getArrOne TopLevel::arrOne');
     }
 
     /**
-     * @return string
+     * @return ?array
      */
-    public static function sampleOne(): string {
-        return 'TopLevel::one::34'; /*34:one*/
+    public static function sampleArrOne(): ?array {
+        return  array(
+            'TopLevel::::34' /*34:*/
+        ); /* 34:arrOne*/
     }
 
     /**
-     * @param ?string $value
+     * @param ?array $value
      * @throws Exception
-     * @return ?string
+     * @return ?array
      */
-    public static function fromOptional(?string $value): ?string {
+    public static function fromArrNullable(?array $value): ?array {
         if (!is_null($value)) {
-            return $value; /*string*/
+            return  array_map(function ($value) {
+                if (!is_null($value)) {
+                    return $value; /*string*/
+                } else {
+                    return  null;
+                }
+            }, $value);
         } else {
             return  null;
         }
@@ -302,46 +284,64 @@ class TopLevel {
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?array
      */
-    public function toOptional(): ?string {
-        if (TopLevel::validateOptional($this->optional))  {
-            if (!is_null($this->optional)) {
-                return $this->optional; /*string*/
+    public function toArrNullable(): ?array {
+        if (TopLevel::validateArrNullable($this->arrNullable))  {
+            if (!is_null($this->arrNullable)) {
+                return array_map(function ($value) {
+                    if (!is_null($value)) {
+                        return $value; /*string*/
+                    } else {
+                        return  null;
+                    }
+                }, $this->arrNullable);
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this TopLevel::optional');
+        throw new Exception('never get to this TopLevel::arrNullable');
     }
 
     /**
-     * @param string|null
+     * @param array|null
      * @return bool
      * @throws Exception
      */
-    public static function validateOptional(?string $value): bool {
+    public static function validateArrNullable(?array $value): bool {
         if (!is_null($value)) {
+            if (!is_array($value)) {
+                throw new Exception("Attribute Error:TopLevel::arrNullable");
+            }
+            array_walk($value, function($value_v) {
+                if (!is_null($value_v)) {
+                    if (!is_string($value_v)) {
+                        throw new Exception("Attribute Error:TopLevel::arrNullable");
+                    }
+                }
+            });
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?array
      */
-    public function getOptional(): ?string {
-        if (TopLevel::validateOptional($this->optional))  {
-            return $this->optional;
+    public function getArrNullable(): ?array {
+        if (TopLevel::validateArrNullable($this->arrNullable))  {
+            return $this->arrNullable;
         }
-        throw new Exception('never get to getOptional TopLevel::optional');
+        throw new Exception('never get to getArrNullable TopLevel::arrNullable');
     }
 
     /**
-     * @return ?string
+     * @return ?array
      */
-    public static function sampleOptional(): ?string {
-        return 'TopLevel::optional::35'; /*35:optional*/
+    public static function sampleArrNullable(): ?array {
+        return  array(
+            'TopLevel::::35' /*35:*/
+        ); /* 35:arrNullable*/
     }
 
     /**
@@ -489,11 +489,11 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateArrNullable($this->arrNullable)
-        || TopLevel::validateArrOne($this->arrOne)
-        || TopLevel::validateNullable($this->nullable)
-        || TopLevel::validateOne($this->one)
+        return TopLevel::validateOne($this->one)
         || TopLevel::validateOptional($this->optional)
+        || TopLevel::validateNullable($this->nullable)
+        || TopLevel::validateArrOne($this->arrOne)
+        || TopLevel::validateArrNullable($this->arrNullable)
         || TopLevel::validateUnionWithInt($this->unionWithInt)
         || TopLevel::validateUnionWithIntAndEnum($this->unionWithIntAndEnum);
     }
@@ -504,11 +504,11 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'arrNullable'} = $this->toArrNullable();
-        $out->{'arrOne'} = $this->toArrOne();
-        $out->{'nullable'} = $this->toNullable();
         $out->{'one'} = $this->toOne();
         $out->{'optional'} = $this->toOptional();
+        $out->{'nullable'} = $this->toNullable();
+        $out->{'arrOne'} = $this->toArrOne();
+        $out->{'arrNullable'} = $this->toArrNullable();
         $out->{'unionWithInt'} = $this->toUnionWithInt();
         $out->{'unionWithIntAndEnum'} = $this->toUnionWithIntAndEnum();
         return $out;
@@ -521,11 +521,11 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromArrNullable($obj->{'arrNullable'})
-        ,TopLevel::fromArrOne($obj->{'arrOne'})
-        ,TopLevel::fromNullable($obj->{'nullable'})
-        ,TopLevel::fromOne($obj->{'one'})
+         TopLevel::fromOne($obj->{'one'})
         ,TopLevel::fromOptional($obj->{'optional'})
+        ,TopLevel::fromNullable($obj->{'nullable'})
+        ,TopLevel::fromArrOne($obj->{'arrOne'})
+        ,TopLevel::fromArrNullable($obj->{'arrNullable'})
         ,TopLevel::fromUnionWithInt($obj->{'unionWithInt'})
         ,TopLevel::fromUnionWithIntAndEnum($obj->{'unionWithIntAndEnum'})
         );
@@ -536,11 +536,11 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleArrNullable()
-        ,TopLevel::sampleArrOne()
-        ,TopLevel::sampleNullable()
-        ,TopLevel::sampleOne()
+         TopLevel::sampleOne()
         ,TopLevel::sampleOptional()
+        ,TopLevel::sampleNullable()
+        ,TopLevel::sampleArrOne()
+        ,TopLevel::sampleArrNullable()
         ,TopLevel::sampleUnionWithInt()
         ,TopLevel::sampleUnionWithIntAndEnum()
         );
diff --git a/base/schema-php/test/inputs/schema/integer-type.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/integer-type.schema/default/TopLevel.php
index e5e388c..dc17839 100644
--- a/base/schema-php/test/inputs/schema/integer-type.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/integer-type.schema/default/TopLevel.php
@@ -4,37 +4,37 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
+    private int $smallPositive; // json:small_positive Required
+    private int $smallNegative; // json:small_negative Required
+    private int $i32Range; // json:i32_range Required
     private int $aboveI32Max; // json:above_i32_max Required
     private int $belowI32Min; // json:below_i32_min Required
-    private int $i32Range; // json:i32_range Required
-    private int $largeBounds; // json:large_bounds Required
-    private int $onlyMaximum; // json:only_maximum Required
     private int $onlyMinimum; // json:only_minimum Required
-    private int $smallNegative; // json:small_negative Required
-    private int $smallPositive; // json:small_positive Required
+    private int $onlyMaximum; // json:only_maximum Required
     private int $unbounded; // json:unbounded Required
+    private int $largeBounds; // json:large_bounds Required
 
     /**
+     * @param int $smallPositive
+     * @param int $smallNegative
+     * @param int $i32Range
      * @param int $aboveI32Max
      * @param int $belowI32Min
-     * @param int $i32Range
-     * @param int $largeBounds
-     * @param int $onlyMaximum
      * @param int $onlyMinimum
-     * @param int $smallNegative
-     * @param int $smallPositive
+     * @param int $onlyMaximum
      * @param int $unbounded
+     * @param int $largeBounds
      */
-    public function __construct(int $aboveI32Max, int $belowI32Min, int $i32Range, int $largeBounds, int $onlyMaximum, int $onlyMinimum, int $smallNegative, int $smallPositive, int $unbounded) {
+    public function __construct(int $smallPositive, int $smallNegative, int $i32Range, int $aboveI32Max, int $belowI32Min, int $onlyMinimum, int $onlyMaximum, int $unbounded, int $largeBounds) {
+        $this->smallPositive = $smallPositive;
+        $this->smallNegative = $smallNegative;
+        $this->i32Range = $i32Range;
         $this->aboveI32Max = $aboveI32Max;
         $this->belowI32Min = $belowI32Min;
-        $this->i32Range = $i32Range;
-        $this->largeBounds = $largeBounds;
-        $this->onlyMaximum = $onlyMaximum;
         $this->onlyMinimum = $onlyMinimum;
-        $this->smallNegative = $smallNegative;
-        $this->smallPositive = $smallPositive;
+        $this->onlyMaximum = $onlyMaximum;
         $this->unbounded = $unbounded;
+        $this->largeBounds = $largeBounds;
     }
 
     /**
@@ -42,7 +42,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromAboveI32Max(int $value): int {
+    public static function fromSmallPositive(int $value): int {
         return $value; /*int*/
     }
 
@@ -50,11 +50,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toAboveI32Max(): int {
-        if (TopLevel::validateAboveI32Max($this->aboveI32Max))  {
-            return $this->aboveI32Max; /*int*/
+    public function toSmallPositive(): int {
+        if (TopLevel::validateSmallPositive($this->smallPositive))  {
+            return $this->smallPositive; /*int*/
         }
-        throw new Exception('never get to this TopLevel::aboveI32Max');
+        throw new Exception('never get to this TopLevel::smallPositive');
     }
 
     /**
@@ -62,7 +62,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateAboveI32Max(int $value): bool {
+    public static function validateSmallPositive(int $value): bool {
         return true;
     }
 
@@ -70,18 +70,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getAboveI32Max(): int {
-        if (TopLevel::validateAboveI32Max($this->aboveI32Max))  {
-            return $this->aboveI32Max;
+    public function getSmallPositive(): int {
+        if (TopLevel::validateSmallPositive($this->smallPositive))  {
+            return $this->smallPositive;
         }
-        throw new Exception('never get to getAboveI32Max TopLevel::aboveI32Max');
+        throw new Exception('never get to getSmallPositive TopLevel::smallPositive');
     }
 
     /**
      * @return int
      */
-    public static function sampleAboveI32Max(): int {
-        return 31; /*31:aboveI32Max*/
+    public static function sampleSmallPositive(): int {
+        return 31; /*31:smallPositive*/
     }
 
     /**
@@ -89,7 +89,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromBelowI32Min(int $value): int {
+    public static function fromSmallNegative(int $value): int {
         return $value; /*int*/
     }
 
@@ -97,11 +97,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toBelowI32Min(): int {
-        if (TopLevel::validateBelowI32Min($this->belowI32Min))  {
-            return $this->belowI32Min; /*int*/
+    public function toSmallNegative(): int {
+        if (TopLevel::validateSmallNegative($this->smallNegative))  {
+            return $this->smallNegative; /*int*/
         }
-        throw new Exception('never get to this TopLevel::belowI32Min');
+        throw new Exception('never get to this TopLevel::smallNegative');
     }
 
     /**
@@ -109,7 +109,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateBelowI32Min(int $value): bool {
+    public static function validateSmallNegative(int $value): bool {
         return true;
     }
 
@@ -117,18 +117,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getBelowI32Min(): int {
-        if (TopLevel::validateBelowI32Min($this->belowI32Min))  {
-            return $this->belowI32Min;
+    public function getSmallNegative(): int {
+        if (TopLevel::validateSmallNegative($this->smallNegative))  {
+            return $this->smallNegative;
         }
-        throw new Exception('never get to getBelowI32Min TopLevel::belowI32Min');
+        throw new Exception('never get to getSmallNegative TopLevel::smallNegative');
     }
 
     /**
      * @return int
      */
-    public static function sampleBelowI32Min(): int {
-        return 32; /*32:belowI32Min*/
+    public static function sampleSmallNegative(): int {
+        return 32; /*32:smallNegative*/
     }
 
     /**
@@ -183,7 +183,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromLargeBounds(int $value): int {
+    public static function fromAboveI32Max(int $value): int {
         return $value; /*int*/
     }
 
@@ -191,11 +191,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toLargeBounds(): int {
-        if (TopLevel::validateLargeBounds($this->largeBounds))  {
-            return $this->largeBounds; /*int*/
+    public function toAboveI32Max(): int {
+        if (TopLevel::validateAboveI32Max($this->aboveI32Max))  {
+            return $this->aboveI32Max; /*int*/
         }
-        throw new Exception('never get to this TopLevel::largeBounds');
+        throw new Exception('never get to this TopLevel::aboveI32Max');
     }
 
     /**
@@ -203,7 +203,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateLargeBounds(int $value): bool {
+    public static function validateAboveI32Max(int $value): bool {
         return true;
     }
 
@@ -211,18 +211,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getLargeBounds(): int {
-        if (TopLevel::validateLargeBounds($this->largeBounds))  {
-            return $this->largeBounds;
+    public function getAboveI32Max(): int {
+        if (TopLevel::validateAboveI32Max($this->aboveI32Max))  {
+            return $this->aboveI32Max;
         }
-        throw new Exception('never get to getLargeBounds TopLevel::largeBounds');
+        throw new Exception('never get to getAboveI32Max TopLevel::aboveI32Max');
     }
 
     /**
      * @return int
      */
-    public static function sampleLargeBounds(): int {
-        return 34; /*34:largeBounds*/
+    public static function sampleAboveI32Max(): int {
+        return 34; /*34:aboveI32Max*/
     }
 
     /**
@@ -230,7 +230,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromOnlyMaximum(int $value): int {
+    public static function fromBelowI32Min(int $value): int {
         return $value; /*int*/
     }
 
@@ -238,11 +238,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toOnlyMaximum(): int {
-        if (TopLevel::validateOnlyMaximum($this->onlyMaximum))  {
-            return $this->onlyMaximum; /*int*/
+    public function toBelowI32Min(): int {
+        if (TopLevel::validateBelowI32Min($this->belowI32Min))  {
+            return $this->belowI32Min; /*int*/
         }
-        throw new Exception('never get to this TopLevel::onlyMaximum');
+        throw new Exception('never get to this TopLevel::belowI32Min');
     }
 
     /**
@@ -250,7 +250,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateOnlyMaximum(int $value): bool {
+    public static function validateBelowI32Min(int $value): bool {
         return true;
     }
 
@@ -258,18 +258,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getOnlyMaximum(): int {
-        if (TopLevel::validateOnlyMaximum($this->onlyMaximum))  {
-            return $this->onlyMaximum;
+    public function getBelowI32Min(): int {
+        if (TopLevel::validateBelowI32Min($this->belowI32Min))  {
+            return $this->belowI32Min;
         }
-        throw new Exception('never get to getOnlyMaximum TopLevel::onlyMaximum');
+        throw new Exception('never get to getBelowI32Min TopLevel::belowI32Min');
     }
 
     /**
      * @return int
      */
-    public static function sampleOnlyMaximum(): int {
-        return 35; /*35:onlyMaximum*/
+    public static function sampleBelowI32Min(): int {
+        return 35; /*35:belowI32Min*/
     }
 
     /**
@@ -324,7 +324,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromSmallNegative(int $value): int {
+    public static function fromOnlyMaximum(int $value): int {
         return $value; /*int*/
     }
 
@@ -332,11 +332,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toSmallNegative(): int {
-        if (TopLevel::validateSmallNegative($this->smallNegative))  {
-            return $this->smallNegative; /*int*/
+    public function toOnlyMaximum(): int {
+        if (TopLevel::validateOnlyMaximum($this->onlyMaximum))  {
+            return $this->onlyMaximum; /*int*/
         }
-        throw new Exception('never get to this TopLevel::smallNegative');
+        throw new Exception('never get to this TopLevel::onlyMaximum');
     }
 
     /**
@@ -344,7 +344,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateSmallNegative(int $value): bool {
+    public static function validateOnlyMaximum(int $value): bool {
         return true;
     }
 
@@ -352,18 +352,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getSmallNegative(): int {
-        if (TopLevel::validateSmallNegative($this->smallNegative))  {
-            return $this->smallNegative;
+    public function getOnlyMaximum(): int {
+        if (TopLevel::validateOnlyMaximum($this->onlyMaximum))  {
+            return $this->onlyMaximum;
         }
-        throw new Exception('never get to getSmallNegative TopLevel::smallNegative');
+        throw new Exception('never get to getOnlyMaximum TopLevel::onlyMaximum');
     }
 
     /**
      * @return int
      */
-    public static function sampleSmallNegative(): int {
-        return 37; /*37:smallNegative*/
+    public static function sampleOnlyMaximum(): int {
+        return 37; /*37:onlyMaximum*/
     }
 
     /**
@@ -371,7 +371,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromSmallPositive(int $value): int {
+    public static function fromUnbounded(int $value): int {
         return $value; /*int*/
     }
 
@@ -379,11 +379,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toSmallPositive(): int {
-        if (TopLevel::validateSmallPositive($this->smallPositive))  {
-            return $this->smallPositive; /*int*/
+    public function toUnbounded(): int {
+        if (TopLevel::validateUnbounded($this->unbounded))  {
+            return $this->unbounded; /*int*/
         }
-        throw new Exception('never get to this TopLevel::smallPositive');
+        throw new Exception('never get to this TopLevel::unbounded');
     }
 
     /**
@@ -391,7 +391,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateSmallPositive(int $value): bool {
+    public static function validateUnbounded(int $value): bool {
         return true;
     }
 
@@ -399,18 +399,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getSmallPositive(): int {
-        if (TopLevel::validateSmallPositive($this->smallPositive))  {
-            return $this->smallPositive;
+    public function getUnbounded(): int {
+        if (TopLevel::validateUnbounded($this->unbounded))  {
+            return $this->unbounded;
         }
-        throw new Exception('never get to getSmallPositive TopLevel::smallPositive');
+        throw new Exception('never get to getUnbounded TopLevel::unbounded');
     }
 
     /**
      * @return int
      */
-    public static function sampleSmallPositive(): int {
-        return 38; /*38:smallPositive*/
+    public static function sampleUnbounded(): int {
+        return 38; /*38:unbounded*/
     }
 
     /**
@@ -418,7 +418,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromUnbounded(int $value): int {
+    public static function fromLargeBounds(int $value): int {
         return $value; /*int*/
     }
 
@@ -426,11 +426,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toUnbounded(): int {
-        if (TopLevel::validateUnbounded($this->unbounded))  {
-            return $this->unbounded; /*int*/
+    public function toLargeBounds(): int {
+        if (TopLevel::validateLargeBounds($this->largeBounds))  {
+            return $this->largeBounds; /*int*/
         }
-        throw new Exception('never get to this TopLevel::unbounded');
+        throw new Exception('never get to this TopLevel::largeBounds');
     }
 
     /**
@@ -438,7 +438,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateUnbounded(int $value): bool {
+    public static function validateLargeBounds(int $value): bool {
         return true;
     }
 
@@ -446,18 +446,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getUnbounded(): int {
-        if (TopLevel::validateUnbounded($this->unbounded))  {
-            return $this->unbounded;
+    public function getLargeBounds(): int {
+        if (TopLevel::validateLargeBounds($this->largeBounds))  {
+            return $this->largeBounds;
         }
-        throw new Exception('never get to getUnbounded TopLevel::unbounded');
+        throw new Exception('never get to getLargeBounds TopLevel::largeBounds');
     }
 
     /**
      * @return int
      */
-    public static function sampleUnbounded(): int {
-        return 39; /*39:unbounded*/
+    public static function sampleLargeBounds(): int {
+        return 39; /*39:largeBounds*/
     }
 
     /**
@@ -465,15 +465,15 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateAboveI32Max($this->aboveI32Max)
-        || TopLevel::validateBelowI32Min($this->belowI32Min)
+        return TopLevel::validateSmallPositive($this->smallPositive)
+        || TopLevel::validateSmallNegative($this->smallNegative)
         || TopLevel::validateI32Range($this->i32Range)
-        || TopLevel::validateLargeBounds($this->largeBounds)
-        || TopLevel::validateOnlyMaximum($this->onlyMaximum)
+        || TopLevel::validateAboveI32Max($this->aboveI32Max)
+        || TopLevel::validateBelowI32Min($this->belowI32Min)
         || TopLevel::validateOnlyMinimum($this->onlyMinimum)
-        || TopLevel::validateSmallNegative($this->smallNegative)
-        || TopLevel::validateSmallPositive($this->smallPositive)
-        || TopLevel::validateUnbounded($this->unbounded);
+        || TopLevel::validateOnlyMaximum($this->onlyMaximum)
+        || TopLevel::validateUnbounded($this->unbounded)
+        || TopLevel::validateLargeBounds($this->largeBounds);
     }
 
     /**
@@ -482,15 +482,15 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
+        $out->{'small_positive'} = $this->toSmallPositive();
+        $out->{'small_negative'} = $this->toSmallNegative();
+        $out->{'i32_range'} = $this->toI32Range();
         $out->{'above_i32_max'} = $this->toAboveI32Max();
         $out->{'below_i32_min'} = $this->toBelowI32Min();
-        $out->{'i32_range'} = $this->toI32Range();
-        $out->{'large_bounds'} = $this->toLargeBounds();
-        $out->{'only_maximum'} = $this->toOnlyMaximum();
         $out->{'only_minimum'} = $this->toOnlyMinimum();
-        $out->{'small_negative'} = $this->toSmallNegative();
-        $out->{'small_positive'} = $this->toSmallPositive();
+        $out->{'only_maximum'} = $this->toOnlyMaximum();
         $out->{'unbounded'} = $this->toUnbounded();
+        $out->{'large_bounds'} = $this->toLargeBounds();
         return $out;
     }
 
@@ -501,15 +501,15 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromAboveI32Max($obj->{'above_i32_max'})
-        ,TopLevel::fromBelowI32Min($obj->{'below_i32_min'})
+         TopLevel::fromSmallPositive($obj->{'small_positive'})
+        ,TopLevel::fromSmallNegative($obj->{'small_negative'})
         ,TopLevel::fromI32Range($obj->{'i32_range'})
-        ,TopLevel::fromLargeBounds($obj->{'large_bounds'})
-        ,TopLevel::fromOnlyMaximum($obj->{'only_maximum'})
+        ,TopLevel::fromAboveI32Max($obj->{'above_i32_max'})
+        ,TopLevel::fromBelowI32Min($obj->{'below_i32_min'})
         ,TopLevel::fromOnlyMinimum($obj->{'only_minimum'})
-        ,TopLevel::fromSmallNegative($obj->{'small_negative'})
-        ,TopLevel::fromSmallPositive($obj->{'small_positive'})
+        ,TopLevel::fromOnlyMaximum($obj->{'only_maximum'})
         ,TopLevel::fromUnbounded($obj->{'unbounded'})
+        ,TopLevel::fromLargeBounds($obj->{'large_bounds'})
         );
     }
 
@@ -518,15 +518,15 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleAboveI32Max()
-        ,TopLevel::sampleBelowI32Min()
+         TopLevel::sampleSmallPositive()
+        ,TopLevel::sampleSmallNegative()
         ,TopLevel::sampleI32Range()
-        ,TopLevel::sampleLargeBounds()
-        ,TopLevel::sampleOnlyMaximum()
+        ,TopLevel::sampleAboveI32Max()
+        ,TopLevel::sampleBelowI32Min()
         ,TopLevel::sampleOnlyMinimum()
-        ,TopLevel::sampleSmallNegative()
-        ,TopLevel::sampleSmallPositive()
+        ,TopLevel::sampleOnlyMaximum()
         ,TopLevel::sampleUnbounded()
+        ,TopLevel::sampleLargeBounds()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/light.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/light.schema/default/TopLevel.php
index 919115d..1e95fb9 100644
--- a/base/schema-php/test/inputs/schema/light.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/light.schema/default/TopLevel.php
@@ -103,18 +103,18 @@ class TopLevel {
 // This is an autogenerated file:LightParams
 
 class LightParams {
-    private string $appID; // json:app_id Required
     private string $outletID; // json:outlet_id Required
+    private string $appID; // json:app_id Required
     private string $rgba; // json:rgba Required
 
     /**
-     * @param string $appID
      * @param string $outletID
+     * @param string $appID
      * @param string $rgba
      */
-    public function __construct(string $appID, string $outletID, string $rgba) {
-        $this->appID = $appID;
+    public function __construct(string $outletID, string $appID, string $rgba) {
         $this->outletID = $outletID;
+        $this->appID = $appID;
         $this->rgba = $rgba;
     }
 
@@ -123,7 +123,7 @@ class LightParams {
      * @throws Exception
      * @return string
      */
-    public static function fromAppID(string $value): string {
+    public static function fromOutletID(string $value): string {
         return $value; /*string*/
     }
 
@@ -131,11 +131,11 @@ class LightParams {
      * @throws Exception
      * @return string
      */
-    public function toAppID(): string {
-        if (LightParams::validateAppID($this->appID))  {
-            return $this->appID; /*string*/
+    public function toOutletID(): string {
+        if (LightParams::validateOutletID($this->outletID))  {
+            return $this->outletID; /*string*/
         }
-        throw new Exception('never get to this LightParams::appID');
+        throw new Exception('never get to this LightParams::outletID');
     }
 
     /**
@@ -143,7 +143,7 @@ class LightParams {
      * @return bool
      * @throws Exception
      */
-    public static function validateAppID(string $value): bool {
+    public static function validateOutletID(string $value): bool {
         return true;
     }
 
@@ -151,18 +151,18 @@ class LightParams {
      * @throws Exception
      * @return string
      */
-    public function getAppID(): string {
-        if (LightParams::validateAppID($this->appID))  {
-            return $this->appID;
+    public function getOutletID(): string {
+        if (LightParams::validateOutletID($this->outletID))  {
+            return $this->outletID;
         }
-        throw new Exception('never get to getAppID LightParams::appID');
+        throw new Exception('never get to getOutletID LightParams::outletID');
     }
 
     /**
      * @return string
      */
-    public static function sampleAppID(): string {
-        return 'LightParams::appID::31'; /*31:appID*/
+    public static function sampleOutletID(): string {
+        return 'LightParams::outletID::31'; /*31:outletID*/
     }
 
     /**
@@ -170,7 +170,7 @@ class LightParams {
      * @throws Exception
      * @return string
      */
-    public static function fromOutletID(string $value): string {
+    public static function fromAppID(string $value): string {
         return $value; /*string*/
     }
 
@@ -178,11 +178,11 @@ class LightParams {
      * @throws Exception
      * @return string
      */
-    public function toOutletID(): string {
-        if (LightParams::validateOutletID($this->outletID))  {
-            return $this->outletID; /*string*/
+    public function toAppID(): string {
+        if (LightParams::validateAppID($this->appID))  {
+            return $this->appID; /*string*/
         }
-        throw new Exception('never get to this LightParams::outletID');
+        throw new Exception('never get to this LightParams::appID');
     }
 
     /**
@@ -190,7 +190,7 @@ class LightParams {
      * @return bool
      * @throws Exception
      */
-    public static function validateOutletID(string $value): bool {
+    public static function validateAppID(string $value): bool {
         return true;
     }
 
@@ -198,18 +198,18 @@ class LightParams {
      * @throws Exception
      * @return string
      */
-    public function getOutletID(): string {
-        if (LightParams::validateOutletID($this->outletID))  {
-            return $this->outletID;
+    public function getAppID(): string {
+        if (LightParams::validateAppID($this->appID))  {
+            return $this->appID;
         }
-        throw new Exception('never get to getOutletID LightParams::outletID');
+        throw new Exception('never get to getAppID LightParams::appID');
     }
 
     /**
      * @return string
      */
-    public static function sampleOutletID(): string {
-        return 'LightParams::outletID::32'; /*32:outletID*/
+    public static function sampleAppID(): string {
+        return 'LightParams::appID::32'; /*32:appID*/
     }
 
     /**
@@ -264,8 +264,8 @@ class LightParams {
      * @return bool
      */
     public function validate(): bool {
-        return LightParams::validateAppID($this->appID)
-        || LightParams::validateOutletID($this->outletID)
+        return LightParams::validateOutletID($this->outletID)
+        || LightParams::validateAppID($this->appID)
         || LightParams::validateRGBA($this->rgba);
     }
 
@@ -275,8 +275,8 @@ class LightParams {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'app_id'} = $this->toAppID();
         $out->{'outlet_id'} = $this->toOutletID();
+        $out->{'app_id'} = $this->toAppID();
         $out->{'rgba'} = $this->toRGBA();
         return $out;
     }
@@ -288,8 +288,8 @@ class LightParams {
      */
     public static function from(stdClass $obj): LightParams {
         return new LightParams(
-         LightParams::fromAppID($obj->{'app_id'})
-        ,LightParams::fromOutletID($obj->{'outlet_id'})
+         LightParams::fromOutletID($obj->{'outlet_id'})
+        ,LightParams::fromAppID($obj->{'app_id'})
         ,LightParams::fromRGBA($obj->{'rgba'})
         );
     }
@@ -299,8 +299,8 @@ class LightParams {
      */
     public static function sample(): LightParams {
         return new LightParams(
-         LightParams::sampleAppID()
-        ,LightParams::sampleOutletID()
+         LightParams::sampleOutletID()
+        ,LightParams::sampleAppID()
         ,LightParams::sampleRGBA()
         );
     }
diff --git a/base/schema-php/test/inputs/schema/min-max-items.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/min-max-items.schema/default/TopLevel.php
index f2fa85c..8c0dc11 100644
--- a/base/schema-php/test/inputs/schema/min-max-items.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/min-max-items.schema/default/TopLevel.php
@@ -4,23 +4,23 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
+    private array $minOnly; // json:minOnly Required
     private array $maxOnly; // json:maxOnly Required
     private array $minAndMax; // json:minAndMax Required
-    private array $minOnly; // json:minOnly Required
     private array $plain; // json:plain Required
     private array $unionItems; // json:unionItems Required
 
     /**
+     * @param array $minOnly
      * @param array $maxOnly
      * @param array $minAndMax
-     * @param array $minOnly
      * @param array $plain
      * @param array $unionItems
      */
-    public function __construct(array $maxOnly, array $minAndMax, array $minOnly, array $plain, array $unionItems) {
+    public function __construct(array $minOnly, array $maxOnly, array $minAndMax, array $plain, array $unionItems) {
+        $this->minOnly = $minOnly;
         $this->maxOnly = $maxOnly;
         $this->minAndMax = $minAndMax;
-        $this->minOnly = $minOnly;
         $this->plain = $plain;
         $this->unionItems = $unionItems;
     }
@@ -30,9 +30,9 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public static function fromMaxOnly(array $value): array {
+    public static function fromMinOnly(array $value): array {
         return  array_map(function ($value) {
-            return $value; /*int*/
+            return $value; /*string*/
         }, $value);
     }
 
@@ -40,13 +40,13 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function toMaxOnly(): array {
-        if (TopLevel::validateMaxOnly($this->maxOnly))  {
+    public function toMinOnly(): array {
+        if (TopLevel::validateMinOnly($this->minOnly))  {
             return array_map(function ($value) {
-                return $value; /*int*/
-            }, $this->maxOnly);
+                return $value; /*string*/
+            }, $this->minOnly);
         }
-        throw new Exception('never get to this TopLevel::maxOnly');
+        throw new Exception('never get to this TopLevel::minOnly');
     }
 
     /**
@@ -54,13 +54,13 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMaxOnly(array $value): bool {
+    public static function validateMinOnly(array $value): bool {
         if (!is_array($value)) {
-            throw new Exception("Attribute Error:TopLevel::maxOnly");
+            throw new Exception("Attribute Error:TopLevel::minOnly");
         }
         array_walk($value, function($value_v) {
-            if (!is_integer($value_v)) {
-                throw new Exception("Attribute Error:TopLevel::maxOnly");
+            if (!is_string($value_v)) {
+                throw new Exception("Attribute Error:TopLevel::minOnly");
             }
         });
         return true;
@@ -70,20 +70,20 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function getMaxOnly(): array {
-        if (TopLevel::validateMaxOnly($this->maxOnly))  {
-            return $this->maxOnly;
+    public function getMinOnly(): array {
+        if (TopLevel::validateMinOnly($this->minOnly))  {
+            return $this->minOnly;
         }
-        throw new Exception('never get to getMaxOnly TopLevel::maxOnly');
+        throw new Exception('never get to getMinOnly TopLevel::minOnly');
     }
 
     /**
      * @return array
      */
-    public static function sampleMaxOnly(): array {
+    public static function sampleMinOnly(): array {
         return  array(
-            31 /*31:*/
-        ); /* 31:maxOnly*/
+            'TopLevel::::31' /*31:*/
+        ); /* 31:minOnly*/
     }
 
     /**
@@ -91,9 +91,9 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public static function fromMinAndMax(array $value): array {
+    public static function fromMaxOnly(array $value): array {
         return  array_map(function ($value) {
-            return $value; /*float*/
+            return $value; /*int*/
         }, $value);
     }
 
@@ -101,13 +101,13 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function toMinAndMax(): array {
-        if (TopLevel::validateMinAndMax($this->minAndMax))  {
+    public function toMaxOnly(): array {
+        if (TopLevel::validateMaxOnly($this->maxOnly))  {
             return array_map(function ($value) {
-                return $value; /*float*/
-            }, $this->minAndMax);
+                return $value; /*int*/
+            }, $this->maxOnly);
         }
-        throw new Exception('never get to this TopLevel::minAndMax');
+        throw new Exception('never get to this TopLevel::maxOnly');
     }
 
     /**
@@ -115,13 +115,13 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinAndMax(array $value): bool {
+    public static function validateMaxOnly(array $value): bool {
         if (!is_array($value)) {
-            throw new Exception("Attribute Error:TopLevel::minAndMax");
+            throw new Exception("Attribute Error:TopLevel::maxOnly");
         }
         array_walk($value, function($value_v) {
-            if (!is_float($value_v) && !is_int($value_v)) {
-                throw new Exception("Attribute Error:TopLevel::minAndMax");
+            if (!is_integer($value_v)) {
+                throw new Exception("Attribute Error:TopLevel::maxOnly");
             }
         });
         return true;
@@ -131,20 +131,20 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function getMinAndMax(): array {
-        if (TopLevel::validateMinAndMax($this->minAndMax))  {
-            return $this->minAndMax;
+    public function getMaxOnly(): array {
+        if (TopLevel::validateMaxOnly($this->maxOnly))  {
+            return $this->maxOnly;
         }
-        throw new Exception('never get to getMinAndMax TopLevel::minAndMax');
+        throw new Exception('never get to getMaxOnly TopLevel::maxOnly');
     }
 
     /**
      * @return array
      */
-    public static function sampleMinAndMax(): array {
+    public static function sampleMaxOnly(): array {
         return  array(
-            32.032 /*32:*/
-        ); /* 32:minAndMax*/
+            32 /*32:*/
+        ); /* 32:maxOnly*/
     }
 
     /**
@@ -152,9 +152,9 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public static function fromMinOnly(array $value): array {
+    public static function fromMinAndMax(array $value): array {
         return  array_map(function ($value) {
-            return $value; /*string*/
+            return $value; /*float*/
         }, $value);
     }
 
@@ -162,13 +162,13 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function toMinOnly(): array {
-        if (TopLevel::validateMinOnly($this->minOnly))  {
+    public function toMinAndMax(): array {
+        if (TopLevel::validateMinAndMax($this->minAndMax))  {
             return array_map(function ($value) {
-                return $value; /*string*/
-            }, $this->minOnly);
+                return $value; /*float*/
+            }, $this->minAndMax);
         }
-        throw new Exception('never get to this TopLevel::minOnly');
+        throw new Exception('never get to this TopLevel::minAndMax');
     }
 
     /**
@@ -176,13 +176,13 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinOnly(array $value): bool {
+    public static function validateMinAndMax(array $value): bool {
         if (!is_array($value)) {
-            throw new Exception("Attribute Error:TopLevel::minOnly");
+            throw new Exception("Attribute Error:TopLevel::minAndMax");
         }
         array_walk($value, function($value_v) {
-            if (!is_string($value_v)) {
-                throw new Exception("Attribute Error:TopLevel::minOnly");
+            if (!is_float($value_v) && !is_int($value_v)) {
+                throw new Exception("Attribute Error:TopLevel::minAndMax");
             }
         });
         return true;
@@ -192,20 +192,20 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function getMinOnly(): array {
-        if (TopLevel::validateMinOnly($this->minOnly))  {
-            return $this->minOnly;
+    public function getMinAndMax(): array {
+        if (TopLevel::validateMinAndMax($this->minAndMax))  {
+            return $this->minAndMax;
         }
-        throw new Exception('never get to getMinOnly TopLevel::minOnly');
+        throw new Exception('never get to getMinAndMax TopLevel::minAndMax');
     }
 
     /**
      * @return array
      */
-    public static function sampleMinOnly(): array {
+    public static function sampleMinAndMax(): array {
         return  array(
-            'TopLevel::::33' /*33:*/
-        ); /* 33:minOnly*/
+            33.033 /*33:*/
+        ); /* 33:minAndMax*/
     }
 
     /**
@@ -355,9 +355,9 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateMaxOnly($this->maxOnly)
+        return TopLevel::validateMinOnly($this->minOnly)
+        || TopLevel::validateMaxOnly($this->maxOnly)
         || TopLevel::validateMinAndMax($this->minAndMax)
-        || TopLevel::validateMinOnly($this->minOnly)
         || TopLevel::validatePlain($this->plain)
         || TopLevel::validateUnionItems($this->unionItems);
     }
@@ -368,9 +368,9 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
+        $out->{'minOnly'} = $this->toMinOnly();
         $out->{'maxOnly'} = $this->toMaxOnly();
         $out->{'minAndMax'} = $this->toMinAndMax();
-        $out->{'minOnly'} = $this->toMinOnly();
         $out->{'plain'} = $this->toPlain();
         $out->{'unionItems'} = $this->toUnionItems();
         return $out;
@@ -383,9 +383,9 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromMaxOnly($obj->{'maxOnly'})
+         TopLevel::fromMinOnly($obj->{'minOnly'})
+        ,TopLevel::fromMaxOnly($obj->{'maxOnly'})
         ,TopLevel::fromMinAndMax($obj->{'minAndMax'})
-        ,TopLevel::fromMinOnly($obj->{'minOnly'})
         ,TopLevel::fromPlain($obj->{'plain'})
         ,TopLevel::fromUnionItems($obj->{'unionItems'})
         );
@@ -396,9 +396,9 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleMaxOnly()
+         TopLevel::sampleMinOnly()
+        ,TopLevel::sampleMaxOnly()
         ,TopLevel::sampleMinAndMax()
-        ,TopLevel::sampleMinOnly()
         ,TopLevel::samplePlain()
         ,TopLevel::sampleUnionItems()
         );
diff --git a/base/schema-php/test/inputs/schema/minmax-integer.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/minmax-integer.schema/default/TopLevel.php
index 5c6e097..6125673 100644
--- a/base/schema-php/test/inputs/schema/minmax-integer.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/minmax-integer.schema/default/TopLevel.php
@@ -5,33 +5,33 @@ declare(strict_types=1);
 
 class TopLevel {
     private int $free; // json:free Required
-    private int $intersection; // json:intersection Required
-    private int $max; // json:max Required
     private int $min; // json:min Required
+    private int $max; // json:max Required
     private int $minmax; // json:minmax Required
-    private int $minMaxIntersection; // json:minMaxIntersection Required
-    private int $minMaxUnion; // json:minMaxUnion Required
     private int $union; // json:union Required
+    private int $minMaxUnion; // json:minMaxUnion Required
+    private int $intersection; // json:intersection Required
+    private int $minMaxIntersection; // json:minMaxIntersection Required
 
     /**
      * @param int $free
-     * @param int $intersection
-     * @param int $max
      * @param int $min
+     * @param int $max
      * @param int $minmax
-     * @param int $minMaxIntersection
-     * @param int $minMaxUnion
      * @param int $union
+     * @param int $minMaxUnion
+     * @param int $intersection
+     * @param int $minMaxIntersection
      */
-    public function __construct(int $free, int $intersection, int $max, int $min, int $minmax, int $minMaxIntersection, int $minMaxUnion, int $union) {
+    public function __construct(int $free, int $min, int $max, int $minmax, int $union, int $minMaxUnion, int $intersection, int $minMaxIntersection) {
         $this->free = $free;
-        $this->intersection = $intersection;
-        $this->max = $max;
         $this->min = $min;
+        $this->max = $max;
         $this->minmax = $minmax;
-        $this->minMaxIntersection = $minMaxIntersection;
-        $this->minMaxUnion = $minMaxUnion;
         $this->union = $union;
+        $this->minMaxUnion = $minMaxUnion;
+        $this->intersection = $intersection;
+        $this->minMaxIntersection = $minMaxIntersection;
     }
 
     /**
@@ -86,7 +86,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromIntersection(int $value): int {
+    public static function fromMin(int $value): int {
         return $value; /*int*/
     }
 
@@ -94,11 +94,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toIntersection(): int {
-        if (TopLevel::validateIntersection($this->intersection))  {
-            return $this->intersection; /*int*/
+    public function toMin(): int {
+        if (TopLevel::validateMin($this->min))  {
+            return $this->min; /*int*/
         }
-        throw new Exception('never get to this TopLevel::intersection');
+        throw new Exception('never get to this TopLevel::min');
     }
 
     /**
@@ -106,7 +106,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateIntersection(int $value): bool {
+    public static function validateMin(int $value): bool {
         return true;
     }
 
@@ -114,18 +114,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getIntersection(): int {
-        if (TopLevel::validateIntersection($this->intersection))  {
-            return $this->intersection;
+    public function getMin(): int {
+        if (TopLevel::validateMin($this->min))  {
+            return $this->min;
         }
-        throw new Exception('never get to getIntersection TopLevel::intersection');
+        throw new Exception('never get to getMin TopLevel::min');
     }
 
     /**
      * @return int
      */
-    public static function sampleIntersection(): int {
-        return 32; /*32:intersection*/
+    public static function sampleMin(): int {
+        return 32; /*32:min*/
     }
 
     /**
@@ -180,7 +180,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromMin(int $value): int {
+    public static function fromMinmax(int $value): int {
         return $value; /*int*/
     }
 
@@ -188,11 +188,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toMin(): int {
-        if (TopLevel::validateMin($this->min))  {
-            return $this->min; /*int*/
+    public function toMinmax(): int {
+        if (TopLevel::validateMinmax($this->minmax))  {
+            return $this->minmax; /*int*/
         }
-        throw new Exception('never get to this TopLevel::min');
+        throw new Exception('never get to this TopLevel::minmax');
     }
 
     /**
@@ -200,7 +200,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMin(int $value): bool {
+    public static function validateMinmax(int $value): bool {
         return true;
     }
 
@@ -208,18 +208,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getMin(): int {
-        if (TopLevel::validateMin($this->min))  {
-            return $this->min;
+    public function getMinmax(): int {
+        if (TopLevel::validateMinmax($this->minmax))  {
+            return $this->minmax;
         }
-        throw new Exception('never get to getMin TopLevel::min');
+        throw new Exception('never get to getMinmax TopLevel::minmax');
     }
 
     /**
      * @return int
      */
-    public static function sampleMin(): int {
-        return 34; /*34:min*/
+    public static function sampleMinmax(): int {
+        return 34; /*34:minmax*/
     }
 
     /**
@@ -227,7 +227,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromMinmax(int $value): int {
+    public static function fromUnion(int $value): int {
         return $value; /*int*/
     }
 
@@ -235,11 +235,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toMinmax(): int {
-        if (TopLevel::validateMinmax($this->minmax))  {
-            return $this->minmax; /*int*/
+    public function toUnion(): int {
+        if (TopLevel::validateUnion($this->union))  {
+            return $this->union; /*int*/
         }
-        throw new Exception('never get to this TopLevel::minmax');
+        throw new Exception('never get to this TopLevel::union');
     }
 
     /**
@@ -247,7 +247,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinmax(int $value): bool {
+    public static function validateUnion(int $value): bool {
         return true;
     }
 
@@ -255,18 +255,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getMinmax(): int {
-        if (TopLevel::validateMinmax($this->minmax))  {
-            return $this->minmax;
+    public function getUnion(): int {
+        if (TopLevel::validateUnion($this->union))  {
+            return $this->union;
         }
-        throw new Exception('never get to getMinmax TopLevel::minmax');
+        throw new Exception('never get to getUnion TopLevel::union');
     }
 
     /**
      * @return int
      */
-    public static function sampleMinmax(): int {
-        return 35; /*35:minmax*/
+    public static function sampleUnion(): int {
+        return 35; /*35:union*/
     }
 
     /**
@@ -274,7 +274,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromMinMaxIntersection(int $value): int {
+    public static function fromMinMaxUnion(int $value): int {
         return $value; /*int*/
     }
 
@@ -282,11 +282,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toMinMaxIntersection(): int {
-        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
-            return $this->minMaxIntersection; /*int*/
+    public function toMinMaxUnion(): int {
+        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
+            return $this->minMaxUnion; /*int*/
         }
-        throw new Exception('never get to this TopLevel::minMaxIntersection');
+        throw new Exception('never get to this TopLevel::minMaxUnion');
     }
 
     /**
@@ -294,7 +294,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinMaxIntersection(int $value): bool {
+    public static function validateMinMaxUnion(int $value): bool {
         return true;
     }
 
@@ -302,18 +302,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getMinMaxIntersection(): int {
-        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
-            return $this->minMaxIntersection;
+    public function getMinMaxUnion(): int {
+        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
+            return $this->minMaxUnion;
         }
-        throw new Exception('never get to getMinMaxIntersection TopLevel::minMaxIntersection');
+        throw new Exception('never get to getMinMaxUnion TopLevel::minMaxUnion');
     }
 
     /**
      * @return int
      */
-    public static function sampleMinMaxIntersection(): int {
-        return 36; /*36:minMaxIntersection*/
+    public static function sampleMinMaxUnion(): int {
+        return 36; /*36:minMaxUnion*/
     }
 
     /**
@@ -321,7 +321,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromMinMaxUnion(int $value): int {
+    public static function fromIntersection(int $value): int {
         return $value; /*int*/
     }
 
@@ -329,11 +329,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toMinMaxUnion(): int {
-        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
-            return $this->minMaxUnion; /*int*/
+    public function toIntersection(): int {
+        if (TopLevel::validateIntersection($this->intersection))  {
+            return $this->intersection; /*int*/
         }
-        throw new Exception('never get to this TopLevel::minMaxUnion');
+        throw new Exception('never get to this TopLevel::intersection');
     }
 
     /**
@@ -341,7 +341,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinMaxUnion(int $value): bool {
+    public static function validateIntersection(int $value): bool {
         return true;
     }
 
@@ -349,18 +349,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getMinMaxUnion(): int {
-        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
-            return $this->minMaxUnion;
+    public function getIntersection(): int {
+        if (TopLevel::validateIntersection($this->intersection))  {
+            return $this->intersection;
         }
-        throw new Exception('never get to getMinMaxUnion TopLevel::minMaxUnion');
+        throw new Exception('never get to getIntersection TopLevel::intersection');
     }
 
     /**
      * @return int
      */
-    public static function sampleMinMaxUnion(): int {
-        return 37; /*37:minMaxUnion*/
+    public static function sampleIntersection(): int {
+        return 37; /*37:intersection*/
     }
 
     /**
@@ -368,7 +368,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromUnion(int $value): int {
+    public static function fromMinMaxIntersection(int $value): int {
         return $value; /*int*/
     }
 
@@ -376,11 +376,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toUnion(): int {
-        if (TopLevel::validateUnion($this->union))  {
-            return $this->union; /*int*/
+    public function toMinMaxIntersection(): int {
+        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
+            return $this->minMaxIntersection; /*int*/
         }
-        throw new Exception('never get to this TopLevel::union');
+        throw new Exception('never get to this TopLevel::minMaxIntersection');
     }
 
     /**
@@ -388,7 +388,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateUnion(int $value): bool {
+    public static function validateMinMaxIntersection(int $value): bool {
         return true;
     }
 
@@ -396,18 +396,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getUnion(): int {
-        if (TopLevel::validateUnion($this->union))  {
-            return $this->union;
+    public function getMinMaxIntersection(): int {
+        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
+            return $this->minMaxIntersection;
         }
-        throw new Exception('never get to getUnion TopLevel::union');
+        throw new Exception('never get to getMinMaxIntersection TopLevel::minMaxIntersection');
     }
 
     /**
      * @return int
      */
-    public static function sampleUnion(): int {
-        return 38; /*38:union*/
+    public static function sampleMinMaxIntersection(): int {
+        return 38; /*38:minMaxIntersection*/
     }
 
     /**
@@ -416,13 +416,13 @@ class TopLevel {
      */
     public function validate(): bool {
         return TopLevel::validateFree($this->free)
-        || TopLevel::validateIntersection($this->intersection)
-        || TopLevel::validateMax($this->max)
         || TopLevel::validateMin($this->min)
+        || TopLevel::validateMax($this->max)
         || TopLevel::validateMinmax($this->minmax)
-        || TopLevel::validateMinMaxIntersection($this->minMaxIntersection)
+        || TopLevel::validateUnion($this->union)
         || TopLevel::validateMinMaxUnion($this->minMaxUnion)
-        || TopLevel::validateUnion($this->union);
+        || TopLevel::validateIntersection($this->intersection)
+        || TopLevel::validateMinMaxIntersection($this->minMaxIntersection);
     }
 
     /**
@@ -432,13 +432,13 @@ class TopLevel {
     public function to(): stdClass  {
         $out = new stdClass();
         $out->{'free'} = $this->toFree();
-        $out->{'intersection'} = $this->toIntersection();
-        $out->{'max'} = $this->toMax();
         $out->{'min'} = $this->toMin();
+        $out->{'max'} = $this->toMax();
         $out->{'minmax'} = $this->toMinmax();
-        $out->{'minMaxIntersection'} = $this->toMinMaxIntersection();
-        $out->{'minMaxUnion'} = $this->toMinMaxUnion();
         $out->{'union'} = $this->toUnion();
+        $out->{'minMaxUnion'} = $this->toMinMaxUnion();
+        $out->{'intersection'} = $this->toIntersection();
+        $out->{'minMaxIntersection'} = $this->toMinMaxIntersection();
         return $out;
     }
 
@@ -450,13 +450,13 @@ class TopLevel {
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
          TopLevel::fromFree($obj->{'free'})
-        ,TopLevel::fromIntersection($obj->{'intersection'})
-        ,TopLevel::fromMax($obj->{'max'})
         ,TopLevel::fromMin($obj->{'min'})
+        ,TopLevel::fromMax($obj->{'max'})
         ,TopLevel::fromMinmax($obj->{'minmax'})
-        ,TopLevel::fromMinMaxIntersection($obj->{'minMaxIntersection'})
-        ,TopLevel::fromMinMaxUnion($obj->{'minMaxUnion'})
         ,TopLevel::fromUnion($obj->{'union'})
+        ,TopLevel::fromMinMaxUnion($obj->{'minMaxUnion'})
+        ,TopLevel::fromIntersection($obj->{'intersection'})
+        ,TopLevel::fromMinMaxIntersection($obj->{'minMaxIntersection'})
         );
     }
 
@@ -466,13 +466,13 @@ class TopLevel {
     public static function sample(): TopLevel {
         return new TopLevel(
          TopLevel::sampleFree()
-        ,TopLevel::sampleIntersection()
-        ,TopLevel::sampleMax()
         ,TopLevel::sampleMin()
+        ,TopLevel::sampleMax()
         ,TopLevel::sampleMinmax()
-        ,TopLevel::sampleMinMaxIntersection()
-        ,TopLevel::sampleMinMaxUnion()
         ,TopLevel::sampleUnion()
+        ,TopLevel::sampleMinMaxUnion()
+        ,TopLevel::sampleIntersection()
+        ,TopLevel::sampleMinMaxIntersection()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/minmax.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/minmax.schema/default/TopLevel.php
index d867015..ab3df45 100644
--- a/base/schema-php/test/inputs/schema/minmax.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/minmax.schema/default/TopLevel.php
@@ -5,33 +5,33 @@ declare(strict_types=1);
 
 class TopLevel {
     private float $free; // json:free Required
-    private float $intersection; // json:intersection Required
-    private float $max; // json:max Required
     private float $min; // json:min Required
+    private float $max; // json:max Required
     private float $minmax; // json:minmax Required
-    private float $minMaxIntersection; // json:minMaxIntersection Required
-    private float $minMaxUnion; // json:minMaxUnion Required
     private float $union; // json:union Required
+    private float $minMaxUnion; // json:minMaxUnion Required
+    private float $intersection; // json:intersection Required
+    private float $minMaxIntersection; // json:minMaxIntersection Required
 
     /**
      * @param float $free
-     * @param float $intersection
-     * @param float $max
      * @param float $min
+     * @param float $max
      * @param float $minmax
-     * @param float $minMaxIntersection
-     * @param float $minMaxUnion
      * @param float $union
+     * @param float $minMaxUnion
+     * @param float $intersection
+     * @param float $minMaxIntersection
      */
-    public function __construct(float $free, float $intersection, float $max, float $min, float $minmax, float $minMaxIntersection, float $minMaxUnion, float $union) {
+    public function __construct(float $free, float $min, float $max, float $minmax, float $union, float $minMaxUnion, float $intersection, float $minMaxIntersection) {
         $this->free = $free;
-        $this->intersection = $intersection;
-        $this->max = $max;
         $this->min = $min;
+        $this->max = $max;
         $this->minmax = $minmax;
-        $this->minMaxIntersection = $minMaxIntersection;
-        $this->minMaxUnion = $minMaxUnion;
         $this->union = $union;
+        $this->minMaxUnion = $minMaxUnion;
+        $this->intersection = $intersection;
+        $this->minMaxIntersection = $minMaxIntersection;
     }
 
     /**
@@ -86,7 +86,7 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public static function fromIntersection(float $value): float {
+    public static function fromMin(float $value): float {
         return $value; /*float*/
     }
 
@@ -94,11 +94,11 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function toIntersection(): float {
-        if (TopLevel::validateIntersection($this->intersection))  {
-            return $this->intersection; /*float*/
+    public function toMin(): float {
+        if (TopLevel::validateMin($this->min))  {
+            return $this->min; /*float*/
         }
-        throw new Exception('never get to this TopLevel::intersection');
+        throw new Exception('never get to this TopLevel::min');
     }
 
     /**
@@ -106,7 +106,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateIntersection(float $value): bool {
+    public static function validateMin(float $value): bool {
         return true;
     }
 
@@ -114,18 +114,18 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function getIntersection(): float {
-        if (TopLevel::validateIntersection($this->intersection))  {
-            return $this->intersection;
+    public function getMin(): float {
+        if (TopLevel::validateMin($this->min))  {
+            return $this->min;
         }
-        throw new Exception('never get to getIntersection TopLevel::intersection');
+        throw new Exception('never get to getMin TopLevel::min');
     }
 
     /**
      * @return float
      */
-    public static function sampleIntersection(): float {
-        return 32.032; /*32:intersection*/
+    public static function sampleMin(): float {
+        return 32.032; /*32:min*/
     }
 
     /**
@@ -180,7 +180,7 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public static function fromMin(float $value): float {
+    public static function fromMinmax(float $value): float {
         return $value; /*float*/
     }
 
@@ -188,11 +188,11 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function toMin(): float {
-        if (TopLevel::validateMin($this->min))  {
-            return $this->min; /*float*/
+    public function toMinmax(): float {
+        if (TopLevel::validateMinmax($this->minmax))  {
+            return $this->minmax; /*float*/
         }
-        throw new Exception('never get to this TopLevel::min');
+        throw new Exception('never get to this TopLevel::minmax');
     }
 
     /**
@@ -200,7 +200,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMin(float $value): bool {
+    public static function validateMinmax(float $value): bool {
         return true;
     }
 
@@ -208,18 +208,18 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function getMin(): float {
-        if (TopLevel::validateMin($this->min))  {
-            return $this->min;
+    public function getMinmax(): float {
+        if (TopLevel::validateMinmax($this->minmax))  {
+            return $this->minmax;
         }
-        throw new Exception('never get to getMin TopLevel::min');
+        throw new Exception('never get to getMinmax TopLevel::minmax');
     }
 
     /**
      * @return float
      */
-    public static function sampleMin(): float {
-        return 34.034; /*34:min*/
+    public static function sampleMinmax(): float {
+        return 34.034; /*34:minmax*/
     }
 
     /**
@@ -227,7 +227,7 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public static function fromMinmax(float $value): float {
+    public static function fromUnion(float $value): float {
         return $value; /*float*/
     }
 
@@ -235,11 +235,11 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function toMinmax(): float {
-        if (TopLevel::validateMinmax($this->minmax))  {
-            return $this->minmax; /*float*/
+    public function toUnion(): float {
+        if (TopLevel::validateUnion($this->union))  {
+            return $this->union; /*float*/
         }
-        throw new Exception('never get to this TopLevel::minmax');
+        throw new Exception('never get to this TopLevel::union');
     }
 
     /**
@@ -247,7 +247,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinmax(float $value): bool {
+    public static function validateUnion(float $value): bool {
         return true;
     }
 
@@ -255,18 +255,18 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function getMinmax(): float {
-        if (TopLevel::validateMinmax($this->minmax))  {
-            return $this->minmax;
+    public function getUnion(): float {
+        if (TopLevel::validateUnion($this->union))  {
+            return $this->union;
         }
-        throw new Exception('never get to getMinmax TopLevel::minmax');
+        throw new Exception('never get to getUnion TopLevel::union');
     }
 
     /**
      * @return float
      */
-    public static function sampleMinmax(): float {
-        return 35.035; /*35:minmax*/
+    public static function sampleUnion(): float {
+        return 35.035; /*35:union*/
     }
 
     /**
@@ -274,7 +274,7 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public static function fromMinMaxIntersection(float $value): float {
+    public static function fromMinMaxUnion(float $value): float {
         return $value; /*float*/
     }
 
@@ -282,11 +282,11 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function toMinMaxIntersection(): float {
-        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
-            return $this->minMaxIntersection; /*float*/
+    public function toMinMaxUnion(): float {
+        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
+            return $this->minMaxUnion; /*float*/
         }
-        throw new Exception('never get to this TopLevel::minMaxIntersection');
+        throw new Exception('never get to this TopLevel::minMaxUnion');
     }
 
     /**
@@ -294,7 +294,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinMaxIntersection(float $value): bool {
+    public static function validateMinMaxUnion(float $value): bool {
         return true;
     }
 
@@ -302,18 +302,18 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function getMinMaxIntersection(): float {
-        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
-            return $this->minMaxIntersection;
+    public function getMinMaxUnion(): float {
+        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
+            return $this->minMaxUnion;
         }
-        throw new Exception('never get to getMinMaxIntersection TopLevel::minMaxIntersection');
+        throw new Exception('never get to getMinMaxUnion TopLevel::minMaxUnion');
     }
 
     /**
      * @return float
      */
-    public static function sampleMinMaxIntersection(): float {
-        return 36.036; /*36:minMaxIntersection*/
+    public static function sampleMinMaxUnion(): float {
+        return 36.036; /*36:minMaxUnion*/
     }
 
     /**
@@ -321,7 +321,7 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public static function fromMinMaxUnion(float $value): float {
+    public static function fromIntersection(float $value): float {
         return $value; /*float*/
     }
 
@@ -329,11 +329,11 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function toMinMaxUnion(): float {
-        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
-            return $this->minMaxUnion; /*float*/
+    public function toIntersection(): float {
+        if (TopLevel::validateIntersection($this->intersection))  {
+            return $this->intersection; /*float*/
         }
-        throw new Exception('never get to this TopLevel::minMaxUnion');
+        throw new Exception('never get to this TopLevel::intersection');
     }
 
     /**
@@ -341,7 +341,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinMaxUnion(float $value): bool {
+    public static function validateIntersection(float $value): bool {
         return true;
     }
 
@@ -349,18 +349,18 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function getMinMaxUnion(): float {
-        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
-            return $this->minMaxUnion;
+    public function getIntersection(): float {
+        if (TopLevel::validateIntersection($this->intersection))  {
+            return $this->intersection;
         }
-        throw new Exception('never get to getMinMaxUnion TopLevel::minMaxUnion');
+        throw new Exception('never get to getIntersection TopLevel::intersection');
     }
 
     /**
      * @return float
      */
-    public static function sampleMinMaxUnion(): float {
-        return 37.037; /*37:minMaxUnion*/
+    public static function sampleIntersection(): float {
+        return 37.037; /*37:intersection*/
     }
 
     /**
@@ -368,7 +368,7 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public static function fromUnion(float $value): float {
+    public static function fromMinMaxIntersection(float $value): float {
         return $value; /*float*/
     }
 
@@ -376,11 +376,11 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function toUnion(): float {
-        if (TopLevel::validateUnion($this->union))  {
-            return $this->union; /*float*/
+    public function toMinMaxIntersection(): float {
+        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
+            return $this->minMaxIntersection; /*float*/
         }
-        throw new Exception('never get to this TopLevel::union');
+        throw new Exception('never get to this TopLevel::minMaxIntersection');
     }
 
     /**
@@ -388,7 +388,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateUnion(float $value): bool {
+    public static function validateMinMaxIntersection(float $value): bool {
         return true;
     }
 
@@ -396,18 +396,18 @@ class TopLevel {
      * @throws Exception
      * @return float
      */
-    public function getUnion(): float {
-        if (TopLevel::validateUnion($this->union))  {
-            return $this->union;
+    public function getMinMaxIntersection(): float {
+        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
+            return $this->minMaxIntersection;
         }
-        throw new Exception('never get to getUnion TopLevel::union');
+        throw new Exception('never get to getMinMaxIntersection TopLevel::minMaxIntersection');
     }
 
     /**
      * @return float
      */
-    public static function sampleUnion(): float {
-        return 38.038; /*38:union*/
+    public static function sampleMinMaxIntersection(): float {
+        return 38.038; /*38:minMaxIntersection*/
     }
 
     /**
@@ -416,13 +416,13 @@ class TopLevel {
      */
     public function validate(): bool {
         return TopLevel::validateFree($this->free)
-        || TopLevel::validateIntersection($this->intersection)
-        || TopLevel::validateMax($this->max)
         || TopLevel::validateMin($this->min)
+        || TopLevel::validateMax($this->max)
         || TopLevel::validateMinmax($this->minmax)
-        || TopLevel::validateMinMaxIntersection($this->minMaxIntersection)
+        || TopLevel::validateUnion($this->union)
         || TopLevel::validateMinMaxUnion($this->minMaxUnion)
-        || TopLevel::validateUnion($this->union);
+        || TopLevel::validateIntersection($this->intersection)
+        || TopLevel::validateMinMaxIntersection($this->minMaxIntersection);
     }
 
     /**
@@ -432,13 +432,13 @@ class TopLevel {
     public function to(): stdClass  {
         $out = new stdClass();
         $out->{'free'} = $this->toFree();
-        $out->{'intersection'} = $this->toIntersection();
-        $out->{'max'} = $this->toMax();
         $out->{'min'} = $this->toMin();
+        $out->{'max'} = $this->toMax();
         $out->{'minmax'} = $this->toMinmax();
-        $out->{'minMaxIntersection'} = $this->toMinMaxIntersection();
-        $out->{'minMaxUnion'} = $this->toMinMaxUnion();
         $out->{'union'} = $this->toUnion();
+        $out->{'minMaxUnion'} = $this->toMinMaxUnion();
+        $out->{'intersection'} = $this->toIntersection();
+        $out->{'minMaxIntersection'} = $this->toMinMaxIntersection();
         return $out;
     }
 
@@ -450,13 +450,13 @@ class TopLevel {
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
          TopLevel::fromFree($obj->{'free'})
-        ,TopLevel::fromIntersection($obj->{'intersection'})
-        ,TopLevel::fromMax($obj->{'max'})
         ,TopLevel::fromMin($obj->{'min'})
+        ,TopLevel::fromMax($obj->{'max'})
         ,TopLevel::fromMinmax($obj->{'minmax'})
-        ,TopLevel::fromMinMaxIntersection($obj->{'minMaxIntersection'})
-        ,TopLevel::fromMinMaxUnion($obj->{'minMaxUnion'})
         ,TopLevel::fromUnion($obj->{'union'})
+        ,TopLevel::fromMinMaxUnion($obj->{'minMaxUnion'})
+        ,TopLevel::fromIntersection($obj->{'intersection'})
+        ,TopLevel::fromMinMaxIntersection($obj->{'minMaxIntersection'})
         );
     }
 
@@ -466,13 +466,13 @@ class TopLevel {
     public static function sample(): TopLevel {
         return new TopLevel(
          TopLevel::sampleFree()
-        ,TopLevel::sampleIntersection()
-        ,TopLevel::sampleMax()
         ,TopLevel::sampleMin()
+        ,TopLevel::sampleMax()
         ,TopLevel::sampleMinmax()
-        ,TopLevel::sampleMinMaxIntersection()
-        ,TopLevel::sampleMinMaxUnion()
         ,TopLevel::sampleUnion()
+        ,TopLevel::sampleMinMaxUnion()
+        ,TopLevel::sampleIntersection()
+        ,TopLevel::sampleMinMaxIntersection()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/minmaxlength.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/minmaxlength.schema/default/TopLevel.php
index a20e0ae..db545fc 100644
--- a/base/schema-php/test/inputs/schema/minmaxlength.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/minmaxlength.schema/default/TopLevel.php
@@ -4,34 +4,34 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private string $intersection; // json:intersection Required
-    private float|string $inUnion; // json:inUnion Required
-    private string $maxlength; // json:maxlength Required
     private string $minlength; // json:minlength Required
-    private string $minMaxIntersection; // json:minMaxIntersection Required
+    private string $maxlength; // json:maxlength Required
     private string $minmaxlength; // json:minmaxlength Required
-    private string $minMaxUnion; // json:minMaxUnion Required
     private string $union; // json:union Required
+    private float|string $inUnion; // json:inUnion Required
+    private string $minMaxUnion; // json:minMaxUnion Required
+    private string $intersection; // json:intersection Required
+    private string $minMaxIntersection; // json:minMaxIntersection Required
 
     /**
-     * @param string $intersection
-     * @param float|string $inUnion
-     * @param string $maxlength
      * @param string $minlength
-     * @param string $minMaxIntersection
+     * @param string $maxlength
      * @param string $minmaxlength
-     * @param string $minMaxUnion
      * @param string $union
+     * @param float|string $inUnion
+     * @param string $minMaxUnion
+     * @param string $intersection
+     * @param string $minMaxIntersection
      */
-    public function __construct(string $intersection, float|string $inUnion, string $maxlength, string $minlength, string $minMaxIntersection, string $minmaxlength, string $minMaxUnion, string $union) {
-        $this->intersection = $intersection;
-        $this->inUnion = $inUnion;
-        $this->maxlength = $maxlength;
+    public function __construct(string $minlength, string $maxlength, string $minmaxlength, string $union, float|string $inUnion, string $minMaxUnion, string $intersection, string $minMaxIntersection) {
         $this->minlength = $minlength;
-        $this->minMaxIntersection = $minMaxIntersection;
+        $this->maxlength = $maxlength;
         $this->minmaxlength = $minmaxlength;
-        $this->minMaxUnion = $minMaxUnion;
         $this->union = $union;
+        $this->inUnion = $inUnion;
+        $this->minMaxUnion = $minMaxUnion;
+        $this->intersection = $intersection;
+        $this->minMaxIntersection = $minMaxIntersection;
     }
 
     /**
@@ -39,7 +39,7 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public static function fromIntersection(string $value): string {
+    public static function fromMinlength(string $value): string {
         return $value; /*string*/
     }
 
@@ -47,11 +47,11 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function toIntersection(): string {
-        if (TopLevel::validateIntersection($this->intersection))  {
-            return $this->intersection; /*string*/
+    public function toMinlength(): string {
+        if (TopLevel::validateMinlength($this->minlength))  {
+            return $this->minlength; /*string*/
         }
-        throw new Exception('never get to this TopLevel::intersection');
+        throw new Exception('never get to this TopLevel::minlength');
     }
 
     /**
@@ -59,7 +59,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateIntersection(string $value): bool {
+    public static function validateMinlength(string $value): bool {
         return true;
     }
 
@@ -67,88 +67,65 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function getIntersection(): string {
-        if (TopLevel::validateIntersection($this->intersection))  {
-            return $this->intersection;
+    public function getMinlength(): string {
+        if (TopLevel::validateMinlength($this->minlength))  {
+            return $this->minlength;
         }
-        throw new Exception('never get to getIntersection TopLevel::intersection');
+        throw new Exception('never get to getMinlength TopLevel::minlength');
     }
 
     /**
      * @return string
      */
-    public static function sampleIntersection(): string {
-        return 'TopLevel::intersection::31'; /*31:intersection*/
+    public static function sampleMinlength(): string {
+        return 'TopLevel::minlength::31'; /*31:minlength*/
     }
 
     /**
-     * @param float|string $value
+     * @param string $value
      * @throws Exception
-     * @return float|string
+     * @return string
      */
-    public static function fromInUnion(float|string $value): float|string {
-        if (is_float($value) || is_int($value)) {
-            return $value; /*float*/
-        } elseif (is_string($value)) {
-            return $value; /*string*/
-        } else {
-            throw new Exception('Cannot deserialize union value in TopLevel');
-        }
+    public static function fromMaxlength(string $value): string {
+        return $value; /*string*/
     }
 
     /**
      * @throws Exception
-     * @return float|string
+     * @return string
      */
-    public function toInUnion(): float|string {
-        if (TopLevel::validateInUnion($this->inUnion))  {
-            if (is_float($this->inUnion) || is_int($this->inUnion)) {
-                return $this->inUnion; /*float*/
-            } elseif (is_string($this->inUnion)) {
-                return $this->inUnion; /*string*/
-            } else {
-                throw new Exception('Union value has no matching member in TopLevel');
-            }
+    public function toMaxlength(): string {
+        if (TopLevel::validateMaxlength($this->maxlength))  {
+            return $this->maxlength; /*string*/
         }
-        throw new Exception('never get to this TopLevel::inUnion');
+        throw new Exception('never get to this TopLevel::maxlength');
     }
 
     /**
-     * @param float|string
+     * @param string
      * @return bool
      * @throws Exception
      */
-    public static function validateInUnion(float|string $value): bool {
-        if (is_float($value) || is_int($value)) {
-            if (!is_float($value) && !is_int($value)) {
-                throw new Exception("Attribute Error:TopLevel::inUnion");
-            }
-        } elseif (is_string($value)) {
-            if (!is_string($value)) {
-                throw new Exception("Attribute Error:TopLevel::inUnion");
-            }
-        } else {
-            throw new Exception("Attribute Error:TopLevel::inUnion");
-        }
+    public static function validateMaxlength(string $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return float|string
+     * @return string
      */
-    public function getInUnion(): float|string {
-        if (TopLevel::validateInUnion($this->inUnion))  {
-            return $this->inUnion;
+    public function getMaxlength(): string {
+        if (TopLevel::validateMaxlength($this->maxlength))  {
+            return $this->maxlength;
         }
-        throw new Exception('never get to getInUnion TopLevel::inUnion');
+        throw new Exception('never get to getMaxlength TopLevel::maxlength');
     }
 
     /**
-     * @return float|string
+     * @return string
      */
-    public static function sampleInUnion(): float|string {
-        return 32.032; /*32:inUnion*/
+    public static function sampleMaxlength(): string {
+        return 'TopLevel::maxlength::32'; /*32:maxlength*/
     }
 
     /**
@@ -156,7 +133,7 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public static function fromMaxlength(string $value): string {
+    public static function fromMinmaxlength(string $value): string {
         return $value; /*string*/
     }
 
@@ -164,11 +141,11 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function toMaxlength(): string {
-        if (TopLevel::validateMaxlength($this->maxlength))  {
-            return $this->maxlength; /*string*/
+    public function toMinmaxlength(): string {
+        if (TopLevel::validateMinmaxlength($this->minmaxlength))  {
+            return $this->minmaxlength; /*string*/
         }
-        throw new Exception('never get to this TopLevel::maxlength');
+        throw new Exception('never get to this TopLevel::minmaxlength');
     }
 
     /**
@@ -176,7 +153,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMaxlength(string $value): bool {
+    public static function validateMinmaxlength(string $value): bool {
         return true;
     }
 
@@ -184,18 +161,18 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function getMaxlength(): string {
-        if (TopLevel::validateMaxlength($this->maxlength))  {
-            return $this->maxlength;
+    public function getMinmaxlength(): string {
+        if (TopLevel::validateMinmaxlength($this->minmaxlength))  {
+            return $this->minmaxlength;
         }
-        throw new Exception('never get to getMaxlength TopLevel::maxlength');
+        throw new Exception('never get to getMinmaxlength TopLevel::minmaxlength');
     }
 
     /**
      * @return string
      */
-    public static function sampleMaxlength(): string {
-        return 'TopLevel::maxlength::33'; /*33:maxlength*/
+    public static function sampleMinmaxlength(): string {
+        return 'TopLevel::minmaxlength::33'; /*33:minmaxlength*/
     }
 
     /**
@@ -203,7 +180,7 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public static function fromMinlength(string $value): string {
+    public static function fromUnion(string $value): string {
         return $value; /*string*/
     }
 
@@ -211,11 +188,11 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function toMinlength(): string {
-        if (TopLevel::validateMinlength($this->minlength))  {
-            return $this->minlength; /*string*/
+    public function toUnion(): string {
+        if (TopLevel::validateUnion($this->union))  {
+            return $this->union; /*string*/
         }
-        throw new Exception('never get to this TopLevel::minlength');
+        throw new Exception('never get to this TopLevel::union');
     }
 
     /**
@@ -223,7 +200,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinlength(string $value): bool {
+    public static function validateUnion(string $value): bool {
         return true;
     }
 
@@ -231,65 +208,88 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function getMinlength(): string {
-        if (TopLevel::validateMinlength($this->minlength))  {
-            return $this->minlength;
+    public function getUnion(): string {
+        if (TopLevel::validateUnion($this->union))  {
+            return $this->union;
         }
-        throw new Exception('never get to getMinlength TopLevel::minlength');
+        throw new Exception('never get to getUnion TopLevel::union');
     }
 
     /**
      * @return string
      */
-    public static function sampleMinlength(): string {
-        return 'TopLevel::minlength::34'; /*34:minlength*/
+    public static function sampleUnion(): string {
+        return 'TopLevel::union::34'; /*34:union*/
     }
 
     /**
-     * @param string $value
+     * @param float|string $value
      * @throws Exception
-     * @return string
+     * @return float|string
      */
-    public static function fromMinMaxIntersection(string $value): string {
-        return $value; /*string*/
+    public static function fromInUnion(float|string $value): float|string {
+        if (is_float($value) || is_int($value)) {
+            return $value; /*float*/
+        } elseif (is_string($value)) {
+            return $value; /*string*/
+        } else {
+            throw new Exception('Cannot deserialize union value in TopLevel');
+        }
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return float|string
      */
-    public function toMinMaxIntersection(): string {
-        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
-            return $this->minMaxIntersection; /*string*/
+    public function toInUnion(): float|string {
+        if (TopLevel::validateInUnion($this->inUnion))  {
+            if (is_float($this->inUnion) || is_int($this->inUnion)) {
+                return $this->inUnion; /*float*/
+            } elseif (is_string($this->inUnion)) {
+                return $this->inUnion; /*string*/
+            } else {
+                throw new Exception('Union value has no matching member in TopLevel');
+            }
         }
-        throw new Exception('never get to this TopLevel::minMaxIntersection');
+        throw new Exception('never get to this TopLevel::inUnion');
     }
 
     /**
-     * @param string
+     * @param float|string
      * @return bool
      * @throws Exception
      */
-    public static function validateMinMaxIntersection(string $value): bool {
+    public static function validateInUnion(float|string $value): bool {
+        if (is_float($value) || is_int($value)) {
+            if (!is_float($value) && !is_int($value)) {
+                throw new Exception("Attribute Error:TopLevel::inUnion");
+            }
+        } elseif (is_string($value)) {
+            if (!is_string($value)) {
+                throw new Exception("Attribute Error:TopLevel::inUnion");
+            }
+        } else {
+            throw new Exception("Attribute Error:TopLevel::inUnion");
+        }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return float|string
      */
-    public function getMinMaxIntersection(): string {
-        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
-            return $this->minMaxIntersection;
+    public function getInUnion(): float|string {
+        if (TopLevel::validateInUnion($this->inUnion))  {
+            return $this->inUnion;
         }
-        throw new Exception('never get to getMinMaxIntersection TopLevel::minMaxIntersection');
+        throw new Exception('never get to getInUnion TopLevel::inUnion');
     }
 
     /**
-     * @return string
+     * @return float|string
      */
-    public static function sampleMinMaxIntersection(): string {
-        return 'TopLevel::minMaxIntersection::35'; /*35:minMaxIntersection*/
+    public static function sampleInUnion(): float|string {
+        return 35.035; /*35:inUnion*/
     }
 
     /**
@@ -297,7 +297,7 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public static function fromMinmaxlength(string $value): string {
+    public static function fromMinMaxUnion(string $value): string {
         return $value; /*string*/
     }
 
@@ -305,11 +305,11 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function toMinmaxlength(): string {
-        if (TopLevel::validateMinmaxlength($this->minmaxlength))  {
-            return $this->minmaxlength; /*string*/
+    public function toMinMaxUnion(): string {
+        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
+            return $this->minMaxUnion; /*string*/
         }
-        throw new Exception('never get to this TopLevel::minmaxlength');
+        throw new Exception('never get to this TopLevel::minMaxUnion');
     }
 
     /**
@@ -317,7 +317,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinmaxlength(string $value): bool {
+    public static function validateMinMaxUnion(string $value): bool {
         return true;
     }
 
@@ -325,18 +325,18 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function getMinmaxlength(): string {
-        if (TopLevel::validateMinmaxlength($this->minmaxlength))  {
-            return $this->minmaxlength;
+    public function getMinMaxUnion(): string {
+        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
+            return $this->minMaxUnion;
         }
-        throw new Exception('never get to getMinmaxlength TopLevel::minmaxlength');
+        throw new Exception('never get to getMinMaxUnion TopLevel::minMaxUnion');
     }
 
     /**
      * @return string
      */
-    public static function sampleMinmaxlength(): string {
-        return 'TopLevel::minmaxlength::36'; /*36:minmaxlength*/
+    public static function sampleMinMaxUnion(): string {
+        return 'TopLevel::minMaxUnion::36'; /*36:minMaxUnion*/
     }
 
     /**
@@ -344,7 +344,7 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public static function fromMinMaxUnion(string $value): string {
+    public static function fromIntersection(string $value): string {
         return $value; /*string*/
     }
 
@@ -352,11 +352,11 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function toMinMaxUnion(): string {
-        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
-            return $this->minMaxUnion; /*string*/
+    public function toIntersection(): string {
+        if (TopLevel::validateIntersection($this->intersection))  {
+            return $this->intersection; /*string*/
         }
-        throw new Exception('never get to this TopLevel::minMaxUnion');
+        throw new Exception('never get to this TopLevel::intersection');
     }
 
     /**
@@ -364,7 +364,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinMaxUnion(string $value): bool {
+    public static function validateIntersection(string $value): bool {
         return true;
     }
 
@@ -372,18 +372,18 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function getMinMaxUnion(): string {
-        if (TopLevel::validateMinMaxUnion($this->minMaxUnion))  {
-            return $this->minMaxUnion;
+    public function getIntersection(): string {
+        if (TopLevel::validateIntersection($this->intersection))  {
+            return $this->intersection;
         }
-        throw new Exception('never get to getMinMaxUnion TopLevel::minMaxUnion');
+        throw new Exception('never get to getIntersection TopLevel::intersection');
     }
 
     /**
      * @return string
      */
-    public static function sampleMinMaxUnion(): string {
-        return 'TopLevel::minMaxUnion::37'; /*37:minMaxUnion*/
+    public static function sampleIntersection(): string {
+        return 'TopLevel::intersection::37'; /*37:intersection*/
     }
 
     /**
@@ -391,7 +391,7 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public static function fromUnion(string $value): string {
+    public static function fromMinMaxIntersection(string $value): string {
         return $value; /*string*/
     }
 
@@ -399,11 +399,11 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function toUnion(): string {
-        if (TopLevel::validateUnion($this->union))  {
-            return $this->union; /*string*/
+    public function toMinMaxIntersection(): string {
+        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
+            return $this->minMaxIntersection; /*string*/
         }
-        throw new Exception('never get to this TopLevel::union');
+        throw new Exception('never get to this TopLevel::minMaxIntersection');
     }
 
     /**
@@ -411,7 +411,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateUnion(string $value): bool {
+    public static function validateMinMaxIntersection(string $value): bool {
         return true;
     }
 
@@ -419,18 +419,18 @@ class TopLevel {
      * @throws Exception
      * @return string
      */
-    public function getUnion(): string {
-        if (TopLevel::validateUnion($this->union))  {
-            return $this->union;
+    public function getMinMaxIntersection(): string {
+        if (TopLevel::validateMinMaxIntersection($this->minMaxIntersection))  {
+            return $this->minMaxIntersection;
         }
-        throw new Exception('never get to getUnion TopLevel::union');
+        throw new Exception('never get to getMinMaxIntersection TopLevel::minMaxIntersection');
     }
 
     /**
      * @return string
      */
-    public static function sampleUnion(): string {
-        return 'TopLevel::union::38'; /*38:union*/
+    public static function sampleMinMaxIntersection(): string {
+        return 'TopLevel::minMaxIntersection::38'; /*38:minMaxIntersection*/
     }
 
     /**
@@ -438,14 +438,14 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateIntersection($this->intersection)
-        || TopLevel::validateInUnion($this->inUnion)
+        return TopLevel::validateMinlength($this->minlength)
         || TopLevel::validateMaxlength($this->maxlength)
-        || TopLevel::validateMinlength($this->minlength)
-        || TopLevel::validateMinMaxIntersection($this->minMaxIntersection)
         || TopLevel::validateMinmaxlength($this->minmaxlength)
+        || TopLevel::validateUnion($this->union)
+        || TopLevel::validateInUnion($this->inUnion)
         || TopLevel::validateMinMaxUnion($this->minMaxUnion)
-        || TopLevel::validateUnion($this->union);
+        || TopLevel::validateIntersection($this->intersection)
+        || TopLevel::validateMinMaxIntersection($this->minMaxIntersection);
     }
 
     /**
@@ -454,14 +454,14 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'intersection'} = $this->toIntersection();
-        $out->{'inUnion'} = $this->toInUnion();
-        $out->{'maxlength'} = $this->toMaxlength();
         $out->{'minlength'} = $this->toMinlength();
-        $out->{'minMaxIntersection'} = $this->toMinMaxIntersection();
+        $out->{'maxlength'} = $this->toMaxlength();
         $out->{'minmaxlength'} = $this->toMinmaxlength();
-        $out->{'minMaxUnion'} = $this->toMinMaxUnion();
         $out->{'union'} = $this->toUnion();
+        $out->{'inUnion'} = $this->toInUnion();
+        $out->{'minMaxUnion'} = $this->toMinMaxUnion();
+        $out->{'intersection'} = $this->toIntersection();
+        $out->{'minMaxIntersection'} = $this->toMinMaxIntersection();
         return $out;
     }
 
@@ -472,14 +472,14 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromIntersection($obj->{'intersection'})
-        ,TopLevel::fromInUnion($obj->{'inUnion'})
+         TopLevel::fromMinlength($obj->{'minlength'})
         ,TopLevel::fromMaxlength($obj->{'maxlength'})
-        ,TopLevel::fromMinlength($obj->{'minlength'})
-        ,TopLevel::fromMinMaxIntersection($obj->{'minMaxIntersection'})
         ,TopLevel::fromMinmaxlength($obj->{'minmaxlength'})
-        ,TopLevel::fromMinMaxUnion($obj->{'minMaxUnion'})
         ,TopLevel::fromUnion($obj->{'union'})
+        ,TopLevel::fromInUnion($obj->{'inUnion'})
+        ,TopLevel::fromMinMaxUnion($obj->{'minMaxUnion'})
+        ,TopLevel::fromIntersection($obj->{'intersection'})
+        ,TopLevel::fromMinMaxIntersection($obj->{'minMaxIntersection'})
         );
     }
 
@@ -488,14 +488,14 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleIntersection()
-        ,TopLevel::sampleInUnion()
+         TopLevel::sampleMinlength()
         ,TopLevel::sampleMaxlength()
-        ,TopLevel::sampleMinlength()
-        ,TopLevel::sampleMinMaxIntersection()
         ,TopLevel::sampleMinmaxlength()
-        ,TopLevel::sampleMinMaxUnion()
         ,TopLevel::sampleUnion()
+        ,TopLevel::sampleInUnion()
+        ,TopLevel::sampleMinMaxUnion()
+        ,TopLevel::sampleIntersection()
+        ,TopLevel::sampleMinMaxIntersection()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/non-standard-ref.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/non-standard-ref.schema/default/TopLevel.php
index 03c9508..e4c8d24 100644
--- a/base/schema-php/test/inputs/schema/non-standard-ref.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/non-standard-ref.schema/default/TopLevel.php
@@ -4,18 +4,18 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private int $bar; // json:bar Required
     private int $foo; // json:foo Required
+    private int $bar; // json:bar Required
     private bool $quux; // json:quux Required
 
     /**
-     * @param int $bar
      * @param int $foo
+     * @param int $bar
      * @param bool $quux
      */
-    public function __construct(int $bar, int $foo, bool $quux) {
-        $this->bar = $bar;
+    public function __construct(int $foo, int $bar, bool $quux) {
         $this->foo = $foo;
+        $this->bar = $bar;
         $this->quux = $quux;
     }
 
@@ -24,7 +24,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromBar(int $value): int {
+    public static function fromFoo(int $value): int {
         return $value; /*int*/
     }
 
@@ -32,11 +32,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toBar(): int {
-        if (TopLevel::validateBar($this->bar))  {
-            return $this->bar; /*int*/
+    public function toFoo(): int {
+        if (TopLevel::validateFoo($this->foo))  {
+            return $this->foo; /*int*/
         }
-        throw new Exception('never get to this TopLevel::bar');
+        throw new Exception('never get to this TopLevel::foo');
     }
 
     /**
@@ -44,7 +44,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateBar(int $value): bool {
+    public static function validateFoo(int $value): bool {
         return true;
     }
 
@@ -52,18 +52,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getBar(): int {
-        if (TopLevel::validateBar($this->bar))  {
-            return $this->bar;
+    public function getFoo(): int {
+        if (TopLevel::validateFoo($this->foo))  {
+            return $this->foo;
         }
-        throw new Exception('never get to getBar TopLevel::bar');
+        throw new Exception('never get to getFoo TopLevel::foo');
     }
 
     /**
      * @return int
      */
-    public static function sampleBar(): int {
-        return 31; /*31:bar*/
+    public static function sampleFoo(): int {
+        return 31; /*31:foo*/
     }
 
     /**
@@ -71,7 +71,7 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public static function fromFoo(int $value): int {
+    public static function fromBar(int $value): int {
         return $value; /*int*/
     }
 
@@ -79,11 +79,11 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function toFoo(): int {
-        if (TopLevel::validateFoo($this->foo))  {
-            return $this->foo; /*int*/
+    public function toBar(): int {
+        if (TopLevel::validateBar($this->bar))  {
+            return $this->bar; /*int*/
         }
-        throw new Exception('never get to this TopLevel::foo');
+        throw new Exception('never get to this TopLevel::bar');
     }
 
     /**
@@ -91,7 +91,7 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateFoo(int $value): bool {
+    public static function validateBar(int $value): bool {
         return true;
     }
 
@@ -99,18 +99,18 @@ class TopLevel {
      * @throws Exception
      * @return int
      */
-    public function getFoo(): int {
-        if (TopLevel::validateFoo($this->foo))  {
-            return $this->foo;
+    public function getBar(): int {
+        if (TopLevel::validateBar($this->bar))  {
+            return $this->bar;
         }
-        throw new Exception('never get to getFoo TopLevel::foo');
+        throw new Exception('never get to getBar TopLevel::bar');
     }
 
     /**
      * @return int
      */
-    public static function sampleFoo(): int {
-        return 32; /*32:foo*/
+    public static function sampleBar(): int {
+        return 32; /*32:bar*/
     }
 
     /**
@@ -165,8 +165,8 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateBar($this->bar)
-        || TopLevel::validateFoo($this->foo)
+        return TopLevel::validateFoo($this->foo)
+        || TopLevel::validateBar($this->bar)
         || TopLevel::validateQuux($this->quux);
     }
 
@@ -176,8 +176,8 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'bar'} = $this->toBar();
         $out->{'foo'} = $this->toFoo();
+        $out->{'bar'} = $this->toBar();
         $out->{'quux'} = $this->toQuux();
         return $out;
     }
@@ -189,8 +189,8 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromBar($obj->{'bar'})
-        ,TopLevel::fromFoo($obj->{'foo'})
+         TopLevel::fromFoo($obj->{'foo'})
+        ,TopLevel::fromBar($obj->{'bar'})
         ,TopLevel::fromQuux($obj->{'quux'})
         );
     }
@@ -200,8 +200,8 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleBar()
-        ,TopLevel::sampleFoo()
+         TopLevel::sampleFoo()
+        ,TopLevel::sampleBar()
         ,TopLevel::sampleQuux()
         );
     }
diff --git a/base/schema-php/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.php
index 10b116e..d92c56c 100644
--- a/base/schema-php/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.php
@@ -4,121 +4,121 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private ?string $b; // json:b Optional
     private Kind $kind; // json:kind Required
+    private ?string $b; // json:b Optional
 
     /**
-     * @param string|null $b
      * @param Kind $kind
+     * @param string|null $b
      */
-    public function __construct(?string $b, Kind $kind) {
-        $this->b = $b;
+    public function __construct(Kind $kind, ?string $b) {
         $this->kind = $kind;
+        $this->b = $b;
     }
 
     /**
-     * @param ?string $value
+     * @param string $value
      * @throws Exception
-     * @return ?string
+     * @return Kind
      */
-    public static function fromB(?string $value): ?string {
-        if (!is_null($value)) {
-            return $value; /*string*/
-        } else {
-            return  null;
-        }
+    public static function fromKind(string $value): Kind {
+        return Kind::from($value); /*enum*/
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return string
      */
-    public function toB(): ?string {
-        if (TopLevel::validateB($this->b))  {
-            if (!is_null($this->b)) {
-                return $this->b; /*string*/
-            } else {
-                return  null;
-            }
+    public function toKind(): string {
+        if (TopLevel::validateKind($this->kind))  {
+            return Kind::to($this->kind); /*enum*/
         }
-        throw new Exception('never get to this TopLevel::b');
+        throw new Exception('never get to this TopLevel::kind');
     }
 
     /**
-     * @param string|null
+     * @param Kind
      * @return bool
      * @throws Exception
      */
-    public static function validateB(?string $value): bool {
-        if (!is_null($value)) {
-        }
+    public static function validateKind(Kind $value): bool {
+        Kind::to($value);
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return Kind
      */
-    public function getB(): ?string {
-        if (TopLevel::validateB($this->b))  {
-            return $this->b;
+    public function getKind(): Kind {
+        if (TopLevel::validateKind($this->kind))  {
+            return $this->kind;
         }
-        throw new Exception('never get to getB TopLevel::b');
+        throw new Exception('never get to getKind TopLevel::kind');
     }
 
     /**
-     * @return ?string
+     * @return Kind
      */
-    public static function sampleB(): ?string {
-        return 'TopLevel::b::31'; /*31:b*/
+    public static function sampleKind(): Kind {
+        return Kind::sample(); /*enum*/
     }
 
     /**
-     * @param string $value
+     * @param ?string $value
      * @throws Exception
-     * @return Kind
+     * @return ?string
      */
-    public static function fromKind(string $value): Kind {
-        return Kind::from($value); /*enum*/
+    public static function fromB(?string $value): ?string {
+        if (!is_null($value)) {
+            return $value; /*string*/
+        } else {
+            return  null;
+        }
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?string
      */
-    public function toKind(): string {
-        if (TopLevel::validateKind($this->kind))  {
-            return Kind::to($this->kind); /*enum*/
+    public function toB(): ?string {
+        if (TopLevel::validateB($this->b))  {
+            if (!is_null($this->b)) {
+                return $this->b; /*string*/
+            } else {
+                return  null;
+            }
         }
-        throw new Exception('never get to this TopLevel::kind');
+        throw new Exception('never get to this TopLevel::b');
     }
 
     /**
-     * @param Kind
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateKind(Kind $value): bool {
-        Kind::to($value);
+    public static function validateB(?string $value): bool {
+        if (!is_null($value)) {
+        }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return Kind
+     * @return ?string
      */
-    public function getKind(): Kind {
-        if (TopLevel::validateKind($this->kind))  {
-            return $this->kind;
+    public function getB(): ?string {
+        if (TopLevel::validateB($this->b))  {
+            return $this->b;
         }
-        throw new Exception('never get to getKind TopLevel::kind');
+        throw new Exception('never get to getB TopLevel::b');
     }
 
     /**
-     * @return Kind
+     * @return ?string
      */
-    public static function sampleKind(): Kind {
-        return Kind::sample(); /*enum*/
+    public static function sampleB(): ?string {
+        return 'TopLevel::b::32'; /*32:b*/
     }
 
     /**
@@ -126,8 +126,8 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateB($this->b)
-        || TopLevel::validateKind($this->kind);
+        return TopLevel::validateKind($this->kind)
+        || TopLevel::validateB($this->b);
     }
 
     /**
@@ -136,8 +136,8 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'b'} = $this->toB();
         $out->{'kind'} = $this->toKind();
+        $out->{'b'} = $this->toB();
         return $out;
     }
 
@@ -148,8 +148,8 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromB($obj->{'b'})
-        ,TopLevel::fromKind($obj->{'kind'})
+         TopLevel::fromKind($obj->{'kind'})
+        ,TopLevel::fromB($obj->{'b'})
         );
     }
 
@@ -158,8 +158,8 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleB()
-        ,TopLevel::sampleKind()
+         TopLevel::sampleKind()
+        ,TopLevel::sampleB()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/optional-any.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/optional-any.schema/default/TopLevel.php
index 8be2a5d..8d87cf5 100644
--- a/base/schema-php/test/inputs/schema/optional-any.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/optional-any.schema/default/TopLevel.php
@@ -4,110 +4,110 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private bool $bar; // json:bar Required
     private mixed $foo; // json:foo Optional
+    private bool $bar; // json:bar Required
 
     /**
-     * @param bool $bar
      * @param mixed $foo
+     * @param bool $bar
      */
-    public function __construct(bool $bar, mixed $foo) {
-        $this->bar = $bar;
+    public function __construct(mixed $foo, bool $bar) {
         $this->foo = $foo;
+        $this->bar = $bar;
     }
 
     /**
-     * @param bool $value
+     * @param mixed $value
      * @throws Exception
-     * @return bool
+     * @return mixed
      */
-    public static function fromBar(bool $value): bool {
-        return $value; /*bool*/
+    public static function fromFoo(mixed $value): mixed {
+        return $value; /*any*/
     }
 
     /**
      * @throws Exception
-     * @return bool
+     * @return mixed
      */
-    public function toBar(): bool {
-        if (TopLevel::validateBar($this->bar))  {
-            return $this->bar; /*bool*/
+    public function toFoo(): mixed {
+        if (TopLevel::validateFoo($this->foo))  {
+            return $this->foo; /*any*/
         }
-        throw new Exception('never get to this TopLevel::bar');
+        throw new Exception('never get to this TopLevel::foo');
     }
 
     /**
-     * @param bool
+     * @param mixed
      * @return bool
      * @throws Exception
      */
-    public static function validateBar(bool $value): bool {
+    public static function validateFoo(mixed $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return bool
+     * @return mixed
      */
-    public function getBar(): bool {
-        if (TopLevel::validateBar($this->bar))  {
-            return $this->bar;
+    public function getFoo(): mixed {
+        if (TopLevel::validateFoo($this->foo))  {
+            return $this->foo;
         }
-        throw new Exception('never get to getBar TopLevel::bar');
+        throw new Exception('never get to getFoo TopLevel::foo');
     }
 
     /**
-     * @return bool
+     * @return mixed
      */
-    public static function sampleBar(): bool {
-        return true; /*31:bar*/
+    public static function sampleFoo(): mixed {
+        return 'AnyType::TopLevel::foo::31';/*31:foo*/
     }
 
     /**
-     * @param mixed $value
+     * @param bool $value
      * @throws Exception
-     * @return mixed
+     * @return bool
      */
-    public static function fromFoo(mixed $value): mixed {
-        return $value; /*any*/
+    public static function fromBar(bool $value): bool {
+        return $value; /*bool*/
     }
 
     /**
      * @throws Exception
-     * @return mixed
+     * @return bool
      */
-    public function toFoo(): mixed {
-        if (TopLevel::validateFoo($this->foo))  {
-            return $this->foo; /*any*/
+    public function toBar(): bool {
+        if (TopLevel::validateBar($this->bar))  {
+            return $this->bar; /*bool*/
         }
-        throw new Exception('never get to this TopLevel::foo');
+        throw new Exception('never get to this TopLevel::bar');
     }
 
     /**
-     * @param mixed
+     * @param bool
      * @return bool
      * @throws Exception
      */
-    public static function validateFoo(mixed $value): bool {
+    public static function validateBar(bool $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return mixed
+     * @return bool
      */
-    public function getFoo(): mixed {
-        if (TopLevel::validateFoo($this->foo))  {
-            return $this->foo;
+    public function getBar(): bool {
+        if (TopLevel::validateBar($this->bar))  {
+            return $this->bar;
         }
-        throw new Exception('never get to getFoo TopLevel::foo');
+        throw new Exception('never get to getBar TopLevel::bar');
     }
 
     /**
-     * @return mixed
+     * @return bool
      */
-    public static function sampleFoo(): mixed {
-        return 'AnyType::TopLevel::foo::32';/*32:foo*/
+    public static function sampleBar(): bool {
+        return true; /*32:bar*/
     }
 
     /**
@@ -115,8 +115,8 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateBar($this->bar)
-        || TopLevel::validateFoo($this->foo);
+        return TopLevel::validateFoo($this->foo)
+        || TopLevel::validateBar($this->bar);
     }
 
     /**
@@ -125,8 +125,8 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'bar'} = $this->toBar();
         $out->{'foo'} = $this->toFoo();
+        $out->{'bar'} = $this->toBar();
         return $out;
     }
 
@@ -137,8 +137,8 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromBar($obj->{'bar'})
-        ,TopLevel::fromFoo($obj->{'foo'})
+         TopLevel::fromFoo($obj->{'foo'})
+        ,TopLevel::fromBar($obj->{'bar'})
         );
     }
 
@@ -147,8 +147,8 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleBar()
-        ,TopLevel::sampleFoo()
+         TopLevel::sampleFoo()
+        ,TopLevel::sampleBar()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/optional-const-ref.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/optional-const-ref.schema/default/TopLevel.php
index f38651b..9f03a48 100644
--- a/base/schema-php/test/inputs/schema/optional-const-ref.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/optional-const-ref.schema/default/TopLevel.php
@@ -5,30 +5,30 @@ declare(strict_types=1);
 
 class TopLevel {
     private ?array $coordinates; // json:coordinates Optional
-    private ?int $count; // json:count Optional
-    private ?string $label; // json:label Optional
     private array $requiredCoordinates; // json:requiredCoordinates Required
+    private ?int $count; // json:count Optional
     private int $requiredCount; // json:requiredCount Required
-    private string $requiredLabel; // json:requiredLabel Required
     private ?float $weight; // json:weight Optional
+    private ?string $label; // json:label Optional
+    private string $requiredLabel; // json:requiredLabel Required
 
     /**
      * @param array|null $coordinates
-     * @param int|null $count
-     * @param string|null $label
      * @param array $requiredCoordinates
+     * @param int|null $count
      * @param int $requiredCount
-     * @param string $requiredLabel
      * @param float|null $weight
+     * @param string|null $label
+     * @param string $requiredLabel
      */
-    public function __construct(?array $coordinates, ?int $count, ?string $label, array $requiredCoordinates, int $requiredCount, string $requiredLabel, ?float $weight) {
+    public function __construct(?array $coordinates, array $requiredCoordinates, ?int $count, int $requiredCount, ?float $weight, ?string $label, string $requiredLabel) {
         $this->coordinates = $coordinates;
-        $this->count = $count;
-        $this->label = $label;
         $this->requiredCoordinates = $requiredCoordinates;
+        $this->count = $count;
         $this->requiredCount = $requiredCount;
-        $this->requiredLabel = $requiredLabel;
         $this->weight = $weight;
+        $this->label = $label;
+        $this->requiredLabel = $requiredLabel;
     }
 
     /**
@@ -100,6 +100,65 @@ class TopLevel {
         ); /* 31:coordinates*/
     }
 
+    /**
+     * @param array $value
+     * @throws Exception
+     * @return array
+     */
+    public static function fromRequiredCoordinates(array $value): array {
+        return  array_map(function ($value) {
+            return Coordinate::from($value); /*class*/
+        }, $value);
+    }
+
+    /**
+     * @throws Exception
+     * @return array
+     */
+    public function toRequiredCoordinates(): array {
+        if (TopLevel::validateRequiredCoordinates($this->requiredCoordinates))  {
+            return array_map(function ($value) {
+                return $value->to(); /*class*/
+            }, $this->requiredCoordinates);
+        }
+        throw new Exception('never get to this TopLevel::requiredCoordinates');
+    }
+
+    /**
+     * @param array
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateRequiredCoordinates(array $value): bool {
+        if (!is_array($value)) {
+            throw new Exception("Attribute Error:TopLevel::requiredCoordinates");
+        }
+        array_walk($value, function($value_v) {
+            $value_v->validate();
+        });
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return array
+     */
+    public function getRequiredCoordinates(): array {
+        if (TopLevel::validateRequiredCoordinates($this->requiredCoordinates))  {
+            return $this->requiredCoordinates;
+        }
+        throw new Exception('never get to getRequiredCoordinates TopLevel::requiredCoordinates');
+    }
+
+    /**
+     * @return array
+     */
+    public static function sampleRequiredCoordinates(): array {
+        return  array(
+            Coordinate::sample() /*32:*/
+        ); /* 32:requiredCoordinates*/
+    }
+
     /**
      * @param ?int $value
      * @throws Exception
@@ -154,170 +213,168 @@ class TopLevel {
      * @return ?int
      */
     public static function sampleCount(): ?int {
-        return 32; /*32:count*/
+        return 33; /*33:count*/
     }
 
     /**
-     * @param ?string $value
+     * @param int $value
      * @throws Exception
-     * @return ?string
+     * @return int
      */
-    public static function fromLabel(?string $value): ?string {
-        if (!is_null($value)) {
-            return $value; /*string*/
-        } else {
-            return  null;
-        }
+    public static function fromRequiredCount(int $value): int {
+        return $value; /*int*/
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return int
      */
-    public function toLabel(): ?string {
-        if (TopLevel::validateLabel($this->label))  {
-            if (!is_null($this->label)) {
-                return $this->label; /*string*/
-            } else {
-                return  null;
-            }
+    public function toRequiredCount(): int {
+        if (TopLevel::validateRequiredCount($this->requiredCount))  {
+            return $this->requiredCount; /*int*/
         }
-        throw new Exception('never get to this TopLevel::label');
+        throw new Exception('never get to this TopLevel::requiredCount');
     }
 
     /**
-     * @param string|null
+     * @param int
      * @return bool
      * @throws Exception
      */
-    public static function validateLabel(?string $value): bool {
-        if (!is_null($value)) {
-        }
+    public static function validateRequiredCount(int $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return int
      */
-    public function getLabel(): ?string {
-        if (TopLevel::validateLabel($this->label))  {
-            return $this->label;
+    public function getRequiredCount(): int {
+        if (TopLevel::validateRequiredCount($this->requiredCount))  {
+            return $this->requiredCount;
         }
-        throw new Exception('never get to getLabel TopLevel::label');
+        throw new Exception('never get to getRequiredCount TopLevel::requiredCount');
     }
 
     /**
-     * @return ?string
+     * @return int
      */
-    public static function sampleLabel(): ?string {
-        return 'TopLevel::label::33'; /*33:label*/
+    public static function sampleRequiredCount(): int {
+        return 34; /*34:requiredCount*/
     }
 
     /**
-     * @param array $value
+     * @param ?float $value
      * @throws Exception
-     * @return array
+     * @return ?float
      */
-    public static function fromRequiredCoordinates(array $value): array {
-        return  array_map(function ($value) {
-            return Coordinate::from($value); /*class*/
-        }, $value);
+    public static function fromWeight(?float $value): ?float {
+        if (!is_null($value)) {
+            return $value; /*float*/
+        } else {
+            return  null;
+        }
     }
 
     /**
      * @throws Exception
-     * @return array
+     * @return ?float
      */
-    public function toRequiredCoordinates(): array {
-        if (TopLevel::validateRequiredCoordinates($this->requiredCoordinates))  {
-            return array_map(function ($value) {
-                return $value->to(); /*class*/
-            }, $this->requiredCoordinates);
+    public function toWeight(): ?float {
+        if (TopLevel::validateWeight($this->weight))  {
+            if (!is_null($this->weight)) {
+                return $this->weight; /*float*/
+            } else {
+                return  null;
+            }
         }
-        throw new Exception('never get to this TopLevel::requiredCoordinates');
+        throw new Exception('never get to this TopLevel::weight');
     }
 
     /**
-     * @param array
+     * @param float|null
      * @return bool
      * @throws Exception
      */
-    public static function validateRequiredCoordinates(array $value): bool {
-        if (!is_array($value)) {
-            throw new Exception("Attribute Error:TopLevel::requiredCoordinates");
+    public static function validateWeight(?float $value): bool {
+        if (!is_null($value)) {
         }
-        array_walk($value, function($value_v) {
-            $value_v->validate();
-        });
         return true;
     }
 
     /**
      * @throws Exception
-     * @return array
+     * @return ?float
      */
-    public function getRequiredCoordinates(): array {
-        if (TopLevel::validateRequiredCoordinates($this->requiredCoordinates))  {
-            return $this->requiredCoordinates;
+    public function getWeight(): ?float {
+        if (TopLevel::validateWeight($this->weight))  {
+            return $this->weight;
         }
-        throw new Exception('never get to getRequiredCoordinates TopLevel::requiredCoordinates');
+        throw new Exception('never get to getWeight TopLevel::weight');
     }
 
     /**
-     * @return array
+     * @return ?float
      */
-    public static function sampleRequiredCoordinates(): array {
-        return  array(
-            Coordinate::sample() /*34:*/
-        ); /* 34:requiredCoordinates*/
+    public static function sampleWeight(): ?float {
+        return 35.035; /*35:weight*/
     }
 
     /**
-     * @param int $value
+     * @param ?string $value
      * @throws Exception
-     * @return int
+     * @return ?string
      */
-    public static function fromRequiredCount(int $value): int {
-        return $value; /*int*/
+    public static function fromLabel(?string $value): ?string {
+        if (!is_null($value)) {
+            return $value; /*string*/
+        } else {
+            return  null;
+        }
     }
 
     /**
      * @throws Exception
-     * @return int
+     * @return ?string
      */
-    public function toRequiredCount(): int {
-        if (TopLevel::validateRequiredCount($this->requiredCount))  {
-            return $this->requiredCount; /*int*/
+    public function toLabel(): ?string {
+        if (TopLevel::validateLabel($this->label))  {
+            if (!is_null($this->label)) {
+                return $this->label; /*string*/
+            } else {
+                return  null;
+            }
         }
-        throw new Exception('never get to this TopLevel::requiredCount');
+        throw new Exception('never get to this TopLevel::label');
     }
 
     /**
-     * @param int
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateRequiredCount(int $value): bool {
+    public static function validateLabel(?string $value): bool {
+        if (!is_null($value)) {
+        }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return int
+     * @return ?string
      */
-    public function getRequiredCount(): int {
-        if (TopLevel::validateRequiredCount($this->requiredCount))  {
-            return $this->requiredCount;
+    public function getLabel(): ?string {
+        if (TopLevel::validateLabel($this->label))  {
+            return $this->label;
         }
-        throw new Exception('never get to getRequiredCount TopLevel::requiredCount');
+        throw new Exception('never get to getLabel TopLevel::label');
     }
 
     /**
-     * @return int
+     * @return ?string
      */
-    public static function sampleRequiredCount(): int {
-        return 35; /*35:requiredCount*/
+    public static function sampleLabel(): ?string {
+        return 'TopLevel::label::36'; /*36:label*/
     }
 
     /**
@@ -364,64 +421,7 @@ class TopLevel {
      * @return string
      */
     public static function sampleRequiredLabel(): string {
-        return 'TopLevel::requiredLabel::36'; /*36:requiredLabel*/
-    }
-
-    /**
-     * @param ?float $value
-     * @throws Exception
-     * @return ?float
-     */
-    public static function fromWeight(?float $value): ?float {
-        if (!is_null($value)) {
-            return $value; /*float*/
-        } else {
-            return  null;
-        }
-    }
-
-    /**
-     * @throws Exception
-     * @return ?float
-     */
-    public function toWeight(): ?float {
-        if (TopLevel::validateWeight($this->weight))  {
-            if (!is_null($this->weight)) {
-                return $this->weight; /*float*/
-            } else {
-                return  null;
-            }
-        }
-        throw new Exception('never get to this TopLevel::weight');
-    }
-
-    /**
-     * @param float|null
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateWeight(?float $value): bool {
-        if (!is_null($value)) {
-        }
-        return true;
-    }
-
-    /**
-     * @throws Exception
-     * @return ?float
-     */
-    public function getWeight(): ?float {
-        if (TopLevel::validateWeight($this->weight))  {
-            return $this->weight;
-        }
-        throw new Exception('never get to getWeight TopLevel::weight');
-    }
-
-    /**
-     * @return ?float
-     */
-    public static function sampleWeight(): ?float {
-        return 37.037; /*37:weight*/
+        return 'TopLevel::requiredLabel::37'; /*37:requiredLabel*/
     }
 
     /**
@@ -430,12 +430,12 @@ class TopLevel {
      */
     public function validate(): bool {
         return TopLevel::validateCoordinates($this->coordinates)
-        || TopLevel::validateCount($this->count)
-        || TopLevel::validateLabel($this->label)
         || TopLevel::validateRequiredCoordinates($this->requiredCoordinates)
+        || TopLevel::validateCount($this->count)
         || TopLevel::validateRequiredCount($this->requiredCount)
-        || TopLevel::validateRequiredLabel($this->requiredLabel)
-        || TopLevel::validateWeight($this->weight);
+        || TopLevel::validateWeight($this->weight)
+        || TopLevel::validateLabel($this->label)
+        || TopLevel::validateRequiredLabel($this->requiredLabel);
     }
 
     /**
@@ -445,12 +445,12 @@ class TopLevel {
     public function to(): stdClass  {
         $out = new stdClass();
         $out->{'coordinates'} = $this->toCoordinates();
-        $out->{'count'} = $this->toCount();
-        $out->{'label'} = $this->toLabel();
         $out->{'requiredCoordinates'} = $this->toRequiredCoordinates();
+        $out->{'count'} = $this->toCount();
         $out->{'requiredCount'} = $this->toRequiredCount();
-        $out->{'requiredLabel'} = $this->toRequiredLabel();
         $out->{'weight'} = $this->toWeight();
+        $out->{'label'} = $this->toLabel();
+        $out->{'requiredLabel'} = $this->toRequiredLabel();
         return $out;
     }
 
@@ -462,12 +462,12 @@ class TopLevel {
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
          TopLevel::fromCoordinates($obj->{'coordinates'})
-        ,TopLevel::fromCount($obj->{'count'})
-        ,TopLevel::fromLabel($obj->{'label'})
         ,TopLevel::fromRequiredCoordinates($obj->{'requiredCoordinates'})
+        ,TopLevel::fromCount($obj->{'count'})
         ,TopLevel::fromRequiredCount($obj->{'requiredCount'})
-        ,TopLevel::fromRequiredLabel($obj->{'requiredLabel'})
         ,TopLevel::fromWeight($obj->{'weight'})
+        ,TopLevel::fromLabel($obj->{'label'})
+        ,TopLevel::fromRequiredLabel($obj->{'requiredLabel'})
         );
     }
 
@@ -477,12 +477,12 @@ class TopLevel {
     public static function sample(): TopLevel {
         return new TopLevel(
          TopLevel::sampleCoordinates()
-        ,TopLevel::sampleCount()
-        ,TopLevel::sampleLabel()
         ,TopLevel::sampleRequiredCoordinates()
+        ,TopLevel::sampleCount()
         ,TopLevel::sampleRequiredCount()
-        ,TopLevel::sampleRequiredLabel()
         ,TopLevel::sampleWeight()
+        ,TopLevel::sampleLabel()
+        ,TopLevel::sampleRequiredLabel()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/optional-constraints.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/optional-constraints.schema/default/TopLevel.php
index 34acb17..b6ef420 100644
--- a/base/schema-php/test/inputs/schema/optional-constraints.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/optional-constraints.schema/default/TopLevel.php
@@ -4,82 +4,72 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private ?float $optDouble; // json:optDouble Optional
+    private int $reqZeroMin; // json:reqZeroMin Required
     private ?int $optInt; // json:optInt Optional
-    private ?string $optPattern; // json:optPattern Optional
+    private ?float $optDouble; // json:optDouble Optional
     private ?string $optString; // json:optString Optional
-    private int $reqZeroMin; // json:reqZeroMin Required
+    private ?string $optPattern; // json:optPattern Optional
 
     /**
-     * @param float|null $optDouble
+     * @param int $reqZeroMin
      * @param int|null $optInt
-     * @param string|null $optPattern
+     * @param float|null $optDouble
      * @param string|null $optString
-     * @param int $reqZeroMin
+     * @param string|null $optPattern
      */
-    public function __construct(?float $optDouble, ?int $optInt, ?string $optPattern, ?string $optString, int $reqZeroMin) {
-        $this->optDouble = $optDouble;
+    public function __construct(int $reqZeroMin, ?int $optInt, ?float $optDouble, ?string $optString, ?string $optPattern) {
+        $this->reqZeroMin = $reqZeroMin;
         $this->optInt = $optInt;
-        $this->optPattern = $optPattern;
+        $this->optDouble = $optDouble;
         $this->optString = $optString;
-        $this->reqZeroMin = $reqZeroMin;
+        $this->optPattern = $optPattern;
     }
 
     /**
-     * @param ?float $value
+     * @param int $value
      * @throws Exception
-     * @return ?float
+     * @return int
      */
-    public static function fromOptDouble(?float $value): ?float {
-        if (!is_null($value)) {
-            return $value; /*float*/
-        } else {
-            return  null;
-        }
+    public static function fromReqZeroMin(int $value): int {
+        return $value; /*int*/
     }
 
     /**
      * @throws Exception
-     * @return ?float
+     * @return int
      */
-    public function toOptDouble(): ?float {
-        if (TopLevel::validateOptDouble($this->optDouble))  {
-            if (!is_null($this->optDouble)) {
-                return $this->optDouble; /*float*/
-            } else {
-                return  null;
-            }
+    public function toReqZeroMin(): int {
+        if (TopLevel::validateReqZeroMin($this->reqZeroMin))  {
+            return $this->reqZeroMin; /*int*/
         }
-        throw new Exception('never get to this TopLevel::optDouble');
+        throw new Exception('never get to this TopLevel::reqZeroMin');
     }
 
     /**
-     * @param float|null
+     * @param int
      * @return bool
      * @throws Exception
      */
-    public static function validateOptDouble(?float $value): bool {
-        if (!is_null($value)) {
-        }
+    public static function validateReqZeroMin(int $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?float
+     * @return int
      */
-    public function getOptDouble(): ?float {
-        if (TopLevel::validateOptDouble($this->optDouble))  {
-            return $this->optDouble;
+    public function getReqZeroMin(): int {
+        if (TopLevel::validateReqZeroMin($this->reqZeroMin))  {
+            return $this->reqZeroMin;
         }
-        throw new Exception('never get to getOptDouble TopLevel::optDouble');
+        throw new Exception('never get to getReqZeroMin TopLevel::reqZeroMin');
     }
 
     /**
-     * @return ?float
+     * @return int
      */
-    public static function sampleOptDouble(): ?float {
-        return 31.031; /*31:optDouble*/
+    public static function sampleReqZeroMin(): int {
+        return 31; /*31:reqZeroMin*/
     }
 
     /**
@@ -140,13 +130,13 @@ class TopLevel {
     }
 
     /**
-     * @param ?string $value
+     * @param ?float $value
      * @throws Exception
-     * @return ?string
+     * @return ?float
      */
-    public static function fromOptPattern(?string $value): ?string {
+    public static function fromOptDouble(?float $value): ?float {
         if (!is_null($value)) {
-            return $value; /*string*/
+            return $value; /*float*/
         } else {
             return  null;
         }
@@ -154,25 +144,25 @@ class TopLevel {
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?float
      */
-    public function toOptPattern(): ?string {
-        if (TopLevel::validateOptPattern($this->optPattern))  {
-            if (!is_null($this->optPattern)) {
-                return $this->optPattern; /*string*/
+    public function toOptDouble(): ?float {
+        if (TopLevel::validateOptDouble($this->optDouble))  {
+            if (!is_null($this->optDouble)) {
+                return $this->optDouble; /*float*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this TopLevel::optPattern');
+        throw new Exception('never get to this TopLevel::optDouble');
     }
 
     /**
-     * @param string|null
+     * @param float|null
      * @return bool
      * @throws Exception
      */
-    public static function validateOptPattern(?string $value): bool {
+    public static function validateOptDouble(?float $value): bool {
         if (!is_null($value)) {
         }
         return true;
@@ -180,20 +170,20 @@ class TopLevel {
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?float
      */
-    public function getOptPattern(): ?string {
-        if (TopLevel::validateOptPattern($this->optPattern))  {
-            return $this->optPattern;
+    public function getOptDouble(): ?float {
+        if (TopLevel::validateOptDouble($this->optDouble))  {
+            return $this->optDouble;
         }
-        throw new Exception('never get to getOptPattern TopLevel::optPattern');
+        throw new Exception('never get to getOptDouble TopLevel::optDouble');
     }
 
     /**
-     * @return ?string
+     * @return ?float
      */
-    public static function sampleOptPattern(): ?string {
-        return 'TopLevel::optPattern::33'; /*33:optPattern*/
+    public static function sampleOptDouble(): ?float {
+        return 33.033; /*33:optDouble*/
     }
 
     /**
@@ -254,50 +244,60 @@ class TopLevel {
     }
 
     /**
-     * @param int $value
+     * @param ?string $value
      * @throws Exception
-     * @return int
+     * @return ?string
      */
-    public static function fromReqZeroMin(int $value): int {
-        return $value; /*int*/
+    public static function fromOptPattern(?string $value): ?string {
+        if (!is_null($value)) {
+            return $value; /*string*/
+        } else {
+            return  null;
+        }
     }
 
     /**
      * @throws Exception
-     * @return int
+     * @return ?string
      */
-    public function toReqZeroMin(): int {
-        if (TopLevel::validateReqZeroMin($this->reqZeroMin))  {
-            return $this->reqZeroMin; /*int*/
+    public function toOptPattern(): ?string {
+        if (TopLevel::validateOptPattern($this->optPattern))  {
+            if (!is_null($this->optPattern)) {
+                return $this->optPattern; /*string*/
+            } else {
+                return  null;
+            }
         }
-        throw new Exception('never get to this TopLevel::reqZeroMin');
+        throw new Exception('never get to this TopLevel::optPattern');
     }
 
     /**
-     * @param int
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateReqZeroMin(int $value): bool {
+    public static function validateOptPattern(?string $value): bool {
+        if (!is_null($value)) {
+        }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return int
+     * @return ?string
      */
-    public function getReqZeroMin(): int {
-        if (TopLevel::validateReqZeroMin($this->reqZeroMin))  {
-            return $this->reqZeroMin;
+    public function getOptPattern(): ?string {
+        if (TopLevel::validateOptPattern($this->optPattern))  {
+            return $this->optPattern;
         }
-        throw new Exception('never get to getReqZeroMin TopLevel::reqZeroMin');
+        throw new Exception('never get to getOptPattern TopLevel::optPattern');
     }
 
     /**
-     * @return int
+     * @return ?string
      */
-    public static function sampleReqZeroMin(): int {
-        return 35; /*35:reqZeroMin*/
+    public static function sampleOptPattern(): ?string {
+        return 'TopLevel::optPattern::35'; /*35:optPattern*/
     }
 
     /**
@@ -305,11 +305,11 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateOptDouble($this->optDouble)
+        return TopLevel::validateReqZeroMin($this->reqZeroMin)
         || TopLevel::validateOptInt($this->optInt)
-        || TopLevel::validateOptPattern($this->optPattern)
+        || TopLevel::validateOptDouble($this->optDouble)
         || TopLevel::validateOptString($this->optString)
-        || TopLevel::validateReqZeroMin($this->reqZeroMin);
+        || TopLevel::validateOptPattern($this->optPattern);
     }
 
     /**
@@ -318,11 +318,11 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'optDouble'} = $this->toOptDouble();
+        $out->{'reqZeroMin'} = $this->toReqZeroMin();
         $out->{'optInt'} = $this->toOptInt();
-        $out->{'optPattern'} = $this->toOptPattern();
+        $out->{'optDouble'} = $this->toOptDouble();
         $out->{'optString'} = $this->toOptString();
-        $out->{'reqZeroMin'} = $this->toReqZeroMin();
+        $out->{'optPattern'} = $this->toOptPattern();
         return $out;
     }
 
@@ -333,11 +333,11 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromOptDouble($obj->{'optDouble'})
+         TopLevel::fromReqZeroMin($obj->{'reqZeroMin'})
         ,TopLevel::fromOptInt($obj->{'optInt'})
-        ,TopLevel::fromOptPattern($obj->{'optPattern'})
+        ,TopLevel::fromOptDouble($obj->{'optDouble'})
         ,TopLevel::fromOptString($obj->{'optString'})
-        ,TopLevel::fromReqZeroMin($obj->{'reqZeroMin'})
+        ,TopLevel::fromOptPattern($obj->{'optPattern'})
         );
     }
 
@@ -346,11 +346,11 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleOptDouble()
+         TopLevel::sampleReqZeroMin()
         ,TopLevel::sampleOptInt()
-        ,TopLevel::sampleOptPattern()
+        ,TopLevel::sampleOptDouble()
         ,TopLevel::sampleOptString()
-        ,TopLevel::sampleReqZeroMin()
+        ,TopLevel::sampleOptPattern()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/optional-date-time.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/optional-date-time.schema/default/TopLevel.php
index ab1b49c..00386d4 100644
--- a/base/schema-php/test/inputs/schema/optional-date-time.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/optional-date-time.schema/default/TopLevel.php
@@ -4,354 +4,354 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private ?string $optionalDate; // json:optional-date Optional
-    private ?DateTime $optionalDateTime; // json:optional-date-time Optional
-    private ?string $optionalTime; // json:optional-time Optional
     private string $requiredDate; // json:required-date Required
-    private DateTime $requiredDateTime; // json:required-date-time Required
     private string $requiredTime; // json:required-time Required
+    private DateTime $requiredDateTime; // json:required-date-time Required
+    private ?string $optionalDate; // json:optional-date Optional
+    private ?string $optionalTime; // json:optional-time Optional
+    private ?DateTime $optionalDateTime; // json:optional-date-time Optional
 
     /**
-     * @param string|null $optionalDate
-     * @param DateTime|null $optionalDateTime
-     * @param string|null $optionalTime
      * @param string $requiredDate
-     * @param DateTime $requiredDateTime
      * @param string $requiredTime
+     * @param DateTime $requiredDateTime
+     * @param string|null $optionalDate
+     * @param string|null $optionalTime
+     * @param DateTime|null $optionalDateTime
      */
-    public function __construct(?string $optionalDate, ?DateTime $optionalDateTime, ?string $optionalTime, string $requiredDate, DateTime $requiredDateTime, string $requiredTime) {
-        $this->optionalDate = $optionalDate;
-        $this->optionalDateTime = $optionalDateTime;
-        $this->optionalTime = $optionalTime;
+    public function __construct(string $requiredDate, string $requiredTime, DateTime $requiredDateTime, ?string $optionalDate, ?string $optionalTime, ?DateTime $optionalDateTime) {
         $this->requiredDate = $requiredDate;
-        $this->requiredDateTime = $requiredDateTime;
         $this->requiredTime = $requiredTime;
+        $this->requiredDateTime = $requiredDateTime;
+        $this->optionalDate = $optionalDate;
+        $this->optionalTime = $optionalTime;
+        $this->optionalDateTime = $optionalDateTime;
     }
 
     /**
-     * @param ?string $value
+     * @param string $value
      * @throws Exception
-     * @return ?string
+     * @return string
      */
-    public static function fromOptionalDate(?string $value): ?string {
-        if (!is_null($value)) {
-            return $value; /*string*/
-        } else {
-            return  null;
-        }
+    public static function fromRequiredDate(string $value): string {
+        return $value; /*string*/
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return string
      */
-    public function toOptionalDate(): ?string {
-        if (TopLevel::validateOptionalDate($this->optionalDate))  {
-            if (!is_null($this->optionalDate)) {
-                return $this->optionalDate; /*string*/
-            } else {
-                return  null;
-            }
+    public function toRequiredDate(): string {
+        if (TopLevel::validateRequiredDate($this->requiredDate))  {
+            return $this->requiredDate; /*string*/
         }
-        throw new Exception('never get to this TopLevel::optionalDate');
+        throw new Exception('never get to this TopLevel::requiredDate');
     }
 
     /**
-     * @param string|null
+     * @param string
      * @return bool
      * @throws Exception
      */
-    public static function validateOptionalDate(?string $value): bool {
-        if (!is_null($value)) {
-        }
+    public static function validateRequiredDate(string $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return string
      */
-    public function getOptionalDate(): ?string {
-        if (TopLevel::validateOptionalDate($this->optionalDate))  {
-            return $this->optionalDate;
+    public function getRequiredDate(): string {
+        if (TopLevel::validateRequiredDate($this->requiredDate))  {
+            return $this->requiredDate;
         }
-        throw new Exception('never get to getOptionalDate TopLevel::optionalDate');
+        throw new Exception('never get to getRequiredDate TopLevel::requiredDate');
     }
 
     /**
-     * @return ?string
+     * @return string
      */
-    public static function sampleOptionalDate(): ?string {
-        return 'TopLevel::optionalDate::31'; /*31:optionalDate*/
+    public static function sampleRequiredDate(): string {
+        return 'TopLevel::requiredDate::31'; /*31:requiredDate*/
     }
 
     /**
-     * @param ?string $value
+     * @param string $value
      * @throws Exception
-     * @return ?DateTime
+     * @return string
      */
-    public static function fromOptionalDateTime(?string $value): ?DateTime {
-        if (!is_null($value)) {
-            $tmp = DateTime::createFromFormat(DateTimeInterface::ISO8601, $value);
-            if (!is_a($tmp, 'DateTime')) {
-                throw new Exception('Attribute Error:TopLevel::');
-            }
-            return $tmp;
-        } else {
-            return  null;
-        }
+    public static function fromRequiredTime(string $value): string {
+        return $value; /*string*/
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return string
      */
-    public function toOptionalDateTime(): ?string {
-        if (TopLevel::validateOptionalDateTime($this->optionalDateTime))  {
-            if (!is_null($this->optionalDateTime)) {
-                return $this->optionalDateTime->format(DateTimeInterface::ISO8601);
-            } else {
-                return  null;
-            }
+    public function toRequiredTime(): string {
+        if (TopLevel::validateRequiredTime($this->requiredTime))  {
+            return $this->requiredTime; /*string*/
         }
-        throw new Exception('never get to this TopLevel::optionalDateTime');
+        throw new Exception('never get to this TopLevel::requiredTime');
     }
 
     /**
-     * @param DateTime|null
+     * @param string
      * @return bool
      * @throws Exception
      */
-    public static function validateOptionalDateTime(?DateTime $value): bool {
-        if (!is_null($value)) {
-            if (!is_a($value, 'DateTime')) {
-                throw new Exception('Attribute Error:TopLevel::optionalDateTime');
-            }
-        }
+    public static function validateRequiredTime(string $value): bool {
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?DateTime
+     * @return string
      */
-    public function getOptionalDateTime(): ?DateTime {
-        if (TopLevel::validateOptionalDateTime($this->optionalDateTime))  {
-            return $this->optionalDateTime;
+    public function getRequiredTime(): string {
+        if (TopLevel::validateRequiredTime($this->requiredTime))  {
+            return $this->requiredTime;
         }
-        throw new Exception('never get to getOptionalDateTime TopLevel::optionalDateTime');
+        throw new Exception('never get to getRequiredTime TopLevel::requiredTime');
     }
 
     /**
-     * @return ?DateTime
+     * @return string
      */
-    public static function sampleOptionalDateTime(): ?DateTime {
-        return DateTime::createFromFormat(DateTimeInterface::ISO8601, '2020-12-20T12:20:20+00:00');
+    public static function sampleRequiredTime(): string {
+        return 'TopLevel::requiredTime::32'; /*32:requiredTime*/
     }
 
     /**
-     * @param ?string $value
+     * @param string $value
      * @throws Exception
-     * @return ?string
+     * @return DateTime
      */
-    public static function fromOptionalTime(?string $value): ?string {
-        if (!is_null($value)) {
-            return $value; /*string*/
-        } else {
-            return  null;
+    public static function fromRequiredDateTime(string $value): DateTime {
+        $tmp = DateTime::createFromFormat(DateTimeInterface::ISO8601, $value);
+        if (!is_a($tmp, 'DateTime')) {
+            throw new Exception('Attribute Error:TopLevel::');
         }
+        return $tmp;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return string
      */
-    public function toOptionalTime(): ?string {
-        if (TopLevel::validateOptionalTime($this->optionalTime))  {
-            if (!is_null($this->optionalTime)) {
-                return $this->optionalTime; /*string*/
-            } else {
-                return  null;
-            }
+    public function toRequiredDateTime(): string {
+        if (TopLevel::validateRequiredDateTime($this->requiredDateTime))  {
+            return $this->requiredDateTime->format(DateTimeInterface::ISO8601);
         }
-        throw new Exception('never get to this TopLevel::optionalTime');
+        throw new Exception('never get to this TopLevel::requiredDateTime');
     }
 
     /**
-     * @param string|null
+     * @param DateTime
      * @return bool
      * @throws Exception
      */
-    public static function validateOptionalTime(?string $value): bool {
-        if (!is_null($value)) {
+    public static function validateRequiredDateTime(DateTime $value): bool {
+        if (!is_a($value, 'DateTime')) {
+            throw new Exception('Attribute Error:TopLevel::requiredDateTime');
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return DateTime
      */
-    public function getOptionalTime(): ?string {
-        if (TopLevel::validateOptionalTime($this->optionalTime))  {
-            return $this->optionalTime;
+    public function getRequiredDateTime(): DateTime {
+        if (TopLevel::validateRequiredDateTime($this->requiredDateTime))  {
+            return $this->requiredDateTime;
         }
-        throw new Exception('never get to getOptionalTime TopLevel::optionalTime');
+        throw new Exception('never get to getRequiredDateTime TopLevel::requiredDateTime');
     }
 
     /**
-     * @return ?string
+     * @return DateTime
      */
-    public static function sampleOptionalTime(): ?string {
-        return 'TopLevel::optionalTime::33'; /*33:optionalTime*/
+    public static function sampleRequiredDateTime(): DateTime {
+        return DateTime::createFromFormat(DateTimeInterface::ISO8601, '2020-12-30T12:30:30+00:00');
     }
 
     /**
-     * @param string $value
+     * @param ?string $value
      * @throws Exception
-     * @return string
+     * @return ?string
      */
-    public static function fromRequiredDate(string $value): string {
-        return $value; /*string*/
+    public static function fromOptionalDate(?string $value): ?string {
+        if (!is_null($value)) {
+            return $value; /*string*/
+        } else {
+            return  null;
+        }
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?string
      */
-    public function toRequiredDate(): string {
-        if (TopLevel::validateRequiredDate($this->requiredDate))  {
-            return $this->requiredDate; /*string*/
+    public function toOptionalDate(): ?string {
+        if (TopLevel::validateOptionalDate($this->optionalDate))  {
+            if (!is_null($this->optionalDate)) {
+                return $this->optionalDate; /*string*/
+            } else {
+                return  null;
+            }
         }
-        throw new Exception('never get to this TopLevel::requiredDate');
+        throw new Exception('never get to this TopLevel::optionalDate');
     }
 
     /**
-     * @param string
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateRequiredDate(string $value): bool {
+    public static function validateOptionalDate(?string $value): bool {
+        if (!is_null($value)) {
+        }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?string
      */
-    public function getRequiredDate(): string {
-        if (TopLevel::validateRequiredDate($this->requiredDate))  {
-            return $this->requiredDate;
+    public function getOptionalDate(): ?string {
+        if (TopLevel::validateOptionalDate($this->optionalDate))  {
+            return $this->optionalDate;
         }
-        throw new Exception('never get to getRequiredDate TopLevel::requiredDate');
+        throw new Exception('never get to getOptionalDate TopLevel::optionalDate');
     }
 
     /**
-     * @return string
+     * @return ?string
      */
-    public static function sampleRequiredDate(): string {
-        return 'TopLevel::requiredDate::34'; /*34:requiredDate*/
+    public static function sampleOptionalDate(): ?string {
+        return 'TopLevel::optionalDate::34'; /*34:optionalDate*/
     }
 
     /**
-     * @param string $value
+     * @param ?string $value
      * @throws Exception
-     * @return DateTime
+     * @return ?string
      */
-    public static function fromRequiredDateTime(string $value): DateTime {
-        $tmp = DateTime::createFromFormat(DateTimeInterface::ISO8601, $value);
-        if (!is_a($tmp, 'DateTime')) {
-            throw new Exception('Attribute Error:TopLevel::');
+    public static function fromOptionalTime(?string $value): ?string {
+        if (!is_null($value)) {
+            return $value; /*string*/
+        } else {
+            return  null;
         }
-        return $tmp;
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?string
      */
-    public function toRequiredDateTime(): string {
-        if (TopLevel::validateRequiredDateTime($this->requiredDateTime))  {
-            return $this->requiredDateTime->format(DateTimeInterface::ISO8601);
+    public function toOptionalTime(): ?string {
+        if (TopLevel::validateOptionalTime($this->optionalTime))  {
+            if (!is_null($this->optionalTime)) {
+                return $this->optionalTime; /*string*/
+            } else {
+                return  null;
+            }
         }
-        throw new Exception('never get to this TopLevel::requiredDateTime');
+        throw new Exception('never get to this TopLevel::optionalTime');
     }
 
     /**
-     * @param DateTime
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateRequiredDateTime(DateTime $value): bool {
-        if (!is_a($value, 'DateTime')) {
-            throw new Exception('Attribute Error:TopLevel::requiredDateTime');
+    public static function validateOptionalTime(?string $value): bool {
+        if (!is_null($value)) {
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return DateTime
+     * @return ?string
      */
-    public function getRequiredDateTime(): DateTime {
-        if (TopLevel::validateRequiredDateTime($this->requiredDateTime))  {
-            return $this->requiredDateTime;
+    public function getOptionalTime(): ?string {
+        if (TopLevel::validateOptionalTime($this->optionalTime))  {
+            return $this->optionalTime;
         }
-        throw new Exception('never get to getRequiredDateTime TopLevel::requiredDateTime');
+        throw new Exception('never get to getOptionalTime TopLevel::optionalTime');
     }
 
     /**
-     * @return DateTime
+     * @return ?string
      */
-    public static function sampleRequiredDateTime(): DateTime {
-        return DateTime::createFromFormat(DateTimeInterface::ISO8601, '2020-12-50T12:50:50+00:00');
+    public static function sampleOptionalTime(): ?string {
+        return 'TopLevel::optionalTime::35'; /*35:optionalTime*/
     }
 
     /**
-     * @param string $value
+     * @param ?string $value
      * @throws Exception
-     * @return string
+     * @return ?DateTime
      */
-    public static function fromRequiredTime(string $value): string {
-        return $value; /*string*/
+    public static function fromOptionalDateTime(?string $value): ?DateTime {
+        if (!is_null($value)) {
+            $tmp = DateTime::createFromFormat(DateTimeInterface::ISO8601, $value);
+            if (!is_a($tmp, 'DateTime')) {
+                throw new Exception('Attribute Error:TopLevel::');
+            }
+            return $tmp;
+        } else {
+            return  null;
+        }
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?string
      */
-    public function toRequiredTime(): string {
-        if (TopLevel::validateRequiredTime($this->requiredTime))  {
-            return $this->requiredTime; /*string*/
+    public function toOptionalDateTime(): ?string {
+        if (TopLevel::validateOptionalDateTime($this->optionalDateTime))  {
+            if (!is_null($this->optionalDateTime)) {
+                return $this->optionalDateTime->format(DateTimeInterface::ISO8601);
+            } else {
+                return  null;
+            }
         }
-        throw new Exception('never get to this TopLevel::requiredTime');
+        throw new Exception('never get to this TopLevel::optionalDateTime');
     }
 
     /**
-     * @param string
+     * @param DateTime|null
      * @return bool
      * @throws Exception
      */
-    public static function validateRequiredTime(string $value): bool {
+    public static function validateOptionalDateTime(?DateTime $value): bool {
+        if (!is_null($value)) {
+            if (!is_a($value, 'DateTime')) {
+                throw new Exception('Attribute Error:TopLevel::optionalDateTime');
+            }
+        }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?DateTime
      */
-    public function getRequiredTime(): string {
-        if (TopLevel::validateRequiredTime($this->requiredTime))  {
-            return $this->requiredTime;
+    public function getOptionalDateTime(): ?DateTime {
+        if (TopLevel::validateOptionalDateTime($this->optionalDateTime))  {
+            return $this->optionalDateTime;
         }
-        throw new Exception('never get to getRequiredTime TopLevel::requiredTime');
+        throw new Exception('never get to getOptionalDateTime TopLevel::optionalDateTime');
     }
 
     /**
-     * @return string
+     * @return ?DateTime
      */
-    public static function sampleRequiredTime(): string {
-        return 'TopLevel::requiredTime::36'; /*36:requiredTime*/
+    public static function sampleOptionalDateTime(): ?DateTime {
+        return DateTime::createFromFormat(DateTimeInterface::ISO8601, '2020-12-60T12:60:60+00:00');
     }
 
     /**
@@ -359,12 +359,12 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateOptionalDate($this->optionalDate)
-        || TopLevel::validateOptionalDateTime($this->optionalDateTime)
-        || TopLevel::validateOptionalTime($this->optionalTime)
-        || TopLevel::validateRequiredDate($this->requiredDate)
+        return TopLevel::validateRequiredDate($this->requiredDate)
+        || TopLevel::validateRequiredTime($this->requiredTime)
         || TopLevel::validateRequiredDateTime($this->requiredDateTime)
-        || TopLevel::validateRequiredTime($this->requiredTime);
+        || TopLevel::validateOptionalDate($this->optionalDate)
+        || TopLevel::validateOptionalTime($this->optionalTime)
+        || TopLevel::validateOptionalDateTime($this->optionalDateTime);
     }
 
     /**
@@ -373,12 +373,12 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'optional-date'} = $this->toOptionalDate();
-        $out->{'optional-date-time'} = $this->toOptionalDateTime();
-        $out->{'optional-time'} = $this->toOptionalTime();
         $out->{'required-date'} = $this->toRequiredDate();
-        $out->{'required-date-time'} = $this->toRequiredDateTime();
         $out->{'required-time'} = $this->toRequiredTime();
+        $out->{'required-date-time'} = $this->toRequiredDateTime();
+        $out->{'optional-date'} = $this->toOptionalDate();
+        $out->{'optional-time'} = $this->toOptionalTime();
+        $out->{'optional-date-time'} = $this->toOptionalDateTime();
         return $out;
     }
 
@@ -389,12 +389,12 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromOptionalDate($obj->{'optional-date'})
-        ,TopLevel::fromOptionalDateTime($obj->{'optional-date-time'})
-        ,TopLevel::fromOptionalTime($obj->{'optional-time'})
-        ,TopLevel::fromRequiredDate($obj->{'required-date'})
-        ,TopLevel::fromRequiredDateTime($obj->{'required-date-time'})
+         TopLevel::fromRequiredDate($obj->{'required-date'})
         ,TopLevel::fromRequiredTime($obj->{'required-time'})
+        ,TopLevel::fromRequiredDateTime($obj->{'required-date-time'})
+        ,TopLevel::fromOptionalDate($obj->{'optional-date'})
+        ,TopLevel::fromOptionalTime($obj->{'optional-time'})
+        ,TopLevel::fromOptionalDateTime($obj->{'optional-date-time'})
         );
     }
 
@@ -403,12 +403,12 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleOptionalDate()
-        ,TopLevel::sampleOptionalDateTime()
-        ,TopLevel::sampleOptionalTime()
-        ,TopLevel::sampleRequiredDate()
-        ,TopLevel::sampleRequiredDateTime()
+         TopLevel::sampleRequiredDate()
         ,TopLevel::sampleRequiredTime()
+        ,TopLevel::sampleRequiredDateTime()
+        ,TopLevel::sampleOptionalDate()
+        ,TopLevel::sampleOptionalTime()
+        ,TopLevel::sampleOptionalDateTime()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/prefix-items.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/prefix-items.schema/default/TopLevel.php
index 10ff733..de4c7bb 100644
--- a/base/schema-php/test/inputs/schema/prefix-items.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/prefix-items.schema/default/TopLevel.php
@@ -4,16 +4,16 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private array $open; // json:open Required
     private array $tuple; // json:tuple Required
+    private array $open; // json:open Required
 
     /**
-     * @param array $open
      * @param array $tuple
+     * @param array $open
      */
-    public function __construct(array $open, array $tuple) {
-        $this->open = $open;
+    public function __construct(array $tuple, array $open) {
         $this->tuple = $tuple;
+        $this->open = $open;
     }
 
     /**
@@ -21,7 +21,7 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public static function fromOpen(array $value): array {
+    public static function fromTuple(array $value): array {
         return  array_map(function ($value) {
             if (is_bool($value)) {
                 return $value; /*bool*/
@@ -37,8 +37,8 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function toOpen(): array {
-        if (TopLevel::validateOpen($this->open))  {
+    public function toTuple(): array {
+        if (TopLevel::validateTuple($this->tuple))  {
             return array_map(function ($value) {
                 if (is_bool($value)) {
                     return $value; /*bool*/
@@ -47,9 +47,9 @@ class TopLevel {
                 } else {
                     throw new Exception('Union value has no matching member in TopLevel');
                 }
-            }, $this->open);
+            }, $this->tuple);
         }
-        throw new Exception('never get to this TopLevel::open');
+        throw new Exception('never get to this TopLevel::tuple');
     }
 
     /**
@@ -57,21 +57,21 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateOpen(array $value): bool {
+    public static function validateTuple(array $value): bool {
         if (!is_array($value)) {
-            throw new Exception("Attribute Error:TopLevel::open");
+            throw new Exception("Attribute Error:TopLevel::tuple");
         }
         array_walk($value, function($value_v) {
             if (is_bool($value_v)) {
                 if (!is_bool($value_v)) {
-                    throw new Exception("Attribute Error:TopLevel::open");
+                    throw new Exception("Attribute Error:TopLevel::tuple");
                 }
             } elseif (is_int($value_v)) {
                 if (!is_integer($value_v)) {
-                    throw new Exception("Attribute Error:TopLevel::open");
+                    throw new Exception("Attribute Error:TopLevel::tuple");
                 }
             } else {
-                throw new Exception("Attribute Error:TopLevel::open");
+                throw new Exception("Attribute Error:TopLevel::tuple");
             }
         });
         return true;
@@ -81,20 +81,20 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function getOpen(): array {
-        if (TopLevel::validateOpen($this->open))  {
-            return $this->open;
+    public function getTuple(): array {
+        if (TopLevel::validateTuple($this->tuple))  {
+            return $this->tuple;
         }
-        throw new Exception('never get to getOpen TopLevel::open');
+        throw new Exception('never get to getTuple TopLevel::tuple');
     }
 
     /**
      * @return array
      */
-    public static function sampleOpen(): array {
+    public static function sampleTuple(): array {
         return  array(
             true /*31:*/
-        ); /* 31:open*/
+        ); /* 31:tuple*/
     }
 
     /**
@@ -102,7 +102,7 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public static function fromTuple(array $value): array {
+    public static function fromOpen(array $value): array {
         return  array_map(function ($value) {
             if (is_bool($value)) {
                 return $value; /*bool*/
@@ -118,8 +118,8 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function toTuple(): array {
-        if (TopLevel::validateTuple($this->tuple))  {
+    public function toOpen(): array {
+        if (TopLevel::validateOpen($this->open))  {
             return array_map(function ($value) {
                 if (is_bool($value)) {
                     return $value; /*bool*/
@@ -128,9 +128,9 @@ class TopLevel {
                 } else {
                     throw new Exception('Union value has no matching member in TopLevel');
                 }
-            }, $this->tuple);
+            }, $this->open);
         }
-        throw new Exception('never get to this TopLevel::tuple');
+        throw new Exception('never get to this TopLevel::open');
     }
 
     /**
@@ -138,21 +138,21 @@ class TopLevel {
      * @return bool
      * @throws Exception
      */
-    public static function validateTuple(array $value): bool {
+    public static function validateOpen(array $value): bool {
         if (!is_array($value)) {
-            throw new Exception("Attribute Error:TopLevel::tuple");
+            throw new Exception("Attribute Error:TopLevel::open");
         }
         array_walk($value, function($value_v) {
             if (is_bool($value_v)) {
                 if (!is_bool($value_v)) {
-                    throw new Exception("Attribute Error:TopLevel::tuple");
+                    throw new Exception("Attribute Error:TopLevel::open");
                 }
             } elseif (is_int($value_v)) {
                 if (!is_integer($value_v)) {
-                    throw new Exception("Attribute Error:TopLevel::tuple");
+                    throw new Exception("Attribute Error:TopLevel::open");
                 }
             } else {
-                throw new Exception("Attribute Error:TopLevel::tuple");
+                throw new Exception("Attribute Error:TopLevel::open");
             }
         });
         return true;
@@ -162,20 +162,20 @@ class TopLevel {
      * @throws Exception
      * @return array
      */
-    public function getTuple(): array {
-        if (TopLevel::validateTuple($this->tuple))  {
-            return $this->tuple;
+    public function getOpen(): array {
+        if (TopLevel::validateOpen($this->open))  {
+            return $this->open;
         }
-        throw new Exception('never get to getTuple TopLevel::tuple');
+        throw new Exception('never get to getOpen TopLevel::open');
     }
 
     /**
      * @return array
      */
-    public static function sampleTuple(): array {
+    public static function sampleOpen(): array {
         return  array(
             true /*32:*/
-        ); /* 32:tuple*/
+        ); /* 32:open*/
     }
 
     /**
@@ -183,8 +183,8 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateOpen($this->open)
-        || TopLevel::validateTuple($this->tuple);
+        return TopLevel::validateTuple($this->tuple)
+        || TopLevel::validateOpen($this->open);
     }
 
     /**
@@ -193,8 +193,8 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'open'} = $this->toOpen();
         $out->{'tuple'} = $this->toTuple();
+        $out->{'open'} = $this->toOpen();
         return $out;
     }
 
@@ -205,8 +205,8 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromOpen($obj->{'open'})
-        ,TopLevel::fromTuple($obj->{'tuple'})
+         TopLevel::fromTuple($obj->{'tuple'})
+        ,TopLevel::fromOpen($obj->{'open'})
         );
     }
 
@@ -215,8 +215,8 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleOpen()
-        ,TopLevel::sampleTuple()
+         TopLevel::sampleTuple()
+        ,TopLevel::sampleOpen()
         );
     }
 }
diff --git a/head/schema-php/test/inputs/schema/property-order.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/property-order.schema/default/TopLevel.php
new file mode 100644
index 0000000..67faee6
--- /dev/null
+++ b/head/schema-php/test/inputs/schema/property-order.schema/default/TopLevel.php
@@ -0,0 +1,577 @@
+<?php
+declare(strict_types=1);
+
+// This is an autogenerated file:TopLevel
+
+class TopLevel {
+    private string $zebra; // json:zebra Required
+    private float $mango; // json:mango Required
+    private bool $apple; // json:apple Required
+    private string $delta; // json:delta Required
+    private int $banana; // json:banana Required
+    private Ordered $ordered; // json:ordered Required
+
+    /**
+     * @param string $zebra
+     * @param float $mango
+     * @param bool $apple
+     * @param string $delta
+     * @param int $banana
+     * @param Ordered $ordered
+     */
+    public function __construct(string $zebra, float $mango, bool $apple, string $delta, int $banana, Ordered $ordered) {
+        $this->zebra = $zebra;
+        $this->mango = $mango;
+        $this->apple = $apple;
+        $this->delta = $delta;
+        $this->banana = $banana;
+        $this->ordered = $ordered;
+    }
+
+    /**
+     * @param string $value
+     * @throws Exception
+     * @return string
+     */
+    public static function fromZebra(string $value): string {
+        return $value; /*string*/
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function toZebra(): string {
+        if (TopLevel::validateZebra($this->zebra))  {
+            return $this->zebra; /*string*/
+        }
+        throw new Exception('never get to this TopLevel::zebra');
+    }
+
+    /**
+     * @param string
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateZebra(string $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function getZebra(): string {
+        if (TopLevel::validateZebra($this->zebra))  {
+            return $this->zebra;
+        }
+        throw new Exception('never get to getZebra TopLevel::zebra');
+    }
+
+    /**
+     * @return string
+     */
+    public static function sampleZebra(): string {
+        return 'TopLevel::zebra::31'; /*31:zebra*/
+    }
+
+    /**
+     * @param float $value
+     * @throws Exception
+     * @return float
+     */
+    public static function fromMango(float $value): float {
+        return $value; /*float*/
+    }
+
+    /**
+     * @throws Exception
+     * @return float
+     */
+    public function toMango(): float {
+        if (TopLevel::validateMango($this->mango))  {
+            return $this->mango; /*float*/
+        }
+        throw new Exception('never get to this TopLevel::mango');
+    }
+
+    /**
+     * @param float
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateMango(float $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return float
+     */
+    public function getMango(): float {
+        if (TopLevel::validateMango($this->mango))  {
+            return $this->mango;
+        }
+        throw new Exception('never get to getMango TopLevel::mango');
+    }
+
+    /**
+     * @return float
+     */
+    public static function sampleMango(): float {
+        return 32.032; /*32:mango*/
+    }
+
+    /**
+     * @param bool $value
+     * @throws Exception
+     * @return bool
+     */
+    public static function fromApple(bool $value): bool {
+        return $value; /*bool*/
+    }
+
+    /**
+     * @throws Exception
+     * @return bool
+     */
+    public function toApple(): bool {
+        if (TopLevel::validateApple($this->apple))  {
+            return $this->apple; /*bool*/
+        }
+        throw new Exception('never get to this TopLevel::apple');
+    }
+
+    /**
+     * @param bool
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateApple(bool $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return bool
+     */
+    public function getApple(): bool {
+        if (TopLevel::validateApple($this->apple))  {
+            return $this->apple;
+        }
+        throw new Exception('never get to getApple TopLevel::apple');
+    }
+
+    /**
+     * @return bool
+     */
+    public static function sampleApple(): bool {
+        return true; /*33:apple*/
+    }
+
+    /**
+     * @param string $value
+     * @throws Exception
+     * @return string
+     */
+    public static function fromDelta(string $value): string {
+        return $value; /*string*/
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function toDelta(): string {
+        if (TopLevel::validateDelta($this->delta))  {
+            return $this->delta; /*string*/
+        }
+        throw new Exception('never get to this TopLevel::delta');
+    }
+
+    /**
+     * @param string
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateDelta(string $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function getDelta(): string {
+        if (TopLevel::validateDelta($this->delta))  {
+            return $this->delta;
+        }
+        throw new Exception('never get to getDelta TopLevel::delta');
+    }
+
+    /**
+     * @return string
+     */
+    public static function sampleDelta(): string {
+        return 'TopLevel::delta::34'; /*34:delta*/
+    }
+
+    /**
+     * @param int $value
+     * @throws Exception
+     * @return int
+     */
+    public static function fromBanana(int $value): int {
+        return $value; /*int*/
+    }
+
+    /**
+     * @throws Exception
+     * @return int
+     */
+    public function toBanana(): int {
+        if (TopLevel::validateBanana($this->banana))  {
+            return $this->banana; /*int*/
+        }
+        throw new Exception('never get to this TopLevel::banana');
+    }
+
+    /**
+     * @param int
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateBanana(int $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return int
+     */
+    public function getBanana(): int {
+        if (TopLevel::validateBanana($this->banana))  {
+            return $this->banana;
+        }
+        throw new Exception('never get to getBanana TopLevel::banana');
+    }
+
+    /**
+     * @return int
+     */
+    public static function sampleBanana(): int {
+        return 35; /*35:banana*/
+    }
+
+    /**
+     * @param stdClass $value
+     * @throws Exception
+     * @return Ordered
+     */
+    public static function fromOrdered(stdClass $value): Ordered {
+        return Ordered::from($value); /*class*/
+    }
+
+    /**
+     * @throws Exception
+     * @return stdClass
+     */
+    public function toOrdered(): stdClass {
+        if (TopLevel::validateOrdered($this->ordered))  {
+            return $this->ordered->to(); /*class*/
+        }
+        throw new Exception('never get to this TopLevel::ordered');
+    }
+
+    /**
+     * @param Ordered
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateOrdered(Ordered $value): bool {
+        $value->validate();
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return Ordered
+     */
+    public function getOrdered(): Ordered {
+        if (TopLevel::validateOrdered($this->ordered))  {
+            return $this->ordered;
+        }
+        throw new Exception('never get to getOrdered TopLevel::ordered');
+    }
+
+    /**
+     * @return Ordered
+     */
+    public static function sampleOrdered(): Ordered {
+        return Ordered::sample(); /*36:ordered*/
+    }
+
+    /**
+     * @throws Exception
+     * @return bool
+     */
+    public function validate(): bool {
+        return TopLevel::validateZebra($this->zebra)
+        || TopLevel::validateMango($this->mango)
+        || TopLevel::validateApple($this->apple)
+        || TopLevel::validateDelta($this->delta)
+        || TopLevel::validateBanana($this->banana)
+        || TopLevel::validateOrdered($this->ordered);
+    }
+
+    /**
+     * @return stdClass
+     * @throws Exception
+     */
+    public function to(): stdClass  {
+        $out = new stdClass();
+        $out->{'zebra'} = $this->toZebra();
+        $out->{'mango'} = $this->toMango();
+        $out->{'apple'} = $this->toApple();
+        $out->{'delta'} = $this->toDelta();
+        $out->{'banana'} = $this->toBanana();
+        $out->{'ordered'} = $this->toOrdered();
+        return $out;
+    }
+
+    /**
+     * @param stdClass $obj
+     * @return TopLevel
+     * @throws Exception
+     */
+    public static function from(stdClass $obj): TopLevel {
+        return new TopLevel(
+         TopLevel::fromZebra($obj->{'zebra'})
+        ,TopLevel::fromMango($obj->{'mango'})
+        ,TopLevel::fromApple($obj->{'apple'})
+        ,TopLevel::fromDelta($obj->{'delta'})
+        ,TopLevel::fromBanana($obj->{'banana'})
+        ,TopLevel::fromOrdered($obj->{'ordered'})
+        );
+    }
+
+    /**
+     * @return TopLevel
+     */
+    public static function sample(): TopLevel {
+        return new TopLevel(
+         TopLevel::sampleZebra()
+        ,TopLevel::sampleMango()
+        ,TopLevel::sampleApple()
+        ,TopLevel::sampleDelta()
+        ,TopLevel::sampleBanana()
+        ,TopLevel::sampleOrdered()
+        );
+    }
+}
+
+// This is an autogenerated file:Ordered
+
+class Ordered {
+    private float $mango; // json:mango Required
+    private string $zebra; // json:zebra Required
+    private bool $apple; // json:apple Required
+
+    /**
+     * @param float $mango
+     * @param string $zebra
+     * @param bool $apple
+     */
+    public function __construct(float $mango, string $zebra, bool $apple) {
+        $this->mango = $mango;
+        $this->zebra = $zebra;
+        $this->apple = $apple;
+    }
+
+    /**
+     * @param float $value
+     * @throws Exception
+     * @return float
+     */
+    public static function fromMango(float $value): float {
+        return $value; /*float*/
+    }
+
+    /**
+     * @throws Exception
+     * @return float
+     */
+    public function toMango(): float {
+        if (Ordered::validateMango($this->mango))  {
+            return $this->mango; /*float*/
+        }
+        throw new Exception('never get to this Ordered::mango');
+    }
+
+    /**
+     * @param float
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateMango(float $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return float
+     */
+    public function getMango(): float {
+        if (Ordered::validateMango($this->mango))  {
+            return $this->mango;
+        }
+        throw new Exception('never get to getMango Ordered::mango');
+    }
+
+    /**
+     * @return float
+     */
+    public static function sampleMango(): float {
+        return 31.031; /*31:mango*/
+    }
+
+    /**
+     * @param string $value
+     * @throws Exception
+     * @return string
+     */
+    public static function fromZebra(string $value): string {
+        return $value; /*string*/
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function toZebra(): string {
+        if (Ordered::validateZebra($this->zebra))  {
+            return $this->zebra; /*string*/
+        }
+        throw new Exception('never get to this Ordered::zebra');
+    }
+
+    /**
+     * @param string
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateZebra(string $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function getZebra(): string {
+        if (Ordered::validateZebra($this->zebra))  {
+            return $this->zebra;
+        }
+        throw new Exception('never get to getZebra Ordered::zebra');
+    }
+
+    /**
+     * @return string
+     */
+    public static function sampleZebra(): string {
+        return 'Ordered::zebra::32'; /*32:zebra*/
+    }
+
+    /**
+     * @param bool $value
+     * @throws Exception
+     * @return bool
+     */
+    public static function fromApple(bool $value): bool {
+        return $value; /*bool*/
+    }
+
+    /**
+     * @throws Exception
+     * @return bool
+     */
+    public function toApple(): bool {
+        if (Ordered::validateApple($this->apple))  {
+            return $this->apple; /*bool*/
+        }
+        throw new Exception('never get to this Ordered::apple');
+    }
+
+    /**
+     * @param bool
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateApple(bool $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return bool
+     */
+    public function getApple(): bool {
+        if (Ordered::validateApple($this->apple))  {
+            return $this->apple;
+        }
+        throw new Exception('never get to getApple Ordered::apple');
+    }
+
+    /**
+     * @return bool
+     */
+    public static function sampleApple(): bool {
+        return true; /*33:apple*/
+    }
+
+    /**
+     * @throws Exception
+     * @return bool
+     */
+    public function validate(): bool {
+        return Ordered::validateMango($this->mango)
+        || Ordered::validateZebra($this->zebra)
+        || Ordered::validateApple($this->apple);
+    }
+
+    /**
+     * @return stdClass
+     * @throws Exception
+     */
+    public function to(): stdClass  {
+        $out = new stdClass();
+        $out->{'mango'} = $this->toMango();
+        $out->{'zebra'} = $this->toZebra();
+        $out->{'apple'} = $this->toApple();
+        return $out;
+    }
+
+    /**
+     * @param stdClass $obj
+     * @return Ordered
+     * @throws Exception
+     */
+    public static function from(stdClass $obj): Ordered {
+        return new Ordered(
+         Ordered::fromMango($obj->{'mango'})
+        ,Ordered::fromZebra($obj->{'zebra'})
+        ,Ordered::fromApple($obj->{'apple'})
+        );
+    }
+
+    /**
+     * @return Ordered
+     */
+    public static function sample(): Ordered {
+        return new Ordered(
+         Ordered::sampleMango()
+        ,Ordered::sampleZebra()
+        ,Ordered::sampleApple()
+        );
+    }
+}
diff --git a/base/schema-php/test/inputs/schema/renaming-bug.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/renaming-bug.schema/default/TopLevel.php
index d18de9e..c1bebd4 100644
--- a/base/schema-php/test/inputs/schema/renaming-bug.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/renaming-bug.schema/default/TopLevel.php
@@ -265,18 +265,18 @@ class TopLevel {
 
 class Fruit {
     private ?bool $apple; // json:apple Optional
-    private ?array $berries; // json:berries Optional
     private ?bool $orange; // json:orange Optional
+    private ?array $berries; // json:berries Optional
 
     /**
      * @param bool|null $apple
-     * @param array|null $berries
      * @param bool|null $orange
+     * @param array|null $berries
      */
-    public function __construct(?bool $apple, ?array $berries, ?bool $orange) {
+    public function __construct(?bool $apple, ?bool $orange, ?array $berries) {
         $this->apple = $apple;
-        $this->berries = $berries;
         $this->orange = $orange;
+        $this->berries = $berries;
     }
 
     /**
@@ -337,15 +337,13 @@ class Fruit {
     }
 
     /**
-     * @param ?array $value
+     * @param ?bool $value
      * @throws Exception
-     * @return ?array
+     * @return ?bool
      */
-    public static function fromBerries(?array $value): ?array {
+    public static function fromOrange(?bool $value): ?bool {
         if (!is_null($value)) {
-            return  array_map(function ($value) {
-                return Berry::from($value); /*class*/
-            }, $value);
+            return $value; /*bool*/
         } else {
             return  null;
         }
@@ -353,66 +351,58 @@ class Fruit {
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return ?bool
      */
-    public function toBerries(): ?array {
-        if (Fruit::validateBerries($this->berries))  {
-            if (!is_null($this->berries)) {
-                return array_map(function ($value) {
-                    return $value->to(); /*class*/
-                }, $this->berries);
+    public function toOrange(): ?bool {
+        if (Fruit::validateOrange($this->orange))  {
+            if (!is_null($this->orange)) {
+                return $this->orange; /*bool*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Fruit::berries');
+        throw new Exception('never get to this Fruit::orange');
     }
 
     /**
-     * @param array|null
+     * @param bool|null
      * @return bool
      * @throws Exception
      */
-    public static function validateBerries(?array $value): bool {
+    public static function validateOrange(?bool $value): bool {
         if (!is_null($value)) {
-            if (!is_array($value)) {
-                throw new Exception("Attribute Error:Fruit::berries");
-            }
-            array_walk($value, function($value_v) {
-                $value_v->validate();
-            });
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return ?bool
      */
-    public function getBerries(): ?array {
-        if (Fruit::validateBerries($this->berries))  {
-            return $this->berries;
+    public function getOrange(): ?bool {
+        if (Fruit::validateOrange($this->orange))  {
+            return $this->orange;
         }
-        throw new Exception('never get to getBerries Fruit::berries');
+        throw new Exception('never get to getOrange Fruit::orange');
     }
 
     /**
-     * @return ?array
+     * @return ?bool
      */
-    public static function sampleBerries(): ?array {
-        return  array(
-            Berry::sample() /*32:*/
-        ); /* 32:berries*/
+    public static function sampleOrange(): ?bool {
+        return true; /*32:orange*/
     }
 
     /**
-     * @param ?bool $value
+     * @param ?array $value
      * @throws Exception
-     * @return ?bool
+     * @return ?array
      */
-    public static function fromOrange(?bool $value): ?bool {
+    public static function fromBerries(?array $value): ?array {
         if (!is_null($value)) {
-            return $value; /*bool*/
+            return  array_map(function ($value) {
+                return Berry::from($value); /*class*/
+            }, $value);
         } else {
             return  null;
         }
@@ -420,46 +410,56 @@ class Fruit {
 
     /**
      * @throws Exception
-     * @return ?bool
+     * @return ?array
      */
-    public function toOrange(): ?bool {
-        if (Fruit::validateOrange($this->orange))  {
-            if (!is_null($this->orange)) {
-                return $this->orange; /*bool*/
+    public function toBerries(): ?array {
+        if (Fruit::validateBerries($this->berries))  {
+            if (!is_null($this->berries)) {
+                return array_map(function ($value) {
+                    return $value->to(); /*class*/
+                }, $this->berries);
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Fruit::orange');
+        throw new Exception('never get to this Fruit::berries');
     }
 
     /**
-     * @param bool|null
+     * @param array|null
      * @return bool
      * @throws Exception
      */
-    public static function validateOrange(?bool $value): bool {
+    public static function validateBerries(?array $value): bool {
         if (!is_null($value)) {
+            if (!is_array($value)) {
+                throw new Exception("Attribute Error:Fruit::berries");
+            }
+            array_walk($value, function($value_v) {
+                $value_v->validate();
+            });
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?bool
+     * @return ?array
      */
-    public function getOrange(): ?bool {
-        if (Fruit::validateOrange($this->orange))  {
-            return $this->orange;
+    public function getBerries(): ?array {
+        if (Fruit::validateBerries($this->berries))  {
+            return $this->berries;
         }
-        throw new Exception('never get to getOrange Fruit::orange');
+        throw new Exception('never get to getBerries Fruit::berries');
     }
 
     /**
-     * @return ?bool
+     * @return ?array
      */
-    public static function sampleOrange(): ?bool {
-        return true; /*33:orange*/
+    public static function sampleBerries(): ?array {
+        return  array(
+            Berry::sample() /*33:*/
+        ); /* 33:berries*/
     }
 
     /**
@@ -468,8 +468,8 @@ class Fruit {
      */
     public function validate(): bool {
         return Fruit::validateApple($this->apple)
-        || Fruit::validateBerries($this->berries)
-        || Fruit::validateOrange($this->orange);
+        || Fruit::validateOrange($this->orange)
+        || Fruit::validateBerries($this->berries);
     }
 
     /**
@@ -479,8 +479,8 @@ class Fruit {
     public function to(): stdClass  {
         $out = new stdClass();
         $out->{'apple'} = $this->toApple();
-        $out->{'berries'} = $this->toBerries();
         $out->{'orange'} = $this->toOrange();
+        $out->{'berries'} = $this->toBerries();
         return $out;
     }
 
@@ -492,8 +492,8 @@ class Fruit {
     public static function from(stdClass $obj): Fruit {
         return new Fruit(
          Fruit::fromApple($obj->{'apple'})
-        ,Fruit::fromBerries($obj->{'berries'})
         ,Fruit::fromOrange($obj->{'orange'})
+        ,Fruit::fromBerries($obj->{'berries'})
         );
     }
 
@@ -503,8 +503,8 @@ class Fruit {
     public static function sample(): Fruit {
         return new Fruit(
          Fruit::sampleApple()
-        ,Fruit::sampleBerries()
         ,Fruit::sampleOrange()
+        ,Fruit::sampleBerries()
         );
     }
 }
@@ -512,29 +512,29 @@ class Fruit {
 // This is an autogenerated file:Berry
 
 class Berry {
-    private ?Color $color; // json:color Optional
     private ?string $name; // json:name Optional
+    private ?Color $color; // json:color Optional
     private ?array $shapes; // json:shapes Optional
 
     /**
-     * @param Color|null $color
      * @param string|null $name
+     * @param Color|null $color
      * @param array|null $shapes
      */
-    public function __construct(?Color $color, ?string $name, ?array $shapes) {
-        $this->color = $color;
+    public function __construct(?string $name, ?Color $color, ?array $shapes) {
         $this->name = $name;
+        $this->color = $color;
         $this->shapes = $shapes;
     }
 
     /**
-     * @param ?stdClass $value
+     * @param ?string $value
      * @throws Exception
-     * @return ?Color
+     * @return ?string
      */
-    public static function fromColor(?stdClass $value): ?Color {
+    public static function fromName(?string $value): ?string {
         if (!is_null($value)) {
-            return Color::from($value); /*class*/
+            return $value; /*string*/
         } else {
             return  null;
         }
@@ -542,57 +542,56 @@ class Berry {
 
     /**
      * @throws Exception
-     * @return ?stdClass
+     * @return ?string
      */
-    public function toColor(): ?stdClass {
-        if (Berry::validateColor($this->color))  {
-            if (!is_null($this->color)) {
-                return $this->color->to(); /*class*/
+    public function toName(): ?string {
+        if (Berry::validateName($this->name))  {
+            if (!is_null($this->name)) {
+                return $this->name; /*string*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Berry::color');
+        throw new Exception('never get to this Berry::name');
     }
 
     /**
-     * @param Color|null
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateColor(?Color $value): bool {
+    public static function validateName(?string $value): bool {
         if (!is_null($value)) {
-            $value->validate();
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?Color
+     * @return ?string
      */
-    public function getColor(): ?Color {
-        if (Berry::validateColor($this->color))  {
-            return $this->color;
+    public function getName(): ?string {
+        if (Berry::validateName($this->name))  {
+            return $this->name;
         }
-        throw new Exception('never get to getColor Berry::color');
+        throw new Exception('never get to getName Berry::name');
     }
 
     /**
-     * @return ?Color
+     * @return ?string
      */
-    public static function sampleColor(): ?Color {
-        return Color::sample(); /*31:color*/
+    public static function sampleName(): ?string {
+        return 'Berry::name::31'; /*31:name*/
     }
 
     /**
-     * @param ?string $value
+     * @param ?stdClass $value
      * @throws Exception
-     * @return ?string
+     * @return ?Color
      */
-    public static function fromName(?string $value): ?string {
+    public static function fromColor(?stdClass $value): ?Color {
         if (!is_null($value)) {
-            return $value; /*string*/
+            return Color::from($value); /*class*/
         } else {
             return  null;
         }
@@ -600,46 +599,47 @@ class Berry {
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?stdClass
      */
-    public function toName(): ?string {
-        if (Berry::validateName($this->name))  {
-            if (!is_null($this->name)) {
-                return $this->name; /*string*/
+    public function toColor(): ?stdClass {
+        if (Berry::validateColor($this->color))  {
+            if (!is_null($this->color)) {
+                return $this->color->to(); /*class*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Berry::name');
+        throw new Exception('never get to this Berry::color');
     }
 
     /**
-     * @param string|null
+     * @param Color|null
      * @return bool
      * @throws Exception
      */
-    public static function validateName(?string $value): bool {
+    public static function validateColor(?Color $value): bool {
         if (!is_null($value)) {
+            $value->validate();
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?Color
      */
-    public function getName(): ?string {
-        if (Berry::validateName($this->name))  {
-            return $this->name;
+    public function getColor(): ?Color {
+        if (Berry::validateColor($this->color))  {
+            return $this->color;
         }
-        throw new Exception('never get to getName Berry::name');
+        throw new Exception('never get to getColor Berry::color');
     }
 
     /**
-     * @return ?string
+     * @return ?Color
      */
-    public static function sampleName(): ?string {
-        return 'Berry::name::32'; /*32:name*/
+    public static function sampleColor(): ?Color {
+        return Color::sample(); /*32:color*/
     }
 
     /**
@@ -716,8 +716,8 @@ class Berry {
      * @return bool
      */
     public function validate(): bool {
-        return Berry::validateColor($this->color)
-        || Berry::validateName($this->name)
+        return Berry::validateName($this->name)
+        || Berry::validateColor($this->color)
         || Berry::validateShapes($this->shapes);
     }
 
@@ -727,8 +727,8 @@ class Berry {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'color'} = $this->toColor();
         $out->{'name'} = $this->toName();
+        $out->{'color'} = $this->toColor();
         $out->{'shapes'} = $this->toShapes();
         return $out;
     }
@@ -740,8 +740,8 @@ class Berry {
      */
     public static function from(stdClass $obj): Berry {
         return new Berry(
-         Berry::fromColor($obj->{'color'})
-        ,Berry::fromName($obj->{'name'})
+         Berry::fromName($obj->{'name'})
+        ,Berry::fromColor($obj->{'color'})
         ,Berry::fromShapes($obj->{'shapes'})
         );
     }
@@ -751,8 +751,8 @@ class Berry {
      */
     public static function sample(): Berry {
         return new Berry(
-         Berry::sampleColor()
-        ,Berry::sampleName()
+         Berry::sampleName()
+        ,Berry::sampleColor()
         ,Berry::sampleShapes()
         );
     }
@@ -869,26 +869,26 @@ class Color {
 // This is an autogenerated file:Shape
 
 class Shape {
-    private ?Geometry $geometry; // json:geometry Optional
     private ?History $history; // json:history Optional
+    private ?Geometry $geometry; // json:geometry Optional
 
     /**
-     * @param Geometry|null $geometry
      * @param History|null $history
+     * @param Geometry|null $geometry
      */
-    public function __construct(?Geometry $geometry, ?History $history) {
-        $this->geometry = $geometry;
+    public function __construct(?History $history, ?Geometry $geometry) {
         $this->history = $history;
+        $this->geometry = $geometry;
     }
 
     /**
      * @param ?stdClass $value
      * @throws Exception
-     * @return ?Geometry
+     * @return ?History
      */
-    public static function fromGeometry(?stdClass $value): ?Geometry {
+    public static function fromHistory(?stdClass $value): ?History {
         if (!is_null($value)) {
-            return Geometry::from($value); /*class*/
+            return History::from($value); /*class*/
         } else {
             return  null;
         }
@@ -898,23 +898,23 @@ class Shape {
      * @throws Exception
      * @return ?stdClass
      */
-    public function toGeometry(): ?stdClass {
-        if (Shape::validateGeometry($this->geometry))  {
-            if (!is_null($this->geometry)) {
-                return $this->geometry->to(); /*class*/
+    public function toHistory(): ?stdClass {
+        if (Shape::validateHistory($this->history))  {
+            if (!is_null($this->history)) {
+                return $this->history->to(); /*class*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Shape::geometry');
+        throw new Exception('never get to this Shape::history');
     }
 
     /**
-     * @param Geometry|null
+     * @param History|null
      * @return bool
      * @throws Exception
      */
-    public static function validateGeometry(?Geometry $value): bool {
+    public static function validateHistory(?History $value): bool {
         if (!is_null($value)) {
             $value->validate();
         }
@@ -923,30 +923,30 @@ class Shape {
 
     /**
      * @throws Exception
-     * @return ?Geometry
+     * @return ?History
      */
-    public function getGeometry(): ?Geometry {
-        if (Shape::validateGeometry($this->geometry))  {
-            return $this->geometry;
+    public function getHistory(): ?History {
+        if (Shape::validateHistory($this->history))  {
+            return $this->history;
         }
-        throw new Exception('never get to getGeometry Shape::geometry');
+        throw new Exception('never get to getHistory Shape::history');
     }
 
     /**
-     * @return ?Geometry
+     * @return ?History
      */
-    public static function sampleGeometry(): ?Geometry {
-        return Geometry::sample(); /*31:geometry*/
+    public static function sampleHistory(): ?History {
+        return History::sample(); /*31:history*/
     }
 
     /**
      * @param ?stdClass $value
      * @throws Exception
-     * @return ?History
+     * @return ?Geometry
      */
-    public static function fromHistory(?stdClass $value): ?History {
+    public static function fromGeometry(?stdClass $value): ?Geometry {
         if (!is_null($value)) {
-            return History::from($value); /*class*/
+            return Geometry::from($value); /*class*/
         } else {
             return  null;
         }
@@ -956,23 +956,23 @@ class Shape {
      * @throws Exception
      * @return ?stdClass
      */
-    public function toHistory(): ?stdClass {
-        if (Shape::validateHistory($this->history))  {
-            if (!is_null($this->history)) {
-                return $this->history->to(); /*class*/
+    public function toGeometry(): ?stdClass {
+        if (Shape::validateGeometry($this->geometry))  {
+            if (!is_null($this->geometry)) {
+                return $this->geometry->to(); /*class*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Shape::history');
+        throw new Exception('never get to this Shape::geometry');
     }
 
     /**
-     * @param History|null
+     * @param Geometry|null
      * @return bool
      * @throws Exception
      */
-    public static function validateHistory(?History $value): bool {
+    public static function validateGeometry(?Geometry $value): bool {
         if (!is_null($value)) {
             $value->validate();
         }
@@ -981,20 +981,20 @@ class Shape {
 
     /**
      * @throws Exception
-     * @return ?History
+     * @return ?Geometry
      */
-    public function getHistory(): ?History {
-        if (Shape::validateHistory($this->history))  {
-            return $this->history;
+    public function getGeometry(): ?Geometry {
+        if (Shape::validateGeometry($this->geometry))  {
+            return $this->geometry;
         }
-        throw new Exception('never get to getHistory Shape::history');
+        throw new Exception('never get to getGeometry Shape::geometry');
     }
 
     /**
-     * @return ?History
+     * @return ?Geometry
      */
-    public static function sampleHistory(): ?History {
-        return History::sample(); /*32:history*/
+    public static function sampleGeometry(): ?Geometry {
+        return Geometry::sample(); /*32:geometry*/
     }
 
     /**
@@ -1002,8 +1002,8 @@ class Shape {
      * @return bool
      */
     public function validate(): bool {
-        return Shape::validateGeometry($this->geometry)
-        || Shape::validateHistory($this->history);
+        return Shape::validateHistory($this->history)
+        || Shape::validateGeometry($this->geometry);
     }
 
     /**
@@ -1012,8 +1012,8 @@ class Shape {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'geometry'} = $this->toGeometry();
         $out->{'history'} = $this->toHistory();
+        $out->{'geometry'} = $this->toGeometry();
         return $out;
     }
 
@@ -1024,8 +1024,8 @@ class Shape {
      */
     public static function from(stdClass $obj): Shape {
         return new Shape(
-         Shape::fromGeometry($obj->{'geometry'})
-        ,Shape::fromHistory($obj->{'history'})
+         Shape::fromHistory($obj->{'history'})
+        ,Shape::fromGeometry($obj->{'geometry'})
         );
     }
 
@@ -1034,8 +1034,8 @@ class Shape {
      */
     public static function sample(): Shape {
         return new Shape(
-         Shape::sampleGeometry()
-        ,Shape::sampleHistory()
+         Shape::sampleHistory()
+        ,Shape::sampleGeometry()
         );
     }
 }
@@ -1456,19 +1456,19 @@ class RectShape {
 // This is an autogenerated file:Part
 
 class Part {
-    private ?string $depth; // json:depth Optional
     private ?string $length; // json:length Optional
     private ?string $width; // json:width Optional
+    private ?string $depth; // json:depth Optional
 
     /**
-     * @param string|null $depth
      * @param string|null $length
      * @param string|null $width
+     * @param string|null $depth
      */
-    public function __construct(?string $depth, ?string $length, ?string $width) {
-        $this->depth = $depth;
+    public function __construct(?string $length, ?string $width, ?string $depth) {
         $this->length = $length;
         $this->width = $width;
+        $this->depth = $depth;
     }
 
     /**
@@ -1476,7 +1476,7 @@ class Part {
      * @throws Exception
      * @return ?string
      */
-    public static function fromDepth(?string $value): ?string {
+    public static function fromLength(?string $value): ?string {
         if (!is_null($value)) {
             return $value; /*string*/
         } else {
@@ -1488,15 +1488,15 @@ class Part {
      * @throws Exception
      * @return ?string
      */
-    public function toDepth(): ?string {
-        if (Part::validateDepth($this->depth))  {
-            if (!is_null($this->depth)) {
-                return $this->depth; /*string*/
+    public function toLength(): ?string {
+        if (Part::validateLength($this->length))  {
+            if (!is_null($this->length)) {
+                return $this->length; /*string*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Part::depth');
+        throw new Exception('never get to this Part::length');
     }
 
     /**
@@ -1504,7 +1504,7 @@ class Part {
      * @return bool
      * @throws Exception
      */
-    public static function validateDepth(?string $value): bool {
+    public static function validateLength(?string $value): bool {
         if (!is_null($value)) {
         }
         return true;
@@ -1514,18 +1514,18 @@ class Part {
      * @throws Exception
      * @return ?string
      */
-    public function getDepth(): ?string {
-        if (Part::validateDepth($this->depth))  {
-            return $this->depth;
+    public function getLength(): ?string {
+        if (Part::validateLength($this->length))  {
+            return $this->length;
         }
-        throw new Exception('never get to getDepth Part::depth');
+        throw new Exception('never get to getLength Part::length');
     }
 
     /**
      * @return ?string
      */
-    public static function sampleDepth(): ?string {
-        return 'Part::depth::31'; /*31:depth*/
+    public static function sampleLength(): ?string {
+        return 'Part::length::31'; /*31:length*/
     }
 
     /**
@@ -1533,7 +1533,7 @@ class Part {
      * @throws Exception
      * @return ?string
      */
-    public static function fromLength(?string $value): ?string {
+    public static function fromWidth(?string $value): ?string {
         if (!is_null($value)) {
             return $value; /*string*/
         } else {
@@ -1545,15 +1545,15 @@ class Part {
      * @throws Exception
      * @return ?string
      */
-    public function toLength(): ?string {
-        if (Part::validateLength($this->length))  {
-            if (!is_null($this->length)) {
-                return $this->length; /*string*/
+    public function toWidth(): ?string {
+        if (Part::validateWidth($this->width))  {
+            if (!is_null($this->width)) {
+                return $this->width; /*string*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Part::length');
+        throw new Exception('never get to this Part::width');
     }
 
     /**
@@ -1561,7 +1561,7 @@ class Part {
      * @return bool
      * @throws Exception
      */
-    public static function validateLength(?string $value): bool {
+    public static function validateWidth(?string $value): bool {
         if (!is_null($value)) {
         }
         return true;
@@ -1571,18 +1571,18 @@ class Part {
      * @throws Exception
      * @return ?string
      */
-    public function getLength(): ?string {
-        if (Part::validateLength($this->length))  {
-            return $this->length;
+    public function getWidth(): ?string {
+        if (Part::validateWidth($this->width))  {
+            return $this->width;
         }
-        throw new Exception('never get to getLength Part::length');
+        throw new Exception('never get to getWidth Part::width');
     }
 
     /**
      * @return ?string
      */
-    public static function sampleLength(): ?string {
-        return 'Part::length::32'; /*32:length*/
+    public static function sampleWidth(): ?string {
+        return 'Part::width::32'; /*32:width*/
     }
 
     /**
@@ -1590,7 +1590,7 @@ class Part {
      * @throws Exception
      * @return ?string
      */
-    public static function fromWidth(?string $value): ?string {
+    public static function fromDepth(?string $value): ?string {
         if (!is_null($value)) {
             return $value; /*string*/
         } else {
@@ -1602,15 +1602,15 @@ class Part {
      * @throws Exception
      * @return ?string
      */
-    public function toWidth(): ?string {
-        if (Part::validateWidth($this->width))  {
-            if (!is_null($this->width)) {
-                return $this->width; /*string*/
+    public function toDepth(): ?string {
+        if (Part::validateDepth($this->depth))  {
+            if (!is_null($this->depth)) {
+                return $this->depth; /*string*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Part::width');
+        throw new Exception('never get to this Part::depth');
     }
 
     /**
@@ -1618,7 +1618,7 @@ class Part {
      * @return bool
      * @throws Exception
      */
-    public static function validateWidth(?string $value): bool {
+    public static function validateDepth(?string $value): bool {
         if (!is_null($value)) {
         }
         return true;
@@ -1628,18 +1628,18 @@ class Part {
      * @throws Exception
      * @return ?string
      */
-    public function getWidth(): ?string {
-        if (Part::validateWidth($this->width))  {
-            return $this->width;
+    public function getDepth(): ?string {
+        if (Part::validateDepth($this->depth))  {
+            return $this->depth;
         }
-        throw new Exception('never get to getWidth Part::width');
+        throw new Exception('never get to getDepth Part::depth');
     }
 
     /**
      * @return ?string
      */
-    public static function sampleWidth(): ?string {
-        return 'Part::width::33'; /*33:width*/
+    public static function sampleDepth(): ?string {
+        return 'Part::depth::33'; /*33:depth*/
     }
 
     /**
@@ -1647,9 +1647,9 @@ class Part {
      * @return bool
      */
     public function validate(): bool {
-        return Part::validateDepth($this->depth)
-        || Part::validateLength($this->length)
-        || Part::validateWidth($this->width);
+        return Part::validateLength($this->length)
+        || Part::validateWidth($this->width)
+        || Part::validateDepth($this->depth);
     }
 
     /**
@@ -1658,9 +1658,9 @@ class Part {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'depth'} = $this->toDepth();
         $out->{'length'} = $this->toLength();
         $out->{'width'} = $this->toWidth();
+        $out->{'depth'} = $this->toDepth();
         return $out;
     }
 
@@ -1671,9 +1671,9 @@ class Part {
      */
     public static function from(stdClass $obj): Part {
         return new Part(
-         Part::fromDepth($obj->{'depth'})
-        ,Part::fromLength($obj->{'length'})
+         Part::fromLength($obj->{'length'})
         ,Part::fromWidth($obj->{'width'})
+        ,Part::fromDepth($obj->{'depth'})
         );
     }
 
@@ -1682,9 +1682,9 @@ class Part {
      */
     public static function sample(): Part {
         return new Part(
-         Part::sampleDepth()
-        ,Part::sampleLength()
+         Part::sampleLength()
         ,Part::sampleWidth()
+        ,Part::sampleDepth()
         );
     }
 }
@@ -1800,28 +1800,28 @@ class History {
 // This is an autogenerated file:Vehicle
 
 class Vehicle {
-    private ?string $brand; // json:brand Optional
     private ?string $id; // json:id Optional
-    private ?Speed $speed; // json:speed Optional
-    private ?bool $subModule; // json:subModule Optional
     private ?VehicleType $type; // json:type Optional
+    private ?Speed $speed; // json:speed Optional
     private ?string $year; // json:year Optional
+    private ?string $brand; // json:brand Optional
+    private ?bool $subModule; // json:subModule Optional
 
     /**
-     * @param string|null $brand
      * @param string|null $id
-     * @param Speed|null $speed
-     * @param bool|null $subModule
      * @param VehicleType|null $type
+     * @param Speed|null $speed
      * @param string|null $year
+     * @param string|null $brand
+     * @param bool|null $subModule
      */
-    public function __construct(?string $brand, ?string $id, ?Speed $speed, ?bool $subModule, ?VehicleType $type, ?string $year) {
-        $this->brand = $brand;
+    public function __construct(?string $id, ?VehicleType $type, ?Speed $speed, ?string $year, ?string $brand, ?bool $subModule) {
         $this->id = $id;
-        $this->speed = $speed;
-        $this->subModule = $subModule;
         $this->type = $type;
+        $this->speed = $speed;
         $this->year = $year;
+        $this->brand = $brand;
+        $this->subModule = $subModule;
     }
 
     /**
@@ -1829,7 +1829,7 @@ class Vehicle {
      * @throws Exception
      * @return ?string
      */
-    public static function fromBrand(?string $value): ?string {
+    public static function fromID(?string $value): ?string {
         if (!is_null($value)) {
             return $value; /*string*/
         } else {
@@ -1841,15 +1841,15 @@ class Vehicle {
      * @throws Exception
      * @return ?string
      */
-    public function toBrand(): ?string {
-        if (Vehicle::validateBrand($this->brand))  {
-            if (!is_null($this->brand)) {
-                return $this->brand; /*string*/
+    public function toID(): ?string {
+        if (Vehicle::validateID($this->id))  {
+            if (!is_null($this->id)) {
+                return $this->id; /*string*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Vehicle::brand');
+        throw new Exception('never get to this Vehicle::id');
     }
 
     /**
@@ -1857,7 +1857,7 @@ class Vehicle {
      * @return bool
      * @throws Exception
      */
-    public static function validateBrand(?string $value): bool {
+    public static function validateID(?string $value): bool {
         if (!is_null($value)) {
         }
         return true;
@@ -1867,28 +1867,28 @@ class Vehicle {
      * @throws Exception
      * @return ?string
      */
-    public function getBrand(): ?string {
-        if (Vehicle::validateBrand($this->brand))  {
-            return $this->brand;
+    public function getID(): ?string {
+        if (Vehicle::validateID($this->id))  {
+            return $this->id;
         }
-        throw new Exception('never get to getBrand Vehicle::brand');
+        throw new Exception('never get to getID Vehicle::id');
     }
 
     /**
      * @return ?string
      */
-    public static function sampleBrand(): ?string {
-        return 'Vehicle::brand::31'; /*31:brand*/
+    public static function sampleID(): ?string {
+        return 'Vehicle::id::31'; /*31:id*/
     }
 
     /**
-     * @param ?string $value
+     * @param ?stdClass $value
      * @throws Exception
-     * @return ?string
+     * @return ?VehicleType
      */
-    public static function fromID(?string $value): ?string {
+    public static function fromType(?stdClass $value): ?VehicleType {
         if (!is_null($value)) {
-            return $value; /*string*/
+            return VehicleType::from($value); /*class*/
         } else {
             return  null;
         }
@@ -1896,46 +1896,47 @@ class Vehicle {
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?stdClass
      */
-    public function toID(): ?string {
-        if (Vehicle::validateID($this->id))  {
-            if (!is_null($this->id)) {
-                return $this->id; /*string*/
+    public function toType(): ?stdClass {
+        if (Vehicle::validateType($this->type))  {
+            if (!is_null($this->type)) {
+                return $this->type->to(); /*class*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Vehicle::id');
+        throw new Exception('never get to this Vehicle::type');
     }
 
     /**
-     * @param string|null
+     * @param VehicleType|null
      * @return bool
      * @throws Exception
      */
-    public static function validateID(?string $value): bool {
+    public static function validateType(?VehicleType $value): bool {
         if (!is_null($value)) {
+            $value->validate();
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?VehicleType
      */
-    public function getID(): ?string {
-        if (Vehicle::validateID($this->id))  {
-            return $this->id;
+    public function getType(): ?VehicleType {
+        if (Vehicle::validateType($this->type))  {
+            return $this->type;
         }
-        throw new Exception('never get to getID Vehicle::id');
+        throw new Exception('never get to getType Vehicle::type');
     }
 
     /**
-     * @return ?string
+     * @return ?VehicleType
      */
-    public static function sampleID(): ?string {
-        return 'Vehicle::id::32'; /*32:id*/
+    public static function sampleType(): ?VehicleType {
+        return VehicleType::sample(); /*32:type*/
     }
 
     /**
@@ -1997,13 +1998,13 @@ class Vehicle {
     }
 
     /**
-     * @param ?bool $value
+     * @param ?string $value
      * @throws Exception
-     * @return ?bool
+     * @return ?string
      */
-    public static function fromSubModule(?bool $value): ?bool {
+    public static function fromYear(?string $value): ?string {
         if (!is_null($value)) {
-            return $value; /*bool*/
+            return $value; /*string*/
         } else {
             return  null;
         }
@@ -2011,25 +2012,25 @@ class Vehicle {
 
     /**
      * @throws Exception
-     * @return ?bool
+     * @return ?string
      */
-    public function toSubModule(): ?bool {
-        if (Vehicle::validateSubModule($this->subModule))  {
-            if (!is_null($this->subModule)) {
-                return $this->subModule; /*bool*/
+    public function toYear(): ?string {
+        if (Vehicle::validateYear($this->year))  {
+            if (!is_null($this->year)) {
+                return $this->year; /*string*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Vehicle::subModule');
+        throw new Exception('never get to this Vehicle::year');
     }
 
     /**
-     * @param bool|null
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateSubModule(?bool $value): bool {
+    public static function validateYear(?string $value): bool {
         if (!is_null($value)) {
         }
         return true;
@@ -2037,30 +2038,30 @@ class Vehicle {
 
     /**
      * @throws Exception
-     * @return ?bool
+     * @return ?string
      */
-    public function getSubModule(): ?bool {
-        if (Vehicle::validateSubModule($this->subModule))  {
-            return $this->subModule;
+    public function getYear(): ?string {
+        if (Vehicle::validateYear($this->year))  {
+            return $this->year;
         }
-        throw new Exception('never get to getSubModule Vehicle::subModule');
+        throw new Exception('never get to getYear Vehicle::year');
     }
 
     /**
-     * @return ?bool
+     * @return ?string
      */
-    public static function sampleSubModule(): ?bool {
-        return true; /*34:subModule*/
+    public static function sampleYear(): ?string {
+        return 'Vehicle::year::34'; /*34:year*/
     }
 
     /**
-     * @param ?stdClass $value
+     * @param ?string $value
      * @throws Exception
-     * @return ?VehicleType
+     * @return ?string
      */
-    public static function fromType(?stdClass $value): ?VehicleType {
+    public static function fromBrand(?string $value): ?string {
         if (!is_null($value)) {
-            return VehicleType::from($value); /*class*/
+            return $value; /*string*/
         } else {
             return  null;
         }
@@ -2068,57 +2069,56 @@ class Vehicle {
 
     /**
      * @throws Exception
-     * @return ?stdClass
+     * @return ?string
      */
-    public function toType(): ?stdClass {
-        if (Vehicle::validateType($this->type))  {
-            if (!is_null($this->type)) {
-                return $this->type->to(); /*class*/
+    public function toBrand(): ?string {
+        if (Vehicle::validateBrand($this->brand))  {
+            if (!is_null($this->brand)) {
+                return $this->brand; /*string*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Vehicle::type');
+        throw new Exception('never get to this Vehicle::brand');
     }
 
     /**
-     * @param VehicleType|null
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateType(?VehicleType $value): bool {
+    public static function validateBrand(?string $value): bool {
         if (!is_null($value)) {
-            $value->validate();
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?VehicleType
+     * @return ?string
      */
-    public function getType(): ?VehicleType {
-        if (Vehicle::validateType($this->type))  {
-            return $this->type;
+    public function getBrand(): ?string {
+        if (Vehicle::validateBrand($this->brand))  {
+            return $this->brand;
         }
-        throw new Exception('never get to getType Vehicle::type');
+        throw new Exception('never get to getBrand Vehicle::brand');
     }
 
     /**
-     * @return ?VehicleType
+     * @return ?string
      */
-    public static function sampleType(): ?VehicleType {
-        return VehicleType::sample(); /*35:type*/
+    public static function sampleBrand(): ?string {
+        return 'Vehicle::brand::35'; /*35:brand*/
     }
 
     /**
-     * @param ?string $value
+     * @param ?bool $value
      * @throws Exception
-     * @return ?string
+     * @return ?bool
      */
-    public static function fromYear(?string $value): ?string {
+    public static function fromSubModule(?bool $value): ?bool {
         if (!is_null($value)) {
-            return $value; /*string*/
+            return $value; /*bool*/
         } else {
             return  null;
         }
@@ -2126,25 +2126,25 @@ class Vehicle {
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?bool
      */
-    public function toYear(): ?string {
-        if (Vehicle::validateYear($this->year))  {
-            if (!is_null($this->year)) {
-                return $this->year; /*string*/
+    public function toSubModule(): ?bool {
+        if (Vehicle::validateSubModule($this->subModule))  {
+            if (!is_null($this->subModule)) {
+                return $this->subModule; /*bool*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Vehicle::year');
+        throw new Exception('never get to this Vehicle::subModule');
     }
 
     /**
-     * @param string|null
+     * @param bool|null
      * @return bool
      * @throws Exception
      */
-    public static function validateYear(?string $value): bool {
+    public static function validateSubModule(?bool $value): bool {
         if (!is_null($value)) {
         }
         return true;
@@ -2152,20 +2152,20 @@ class Vehicle {
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?bool
      */
-    public function getYear(): ?string {
-        if (Vehicle::validateYear($this->year))  {
-            return $this->year;
+    public function getSubModule(): ?bool {
+        if (Vehicle::validateSubModule($this->subModule))  {
+            return $this->subModule;
         }
-        throw new Exception('never get to getYear Vehicle::year');
+        throw new Exception('never get to getSubModule Vehicle::subModule');
     }
 
     /**
-     * @return ?string
+     * @return ?bool
      */
-    public static function sampleYear(): ?string {
-        return 'Vehicle::year::36'; /*36:year*/
+    public static function sampleSubModule(): ?bool {
+        return true; /*36:subModule*/
     }
 
     /**
@@ -2173,12 +2173,12 @@ class Vehicle {
      * @return bool
      */
     public function validate(): bool {
-        return Vehicle::validateBrand($this->brand)
-        || Vehicle::validateID($this->id)
-        || Vehicle::validateSpeed($this->speed)
-        || Vehicle::validateSubModule($this->subModule)
+        return Vehicle::validateID($this->id)
         || Vehicle::validateType($this->type)
-        || Vehicle::validateYear($this->year);
+        || Vehicle::validateSpeed($this->speed)
+        || Vehicle::validateYear($this->year)
+        || Vehicle::validateBrand($this->brand)
+        || Vehicle::validateSubModule($this->subModule);
     }
 
     /**
@@ -2187,12 +2187,12 @@ class Vehicle {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'brand'} = $this->toBrand();
         $out->{'id'} = $this->toID();
-        $out->{'speed'} = $this->toSpeed();
-        $out->{'subModule'} = $this->toSubModule();
         $out->{'type'} = $this->toType();
+        $out->{'speed'} = $this->toSpeed();
         $out->{'year'} = $this->toYear();
+        $out->{'brand'} = $this->toBrand();
+        $out->{'subModule'} = $this->toSubModule();
         return $out;
     }
 
@@ -2203,12 +2203,12 @@ class Vehicle {
      */
     public static function from(stdClass $obj): Vehicle {
         return new Vehicle(
-         Vehicle::fromBrand($obj->{'brand'})
-        ,Vehicle::fromID($obj->{'id'})
-        ,Vehicle::fromSpeed($obj->{'speed'})
-        ,Vehicle::fromSubModule($obj->{'subModule'})
+         Vehicle::fromID($obj->{'id'})
         ,Vehicle::fromType($obj->{'type'})
+        ,Vehicle::fromSpeed($obj->{'speed'})
         ,Vehicle::fromYear($obj->{'year'})
+        ,Vehicle::fromBrand($obj->{'brand'})
+        ,Vehicle::fromSubModule($obj->{'subModule'})
         );
     }
 
@@ -2217,12 +2217,12 @@ class Vehicle {
      */
     public static function sample(): Vehicle {
         return new Vehicle(
-         Vehicle::sampleBrand()
-        ,Vehicle::sampleID()
-        ,Vehicle::sampleSpeed()
-        ,Vehicle::sampleSubModule()
+         Vehicle::sampleID()
         ,Vehicle::sampleType()
+        ,Vehicle::sampleSpeed()
         ,Vehicle::sampleYear()
+        ,Vehicle::sampleBrand()
+        ,Vehicle::sampleSubModule()
         );
     }
 }
@@ -2339,16 +2339,16 @@ class Speed {
 // This is an autogenerated file:Limit
 
 class Limit {
-    private ?float $maximum; // json:maximum Optional
     private ?float $minimum; // json:minimum Optional
+    private ?float $maximum; // json:maximum Optional
 
     /**
-     * @param float|null $maximum
      * @param float|null $minimum
+     * @param float|null $maximum
      */
-    public function __construct(?float $maximum, ?float $minimum) {
-        $this->maximum = $maximum;
+    public function __construct(?float $minimum, ?float $maximum) {
         $this->minimum = $minimum;
+        $this->maximum = $maximum;
     }
 
     /**
@@ -2356,7 +2356,7 @@ class Limit {
      * @throws Exception
      * @return ?float
      */
-    public static function fromMaximum(?float $value): ?float {
+    public static function fromMinimum(?float $value): ?float {
         if (!is_null($value)) {
             return $value; /*float*/
         } else {
@@ -2368,15 +2368,15 @@ class Limit {
      * @throws Exception
      * @return ?float
      */
-    public function toMaximum(): ?float {
-        if (Limit::validateMaximum($this->maximum))  {
-            if (!is_null($this->maximum)) {
-                return $this->maximum; /*float*/
+    public function toMinimum(): ?float {
+        if (Limit::validateMinimum($this->minimum))  {
+            if (!is_null($this->minimum)) {
+                return $this->minimum; /*float*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Limit::maximum');
+        throw new Exception('never get to this Limit::minimum');
     }
 
     /**
@@ -2384,7 +2384,7 @@ class Limit {
      * @return bool
      * @throws Exception
      */
-    public static function validateMaximum(?float $value): bool {
+    public static function validateMinimum(?float $value): bool {
         if (!is_null($value)) {
         }
         return true;
@@ -2394,18 +2394,18 @@ class Limit {
      * @throws Exception
      * @return ?float
      */
-    public function getMaximum(): ?float {
-        if (Limit::validateMaximum($this->maximum))  {
-            return $this->maximum;
+    public function getMinimum(): ?float {
+        if (Limit::validateMinimum($this->minimum))  {
+            return $this->minimum;
         }
-        throw new Exception('never get to getMaximum Limit::maximum');
+        throw new Exception('never get to getMinimum Limit::minimum');
     }
 
     /**
      * @return ?float
      */
-    public static function sampleMaximum(): ?float {
-        return 31.031; /*31:maximum*/
+    public static function sampleMinimum(): ?float {
+        return 31.031; /*31:minimum*/
     }
 
     /**
@@ -2413,7 +2413,7 @@ class Limit {
      * @throws Exception
      * @return ?float
      */
-    public static function fromMinimum(?float $value): ?float {
+    public static function fromMaximum(?float $value): ?float {
         if (!is_null($value)) {
             return $value; /*float*/
         } else {
@@ -2425,15 +2425,15 @@ class Limit {
      * @throws Exception
      * @return ?float
      */
-    public function toMinimum(): ?float {
-        if (Limit::validateMinimum($this->minimum))  {
-            if (!is_null($this->minimum)) {
-                return $this->minimum; /*float*/
+    public function toMaximum(): ?float {
+        if (Limit::validateMaximum($this->maximum))  {
+            if (!is_null($this->maximum)) {
+                return $this->maximum; /*float*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Limit::minimum');
+        throw new Exception('never get to this Limit::maximum');
     }
 
     /**
@@ -2441,7 +2441,7 @@ class Limit {
      * @return bool
      * @throws Exception
      */
-    public static function validateMinimum(?float $value): bool {
+    public static function validateMaximum(?float $value): bool {
         if (!is_null($value)) {
         }
         return true;
@@ -2451,18 +2451,18 @@ class Limit {
      * @throws Exception
      * @return ?float
      */
-    public function getMinimum(): ?float {
-        if (Limit::validateMinimum($this->minimum))  {
-            return $this->minimum;
+    public function getMaximum(): ?float {
+        if (Limit::validateMaximum($this->maximum))  {
+            return $this->maximum;
         }
-        throw new Exception('never get to getMinimum Limit::minimum');
+        throw new Exception('never get to getMaximum Limit::maximum');
     }
 
     /**
      * @return ?float
      */
-    public static function sampleMinimum(): ?float {
-        return 32.032; /*32:minimum*/
+    public static function sampleMaximum(): ?float {
+        return 32.032; /*32:maximum*/
     }
 
     /**
@@ -2470,8 +2470,8 @@ class Limit {
      * @return bool
      */
     public function validate(): bool {
-        return Limit::validateMaximum($this->maximum)
-        || Limit::validateMinimum($this->minimum);
+        return Limit::validateMinimum($this->minimum)
+        || Limit::validateMaximum($this->maximum);
     }
 
     /**
@@ -2480,8 +2480,8 @@ class Limit {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'maximum'} = $this->toMaximum();
         $out->{'minimum'} = $this->toMinimum();
+        $out->{'maximum'} = $this->toMaximum();
         return $out;
     }
 
@@ -2492,8 +2492,8 @@ class Limit {
      */
     public static function from(stdClass $obj): Limit {
         return new Limit(
-         Limit::fromMaximum($obj->{'maximum'})
-        ,Limit::fromMinimum($obj->{'minimum'})
+         Limit::fromMinimum($obj->{'minimum'})
+        ,Limit::fromMaximum($obj->{'maximum'})
         );
     }
 
@@ -2502,8 +2502,8 @@ class Limit {
      */
     public static function sample(): Limit {
         return new Limit(
-         Limit::sampleMaximum()
-        ,Limit::sampleMinimum()
+         Limit::sampleMinimum()
+        ,Limit::sampleMaximum()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.php
index 899c0ef..6c22b0e 100644
--- a/base/schema-php/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.php
@@ -4,16 +4,63 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private Node|string|null $next; // json:next Optional
     private string $value; // json:value Required
+    private Node|string|null $next; // json:next Optional
 
     /**
-     * @param Node|string|null $next
      * @param string $value
+     * @param Node|string|null $next
      */
-    public function __construct(Node|string|null $next, string $value) {
-        $this->next = $next;
+    public function __construct(string $value, Node|string|null $next) {
         $this->value = $value;
+        $this->next = $next;
+    }
+
+    /**
+     * @param string $value
+     * @throws Exception
+     * @return string
+     */
+    public static function fromValue(string $value): string {
+        return $value; /*string*/
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function toValue(): string {
+        if (TopLevel::validateValue($this->value))  {
+            return $this->value; /*string*/
+        }
+        throw new Exception('never get to this TopLevel::value');
+    }
+
+    /**
+     * @param string
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateValue(string $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function getValue(): string {
+        if (TopLevel::validateValue($this->value))  {
+            return $this->value;
+        }
+        throw new Exception('never get to getValue TopLevel::value');
+    }
+
+    /**
+     * @return string
+     */
+    public static function sampleValue(): string {
+        return 'TopLevel::value::31'; /*31:value*/
     }
 
     /**
@@ -89,54 +136,7 @@ class TopLevel {
      * @return Node|string|null
      */
     public static function sampleNext(): Node|string|null {
-        return Node::sample(); /*31:next*/
-    }
-
-    /**
-     * @param string $value
-     * @throws Exception
-     * @return string
-     */
-    public static function fromValue(string $value): string {
-        return $value; /*string*/
-    }
-
-    /**
-     * @throws Exception
-     * @return string
-     */
-    public function toValue(): string {
-        if (TopLevel::validateValue($this->value))  {
-            return $this->value; /*string*/
-        }
-        throw new Exception('never get to this TopLevel::value');
-    }
-
-    /**
-     * @param string
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateValue(string $value): bool {
-        return true;
-    }
-
-    /**
-     * @throws Exception
-     * @return string
-     */
-    public function getValue(): string {
-        if (TopLevel::validateValue($this->value))  {
-            return $this->value;
-        }
-        throw new Exception('never get to getValue TopLevel::value');
-    }
-
-    /**
-     * @return string
-     */
-    public static function sampleValue(): string {
-        return 'TopLevel::value::32'; /*32:value*/
+        return Node::sample(); /*32:next*/
     }
 
     /**
@@ -144,8 +144,8 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateNext($this->next)
-        || TopLevel::validateValue($this->value);
+        return TopLevel::validateValue($this->value)
+        || TopLevel::validateNext($this->next);
     }
 
     /**
@@ -154,8 +154,8 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'next'} = $this->toNext();
         $out->{'value'} = $this->toValue();
+        $out->{'next'} = $this->toNext();
         return $out;
     }
 
@@ -166,8 +166,8 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromNext($obj->{'next'})
-        ,TopLevel::fromValue($obj->{'value'})
+         TopLevel::fromValue($obj->{'value'})
+        ,TopLevel::fromNext($obj->{'next'})
         );
     }
 
@@ -176,8 +176,8 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleNext()
-        ,TopLevel::sampleValue()
+         TopLevel::sampleValue()
+        ,TopLevel::sampleNext()
         );
     }
 }
@@ -185,16 +185,63 @@ class TopLevel {
 // This is an autogenerated file:Node
 
 class Node {
-    private Node|string|null $next; // json:next Optional
     private string $value; // json:value Required
+    private Node|string|null $next; // json:next Optional
 
     /**
-     * @param Node|string|null $next
      * @param string $value
+     * @param Node|string|null $next
      */
-    public function __construct(Node|string|null $next, string $value) {
-        $this->next = $next;
+    public function __construct(string $value, Node|string|null $next) {
         $this->value = $value;
+        $this->next = $next;
+    }
+
+    /**
+     * @param string $value
+     * @throws Exception
+     * @return string
+     */
+    public static function fromValue(string $value): string {
+        return $value; /*string*/
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function toValue(): string {
+        if (Node::validateValue($this->value))  {
+            return $this->value; /*string*/
+        }
+        throw new Exception('never get to this Node::value');
+    }
+
+    /**
+     * @param string
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateValue(string $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function getValue(): string {
+        if (Node::validateValue($this->value))  {
+            return $this->value;
+        }
+        throw new Exception('never get to getValue Node::value');
+    }
+
+    /**
+     * @return string
+     */
+    public static function sampleValue(): string {
+        return 'Node::value::31'; /*31:value*/
     }
 
     /**
@@ -270,54 +317,7 @@ class Node {
      * @return Node|string|null
      */
     public static function sampleNext(): Node|string|null {
-        return Node::sample(); /*31:next*/
-    }
-
-    /**
-     * @param string $value
-     * @throws Exception
-     * @return string
-     */
-    public static function fromValue(string $value): string {
-        return $value; /*string*/
-    }
-
-    /**
-     * @throws Exception
-     * @return string
-     */
-    public function toValue(): string {
-        if (Node::validateValue($this->value))  {
-            return $this->value; /*string*/
-        }
-        throw new Exception('never get to this Node::value');
-    }
-
-    /**
-     * @param string
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateValue(string $value): bool {
-        return true;
-    }
-
-    /**
-     * @throws Exception
-     * @return string
-     */
-    public function getValue(): string {
-        if (Node::validateValue($this->value))  {
-            return $this->value;
-        }
-        throw new Exception('never get to getValue Node::value');
-    }
-
-    /**
-     * @return string
-     */
-    public static function sampleValue(): string {
-        return 'Node::value::32'; /*32:value*/
+        return Node::sample(); /*32:next*/
     }
 
     /**
@@ -325,8 +325,8 @@ class Node {
      * @return bool
      */
     public function validate(): bool {
-        return Node::validateNext($this->next)
-        || Node::validateValue($this->value);
+        return Node::validateValue($this->value)
+        || Node::validateNext($this->next);
     }
 
     /**
@@ -335,8 +335,8 @@ class Node {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'next'} = $this->toNext();
         $out->{'value'} = $this->toValue();
+        $out->{'next'} = $this->toNext();
         return $out;
     }
 
@@ -347,8 +347,8 @@ class Node {
      */
     public static function from(stdClass $obj): Node {
         return new Node(
-         Node::fromNext($obj->{'next'})
-        ,Node::fromValue($obj->{'value'})
+         Node::fromValue($obj->{'value'})
+        ,Node::fromNext($obj->{'next'})
         );
     }
 
@@ -357,8 +357,8 @@ class Node {
      */
     public static function sample(): Node {
         return new Node(
-         Node::sampleNext()
-        ,Node::sampleValue()
+         Node::sampleValue()
+        ,Node::sampleNext()
         );
     }
 }
diff --git a/base/schema-php/test/inputs/schema/uuid.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/uuid.schema/default/TopLevel.php
index 7031219..007bac7 100644
--- a/base/schema-php/test/inputs/schema/uuid.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/uuid.schema/default/TopLevel.php
@@ -4,124 +4,88 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
-    private ?array $arrNullable; // json:arrNullable Optional
-    private ?array $arrOne; // json:arrOne Optional
-    private ?string $nullable; // json:nullable Optional
     private string $one; // json:one Required
     private ?string $optional; // json:optional Optional
+    private ?string $nullable; // json:nullable Optional
+    private ?array $arrOne; // json:arrOne Optional
+    private ?array $arrNullable; // json:arrNullable Optional
     private UnionWithEnum|string $unionWithEnum; // json:unionWithEnum Required
 
     /**
-     * @param array|null $arrNullable
-     * @param array|null $arrOne
-     * @param string|null $nullable
      * @param string $one
      * @param string|null $optional
+     * @param string|null $nullable
+     * @param array|null $arrOne
+     * @param array|null $arrNullable
      * @param UnionWithEnum|string $unionWithEnum
      */
-    public function __construct(?array $arrNullable, ?array $arrOne, ?string $nullable, string $one, ?string $optional, UnionWithEnum|string $unionWithEnum) {
-        $this->arrNullable = $arrNullable;
-        $this->arrOne = $arrOne;
-        $this->nullable = $nullable;
+    public function __construct(string $one, ?string $optional, ?string $nullable, ?array $arrOne, ?array $arrNullable, UnionWithEnum|string $unionWithEnum) {
         $this->one = $one;
         $this->optional = $optional;
+        $this->nullable = $nullable;
+        $this->arrOne = $arrOne;
+        $this->arrNullable = $arrNullable;
         $this->unionWithEnum = $unionWithEnum;
     }
 
     /**
-     * @param ?array $value
+     * @param string $value
      * @throws Exception
-     * @return ?array
+     * @return string
      */
-    public static function fromArrNullable(?array $value): ?array {
-        if (!is_null($value)) {
-            return  array_map(function ($value) {
-                if (!is_null($value)) {
-                    return $value; /*uuid*/
-                } else {
-                    return  null;
-                }
-            }, $value);
-        } else {
-            return  null;
-        }
+    public static function fromOne(string $value): string {
+        return $value; /*uuid*/
     }
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return string
      */
-    public function toArrNullable(): ?array {
-        if (TopLevel::validateArrNullable($this->arrNullable))  {
-            if (!is_null($this->arrNullable)) {
-                return array_map(function ($value) {
-                    if (!is_null($value)) {
-                        return $value; /*uuid*/
-                    } else {
-                        return  null;
-                    }
-                }, $this->arrNullable);
-            } else {
-                return  null;
-            }
+    public function toOne(): string {
+        if (TopLevel::validateOne($this->one))  {
+            return $this->one; /*uuid*/
         }
-        throw new Exception('never get to this TopLevel::arrNullable');
+        throw new Exception('never get to this TopLevel::one');
     }
 
     /**
-     * @param array|null
+     * @param string
      * @return bool
      * @throws Exception
      */
-    public static function validateArrNullable(?array $value): bool {
-        if (!is_null($value)) {
-            if (!is_array($value)) {
-                throw new Exception("Attribute Error:TopLevel::arrNullable");
-            }
-            array_walk($value, function($value_v) {
-                if (!is_null($value_v)) {
-                    if (!is_string($value_v)) {
-                        throw new Exception("Attribute Error:TopLevel::arrNullable");
-                    }
-                    if (!preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value_v)) {
-                        throw new Exception("Attribute Error:TopLevel::arrNullable");
-                    }
-                }
-            });
+    public static function validateOne(string $value): bool {
+        if (!preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) {
+            throw new Exception("Attribute Error:TopLevel::one");
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return string
      */
-    public function getArrNullable(): ?array {
-        if (TopLevel::validateArrNullable($this->arrNullable))  {
-            return $this->arrNullable;
+    public function getOne(): string {
+        if (TopLevel::validateOne($this->one))  {
+            return $this->one;
         }
-        throw new Exception('never get to getArrNullable TopLevel::arrNullable');
+        throw new Exception('never get to getOne TopLevel::one');
     }
 
     /**
-     * @return ?array
+     * @return string
      */
-    public static function sampleArrNullable(): ?array {
-        return  array(
-            '9277b8fb-2a65-4663-a36c-8d417e2d284b' /*31:*/
-        ); /* 31:arrNullable*/
+    public static function sampleOne(): string {
+        return '9277b8fb-2a65-4663-a36c-8d417e2d284b'; /*31:one*/
     }
 
     /**
-     * @param ?array $value
+     * @param ?string $value
      * @throws Exception
-     * @return ?array
+     * @return ?string
      */
-    public static function fromArrOne(?array $value): ?array {
+    public static function fromOptional(?string $value): ?string {
         if (!is_null($value)) {
-            return  array_map(function ($value) {
-                return $value; /*uuid*/
-            }, $value);
+            return $value; /*uuid*/
         } else {
             return  null;
         }
@@ -129,61 +93,49 @@ class TopLevel {
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return ?string
      */
-    public function toArrOne(): ?array {
-        if (TopLevel::validateArrOne($this->arrOne))  {
-            if (!is_null($this->arrOne)) {
-                return array_map(function ($value) {
-                    return $value; /*uuid*/
-                }, $this->arrOne);
+    public function toOptional(): ?string {
+        if (TopLevel::validateOptional($this->optional))  {
+            if (!is_null($this->optional)) {
+                return $this->optional; /*uuid*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this TopLevel::arrOne');
+        throw new Exception('never get to this TopLevel::optional');
     }
 
     /**
-     * @param array|null
+     * @param string|null
      * @return bool
      * @throws Exception
      */
-    public static function validateArrOne(?array $value): bool {
+    public static function validateOptional(?string $value): bool {
         if (!is_null($value)) {
-            if (!is_array($value)) {
-                throw new Exception("Attribute Error:TopLevel::arrOne");
+            if (!preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) {
+                throw new Exception("Attribute Error:TopLevel::optional");
             }
-            array_walk($value, function($value_v) {
-                if (!is_string($value_v)) {
-                    throw new Exception("Attribute Error:TopLevel::arrOne");
-                }
-                if (!preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value_v)) {
-                    throw new Exception("Attribute Error:TopLevel::arrOne");
-                }
-            });
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?array
+     * @return ?string
      */
-    public function getArrOne(): ?array {
-        if (TopLevel::validateArrOne($this->arrOne))  {
-            return $this->arrOne;
+    public function getOptional(): ?string {
+        if (TopLevel::validateOptional($this->optional))  {
+            return $this->optional;
         }
-        throw new Exception('never get to getArrOne TopLevel::arrOne');
+        throw new Exception('never get to getOptional TopLevel::optional');
     }
 
     /**
-     * @return ?array
+     * @return ?string
      */
-    public static function sampleArrOne(): ?array {
-        return  array(
-            '9277b8fb-2a65-4663-a36c-8d417e2d284b' /*32:*/
-        ); /* 32:arrOne*/
+    public static function sampleOptional(): ?string {
+        return '9277b8fb-2a65-4663-a36c-8d417e2d284b'; /*32:optional*/
     }
 
     /**
@@ -247,63 +199,93 @@ class TopLevel {
     }
 
     /**
-     * @param string $value
+     * @param ?array $value
      * @throws Exception
-     * @return string
+     * @return ?array
      */
-    public static function fromOne(string $value): string {
-        return $value; /*uuid*/
+    public static function fromArrOne(?array $value): ?array {
+        if (!is_null($value)) {
+            return  array_map(function ($value) {
+                return $value; /*uuid*/
+            }, $value);
+        } else {
+            return  null;
+        }
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?array
      */
-    public function toOne(): string {
-        if (TopLevel::validateOne($this->one))  {
-            return $this->one; /*uuid*/
+    public function toArrOne(): ?array {
+        if (TopLevel::validateArrOne($this->arrOne))  {
+            if (!is_null($this->arrOne)) {
+                return array_map(function ($value) {
+                    return $value; /*uuid*/
+                }, $this->arrOne);
+            } else {
+                return  null;
+            }
         }
-        throw new Exception('never get to this TopLevel::one');
+        throw new Exception('never get to this TopLevel::arrOne');
     }
 
     /**
-     * @param string
+     * @param array|null
      * @return bool
      * @throws Exception
      */
-    public static function validateOne(string $value): bool {
-        if (!preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) {
-            throw new Exception("Attribute Error:TopLevel::one");
+    public static function validateArrOne(?array $value): bool {
+        if (!is_null($value)) {
+            if (!is_array($value)) {
+                throw new Exception("Attribute Error:TopLevel::arrOne");
+            }
+            array_walk($value, function($value_v) {
+                if (!is_string($value_v)) {
+                    throw new Exception("Attribute Error:TopLevel::arrOne");
+                }
+                if (!preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value_v)) {
+                    throw new Exception("Attribute Error:TopLevel::arrOne");
+                }
+            });
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return string
+     * @return ?array
      */
-    public function getOne(): string {
-        if (TopLevel::validateOne($this->one))  {
-            return $this->one;
+    public function getArrOne(): ?array {
+        if (TopLevel::validateArrOne($this->arrOne))  {
+            return $this->arrOne;
         }
-        throw new Exception('never get to getOne TopLevel::one');
+        throw new Exception('never get to getArrOne TopLevel::arrOne');
     }
 
     /**
-     * @return string
+     * @return ?array
      */
-    public static function sampleOne(): string {
-        return '9277b8fb-2a65-4663-a36c-8d417e2d284b'; /*34:one*/
+    public static function sampleArrOne(): ?array {
+        return  array(
+            '9277b8fb-2a65-4663-a36c-8d417e2d284b' /*34:*/
+        ); /* 34:arrOne*/
     }
 
     /**
-     * @param ?string $value
+     * @param ?array $value
      * @throws Exception
-     * @return ?string
+     * @return ?array
      */
-    public static function fromOptional(?string $value): ?string {
+    public static function fromArrNullable(?array $value): ?array {
         if (!is_null($value)) {
-            return $value; /*uuid*/
+            return  array_map(function ($value) {
+                if (!is_null($value)) {
+                    return $value; /*uuid*/
+                } else {
+                    return  null;
+                }
+            }, $value);
         } else {
             return  null;
         }
@@ -311,49 +293,67 @@ class TopLevel {
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?array
      */
-    public function toOptional(): ?string {
-        if (TopLevel::validateOptional($this->optional))  {
-            if (!is_null($this->optional)) {
-                return $this->optional; /*uuid*/
+    public function toArrNullable(): ?array {
+        if (TopLevel::validateArrNullable($this->arrNullable))  {
+            if (!is_null($this->arrNullable)) {
+                return array_map(function ($value) {
+                    if (!is_null($value)) {
+                        return $value; /*uuid*/
+                    } else {
+                        return  null;
+                    }
+                }, $this->arrNullable);
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this TopLevel::optional');
+        throw new Exception('never get to this TopLevel::arrNullable');
     }
 
     /**
-     * @param string|null
+     * @param array|null
      * @return bool
      * @throws Exception
      */
-    public static function validateOptional(?string $value): bool {
+    public static function validateArrNullable(?array $value): bool {
         if (!is_null($value)) {
-            if (!preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) {
-                throw new Exception("Attribute Error:TopLevel::optional");
+            if (!is_array($value)) {
+                throw new Exception("Attribute Error:TopLevel::arrNullable");
             }
+            array_walk($value, function($value_v) {
+                if (!is_null($value_v)) {
+                    if (!is_string($value_v)) {
+                        throw new Exception("Attribute Error:TopLevel::arrNullable");
+                    }
+                    if (!preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value_v)) {
+                        throw new Exception("Attribute Error:TopLevel::arrNullable");
+                    }
+                }
+            });
         }
         return true;
     }
 
     /**
      * @throws Exception
-     * @return ?string
+     * @return ?array
      */
-    public function getOptional(): ?string {
-        if (TopLevel::validateOptional($this->optional))  {
-            return $this->optional;
+    public function getArrNullable(): ?array {
+        if (TopLevel::validateArrNullable($this->arrNullable))  {
+            return $this->arrNullable;
         }
-        throw new Exception('never get to getOptional TopLevel::optional');
+        throw new Exception('never get to getArrNullable TopLevel::arrNullable');
     }
 
     /**
-     * @return ?string
+     * @return ?array
      */
-    public static function sampleOptional(): ?string {
-        return '9277b8fb-2a65-4663-a36c-8d417e2d284b'; /*35:optional*/
+    public static function sampleArrNullable(): ?array {
+        return  array(
+            '9277b8fb-2a65-4663-a36c-8d417e2d284b' /*35:*/
+        ); /* 35:arrNullable*/
     }
 
     /**
@@ -432,11 +432,11 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateArrNullable($this->arrNullable)
-        || TopLevel::validateArrOne($this->arrOne)
-        || TopLevel::validateNullable($this->nullable)
-        || TopLevel::validateOne($this->one)
+        return TopLevel::validateOne($this->one)
         || TopLevel::validateOptional($this->optional)
+        || TopLevel::validateNullable($this->nullable)
+        || TopLevel::validateArrOne($this->arrOne)
+        || TopLevel::validateArrNullable($this->arrNullable)
         || TopLevel::validateUnionWithEnum($this->unionWithEnum);
     }
 
@@ -446,11 +446,11 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
-        $out->{'arrNullable'} = $this->toArrNullable();
-        $out->{'arrOne'} = $this->toArrOne();
-        $out->{'nullable'} = $this->toNullable();
         $out->{'one'} = $this->toOne();
         $out->{'optional'} = $this->toOptional();
+        $out->{'nullable'} = $this->toNullable();
+        $out->{'arrOne'} = $this->toArrOne();
+        $out->{'arrNullable'} = $this->toArrNullable();
         $out->{'unionWithEnum'} = $this->toUnionWithEnum();
         return $out;
     }
@@ -462,11 +462,11 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromArrNullable($obj->{'arrNullable'})
-        ,TopLevel::fromArrOne($obj->{'arrOne'})
-        ,TopLevel::fromNullable($obj->{'nullable'})
-        ,TopLevel::fromOne($obj->{'one'})
+         TopLevel::fromOne($obj->{'one'})
         ,TopLevel::fromOptional($obj->{'optional'})
+        ,TopLevel::fromNullable($obj->{'nullable'})
+        ,TopLevel::fromArrOne($obj->{'arrOne'})
+        ,TopLevel::fromArrNullable($obj->{'arrNullable'})
         ,TopLevel::fromUnionWithEnum($obj->{'unionWithEnum'})
         );
     }
@@ -476,11 +476,11 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleArrNullable()
-        ,TopLevel::sampleArrOne()
-        ,TopLevel::sampleNullable()
-        ,TopLevel::sampleOne()
+         TopLevel::sampleOne()
         ,TopLevel::sampleOptional()
+        ,TopLevel::sampleNullable()
+        ,TopLevel::sampleArrOne()
+        ,TopLevel::sampleArrNullable()
         ,TopLevel::sampleUnionWithEnum()
         );
     }
diff --git a/base/schema-php/test/inputs/schema/vega-lite.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/vega-lite.schema/default/TopLevel.php
index 1fca381..145c81c 100644
--- a/base/schema-php/test/inputs/schema/vega-lite.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/vega-lite.schema/default/TopLevel.php
@@ -5858,8 +5858,8 @@ class MarkConfig {
     private ?float $dx; // json:dx Optional
     private ?float $dy; // json:dy Optional
     private ?string $fill; // json:fill Optional
-    private ?bool $filled; // json:filled Optional
     private ?float $fillOpacity; // json:fillOpacity Optional
+    private ?bool $filled; // json:filled Optional
     private ?string $font; // json:font Optional
     private ?float $fontSize; // json:fontSize Optional
     private ?FontStyle $fontStyle; // json:fontStyle Optional
@@ -5890,8 +5890,8 @@ class MarkConfig {
      * @param float|null $dx
      * @param float|null $dy
      * @param string|null $fill
-     * @param bool|null $filled
      * @param float|null $fillOpacity
+     * @param bool|null $filled
      * @param string|null $font
      * @param float|null $fontSize
      * @param FontStyle|null $fontStyle
@@ -5913,7 +5913,7 @@ class MarkConfig {
      * @param string|null $text
      * @param float|null $theta
      */
-    public function __construct(?HorizontalAlign $align, ?float $angle, ?VerticalAlign $baseline, ?string $color, ?Cursor $cursor, ?float $dx, ?float $dy, ?string $fill, ?bool $filled, ?float $fillOpacity, ?string $font, ?float $fontSize, ?FontStyle $fontStyle, FontWeight|float|null $fontWeight, ?string $href, ?Interpolate $interpolate, ?float $limit, ?float $opacity, ?Orient $orient, ?float $radius, ?string $shape, ?float $size, ?string $stroke, ?array $strokeDash, ?float $strokeDashOffset, ?float $strokeOpacity, ?float $strokeWidth, ?float $tension, ?string $text, ?float $theta) {
+    public function __construct(?HorizontalAlign $align, ?float $angle, ?VerticalAlign $baseline, ?string $color, ?Cursor $cursor, ?float $dx, ?float $dy, ?string $fill, ?float $fillOpacity, ?bool $filled, ?string $font, ?float $fontSize, ?FontStyle $fontStyle, FontWeight|float|null $fontWeight, ?string $href, ?Interpolate $interpolate, ?float $limit, ?float $opacity, ?Orient $orient, ?float $radius, ?string $shape, ?float $size, ?string $stroke, ?array $strokeDash, ?float $strokeDashOffset, ?float $strokeOpacity, ?float $strokeWidth, ?float $tension, ?string $text, ?float $theta) {
         $this->align = $align;
         $this->angle = $angle;
         $this->baseline = $baseline;
@@ -5922,8 +5922,8 @@ class MarkConfig {
         $this->dx = $dx;
         $this->dy = $dy;
         $this->fill = $fill;
-        $this->filled = $filled;
         $this->fillOpacity = $fillOpacity;
+        $this->filled = $filled;
         $this->font = $font;
         $this->fontSize = $fontSize;
         $this->fontStyle = $fontStyle;
@@ -6545,6 +6545,83 @@ class MarkConfig {
         return 'MarkConfig::fill::38'; /*38:fill*/
     }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @param ?float $value
+     * @throws Exception
+     * @return ?float
+     */
+    public static function fromFillOpacity(?float $value): ?float {
+        if (!is_null($value)) {
+            return $value; /*float*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @throws Exception
+     * @return ?float
+     */
+    public function toFillOpacity(): ?float {
+        if (MarkConfig::validateFillOpacity($this->fillOpacity))  {
+            if (!is_null($this->fillOpacity)) {
+                return $this->fillOpacity; /*float*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this MarkConfig::fillOpacity');
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @param float|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateFillOpacity(?float $value): bool {
+        if (!is_null($value)) {
+        }
+        return true;
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @throws Exception
+     * @return ?float
+     */
+    public function getFillOpacity(): ?float {
+        if (MarkConfig::validateFillOpacity($this->fillOpacity))  {
+            return $this->fillOpacity;
+        }
+        throw new Exception('never get to getFillOpacity MarkConfig::fillOpacity');
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @return ?float
+     */
+    public static function sampleFillOpacity(): ?float {
+        return 39.039; /*39:fillOpacity*/
+    }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -6639,84 +6716,7 @@ class MarkConfig {
      * @return ?bool
      */
     public static function sampleFilled(): ?bool {
-        return true; /*39:filled*/
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @param ?float $value
-     * @throws Exception
-     * @return ?float
-     */
-    public static function fromFillOpacity(?float $value): ?float {
-        if (!is_null($value)) {
-            return $value; /*float*/
-        } else {
-            return  null;
-        }
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @throws Exception
-     * @return ?float
-     */
-    public function toFillOpacity(): ?float {
-        if (MarkConfig::validateFillOpacity($this->fillOpacity))  {
-            if (!is_null($this->fillOpacity)) {
-                return $this->fillOpacity; /*float*/
-            } else {
-                return  null;
-            }
-        }
-        throw new Exception('never get to this MarkConfig::fillOpacity');
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @param float|null
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateFillOpacity(?float $value): bool {
-        if (!is_null($value)) {
-        }
-        return true;
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @throws Exception
-     * @return ?float
-     */
-    public function getFillOpacity(): ?float {
-        if (MarkConfig::validateFillOpacity($this->fillOpacity))  {
-            return $this->fillOpacity;
-        }
-        throw new Exception('never get to getFillOpacity MarkConfig::fillOpacity');
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @return ?float
-     */
-    public static function sampleFillOpacity(): ?float {
-        return 40.04; /*40:fillOpacity*/
+        return true; /*40:filled*/
     }
 
     /**
@@ -8328,8 +8328,8 @@ class MarkConfig {
         || MarkConfig::validateDx($this->dx)
         || MarkConfig::validateDy($this->dy)
         || MarkConfig::validateFill($this->fill)
-        || MarkConfig::validateFilled($this->filled)
         || MarkConfig::validateFillOpacity($this->fillOpacity)
+        || MarkConfig::validateFilled($this->filled)
         || MarkConfig::validateFont($this->font)
         || MarkConfig::validateFontSize($this->fontSize)
         || MarkConfig::validateFontStyle($this->fontStyle)
@@ -8366,8 +8366,8 @@ class MarkConfig {
         $out->{'dx'} = $this->toDx();
         $out->{'dy'} = $this->toDy();
         $out->{'fill'} = $this->toFill();
-        $out->{'filled'} = $this->toFilled();
         $out->{'fillOpacity'} = $this->toFillOpacity();
+        $out->{'filled'} = $this->toFilled();
         $out->{'font'} = $this->toFont();
         $out->{'fontSize'} = $this->toFontSize();
         $out->{'fontStyle'} = $this->toFontStyle();
@@ -8406,8 +8406,8 @@ class MarkConfig {
         ,MarkConfig::fromDx($obj->{'dx'})
         ,MarkConfig::fromDy($obj->{'dy'})
         ,MarkConfig::fromFill($obj->{'fill'})
-        ,MarkConfig::fromFilled($obj->{'filled'})
         ,MarkConfig::fromFillOpacity($obj->{'fillOpacity'})
+        ,MarkConfig::fromFilled($obj->{'filled'})
         ,MarkConfig::fromFont($obj->{'font'})
         ,MarkConfig::fromFontSize($obj->{'fontSize'})
         ,MarkConfig::fromFontStyle($obj->{'fontStyle'})
@@ -8444,8 +8444,8 @@ class MarkConfig {
         ,MarkConfig::sampleDx()
         ,MarkConfig::sampleDy()
         ,MarkConfig::sampleFill()
-        ,MarkConfig::sampleFilled()
         ,MarkConfig::sampleFillOpacity()
+        ,MarkConfig::sampleFilled()
         ,MarkConfig::sampleFont()
         ,MarkConfig::sampleFontSize()
         ,MarkConfig::sampleFontStyle()
@@ -9076,9 +9076,9 @@ class AxisConfig {
     private ?bool $shortTimeLabels; // json:shortTimeLabels Optional
     private ?string $tickColor; // json:tickColor Optional
     private ?bool $tickRound; // json:tickRound Optional
-    private ?bool $ticks; // json:ticks Optional
     private ?float $tickSize; // json:tickSize Optional
     private ?float $tickWidth; // json:tickWidth Optional
+    private ?bool $ticks; // json:ticks Optional
     private ?string $titleAlign; // json:titleAlign Optional
     private ?float $titleAngle; // json:titleAngle Optional
     private ?string $titleBaseline; // json:titleBaseline Optional
@@ -9117,9 +9117,9 @@ class AxisConfig {
      * @param bool|null $shortTimeLabels
      * @param string|null $tickColor
      * @param bool|null $tickRound
-     * @param bool|null $ticks
      * @param float|null $tickSize
      * @param float|null $tickWidth
+     * @param bool|null $ticks
      * @param string|null $titleAlign
      * @param float|null $titleAngle
      * @param string|null $titleBaseline
@@ -9133,7 +9133,7 @@ class AxisConfig {
      * @param float|null $titleX
      * @param float|null $titleY
      */
-    public function __construct(?float $bandPosition, ?bool $domain, ?string $domainColor, ?float $domainWidth, ?bool $grid, ?string $gridColor, ?array $gridDash, ?float $gridOpacity, ?float $gridWidth, ?float $labelAngle, bool|float|null $labelBound, ?string $labelColor, bool|float|null $labelFlush, ?string $labelFont, ?float $labelFontSize, ?float $labelLimit, LabelOverlap|bool|null $labelOverlap, ?float $labelPadding, ?bool $labels, ?float $maxExtent, ?float $minExtent, ?bool $shortTimeLabels, ?string $tickColor, ?bool $tickRound, ?bool $ticks, ?float $tickSize, ?float $tickWidth, ?string $titleAlign, ?float $titleAngle, ?string $titleBaseline, ?string $titleColor, ?string $titleFont, ?float $titleFontSize, float|string|null $titleFontWeight, ?float $titleLimit, ?float $titleMaxLength, ?float $titlePadding, ?float $titleX, ?float $titleY) {
+    public function __construct(?float $bandPosition, ?bool $domain, ?string $domainColor, ?float $domainWidth, ?bool $grid, ?string $gridColor, ?array $gridDash, ?float $gridOpacity, ?float $gridWidth, ?float $labelAngle, bool|float|null $labelBound, ?string $labelColor, bool|float|null $labelFlush, ?string $labelFont, ?float $labelFontSize, ?float $labelLimit, LabelOverlap|bool|null $labelOverlap, ?float $labelPadding, ?bool $labels, ?float $maxExtent, ?float $minExtent, ?bool $shortTimeLabels, ?string $tickColor, ?bool $tickRound, ?float $tickSize, ?float $tickWidth, ?bool $ticks, ?string $titleAlign, ?float $titleAngle, ?string $titleBaseline, ?string $titleColor, ?string $titleFont, ?float $titleFontSize, float|string|null $titleFontWeight, ?float $titleLimit, ?float $titleMaxLength, ?float $titlePadding, ?float $titleX, ?float $titleY) {
         $this->bandPosition = $bandPosition;
         $this->domain = $domain;
         $this->domainColor = $domainColor;
@@ -9158,9 +9158,9 @@ class AxisConfig {
         $this->shortTimeLabels = $shortTimeLabels;
         $this->tickColor = $tickColor;
         $this->tickRound = $tickRound;
-        $this->ticks = $ticks;
         $this->tickSize = $tickSize;
         $this->tickWidth = $tickWidth;
+        $this->ticks = $ticks;
         $this->titleAlign = $titleAlign;
         $this->titleAngle = $titleAngle;
         $this->titleBaseline = $titleBaseline;
@@ -11094,80 +11094,80 @@ class AxisConfig {
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
-     * @param ?bool $value
+     * @param ?float $value
      * @throws Exception
-     * @return ?bool
+     * @return ?float
      */
-    public static function fromTicks(?bool $value): ?bool {
+    public static function fromTickSize(?float $value): ?float {
         if (!is_null($value)) {
-            return $value; /*bool*/
+            return $value; /*float*/
         } else {
             return  null;
         }
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
      * @throws Exception
-     * @return ?bool
+     * @return ?float
      */
-    public function toTicks(): ?bool {
-        if (AxisConfig::validateTicks($this->ticks))  {
-            if (!is_null($this->ticks)) {
-                return $this->ticks; /*bool*/
+    public function toTickSize(): ?float {
+        if (AxisConfig::validateTickSize($this->tickSize))  {
+            if (!is_null($this->tickSize)) {
+                return $this->tickSize; /*float*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this AxisConfig::ticks');
+        throw new Exception('never get to this AxisConfig::tickSize');
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
-     * @param bool|null
+     * @param float|null
      * @return bool
      * @throws Exception
      */
-    public static function validateTicks(?bool $value): bool {
+    public static function validateTickSize(?float $value): bool {
         if (!is_null($value)) {
         }
         return true;
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
      * @throws Exception
-     * @return ?bool
+     * @return ?float
      */
-    public function getTicks(): ?bool {
-        if (AxisConfig::validateTicks($this->ticks))  {
-            return $this->ticks;
+    public function getTickSize(): ?float {
+        if (AxisConfig::validateTickSize($this->tickSize))  {
+            return $this->tickSize;
         }
-        throw new Exception('never get to getTicks AxisConfig::ticks');
+        throw new Exception('never get to getTickSize AxisConfig::tickSize');
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
-     * @return ?bool
+     * @return ?float
      */
-    public static function sampleTicks(): ?bool {
-        return true; /*55:ticks*/
+    public static function sampleTickSize(): ?float {
+        return 55.055; /*55:tickSize*/
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * The width, in pixels, of ticks.
      *
      * @param ?float $value
      * @throws Exception
      * @return ?float
      */
-    public static function fromTickSize(?float $value): ?float {
+    public static function fromTickWidth(?float $value): ?float {
         if (!is_null($value)) {
             return $value; /*float*/
         } else {
@@ -11176,122 +11176,122 @@ class AxisConfig {
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * The width, in pixels, of ticks.
      *
      * @throws Exception
      * @return ?float
      */
-    public function toTickSize(): ?float {
-        if (AxisConfig::validateTickSize($this->tickSize))  {
-            if (!is_null($this->tickSize)) {
-                return $this->tickSize; /*float*/
+    public function toTickWidth(): ?float {
+        if (AxisConfig::validateTickWidth($this->tickWidth))  {
+            if (!is_null($this->tickWidth)) {
+                return $this->tickWidth; /*float*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this AxisConfig::tickSize');
+        throw new Exception('never get to this AxisConfig::tickWidth');
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * The width, in pixels, of ticks.
      *
      * @param float|null
      * @return bool
      * @throws Exception
      */
-    public static function validateTickSize(?float $value): bool {
+    public static function validateTickWidth(?float $value): bool {
         if (!is_null($value)) {
         }
         return true;
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * The width, in pixels, of ticks.
      *
      * @throws Exception
      * @return ?float
      */
-    public function getTickSize(): ?float {
-        if (AxisConfig::validateTickSize($this->tickSize))  {
-            return $this->tickSize;
+    public function getTickWidth(): ?float {
+        if (AxisConfig::validateTickWidth($this->tickWidth))  {
+            return $this->tickWidth;
         }
-        throw new Exception('never get to getTickSize AxisConfig::tickSize');
+        throw new Exception('never get to getTickWidth AxisConfig::tickWidth');
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * The width, in pixels, of ticks.
      *
      * @return ?float
      */
-    public static function sampleTickSize(): ?float {
-        return 56.056; /*56:tickSize*/
+    public static function sampleTickWidth(): ?float {
+        return 56.056; /*56:tickWidth*/
     }
 
     /**
-     * The width, in pixels, of ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
-     * @param ?float $value
+     * @param ?bool $value
      * @throws Exception
-     * @return ?float
+     * @return ?bool
      */
-    public static function fromTickWidth(?float $value): ?float {
+    public static function fromTicks(?bool $value): ?bool {
         if (!is_null($value)) {
-            return $value; /*float*/
+            return $value; /*bool*/
         } else {
             return  null;
         }
     }
 
     /**
-     * The width, in pixels, of ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
      * @throws Exception
-     * @return ?float
+     * @return ?bool
      */
-    public function toTickWidth(): ?float {
-        if (AxisConfig::validateTickWidth($this->tickWidth))  {
-            if (!is_null($this->tickWidth)) {
-                return $this->tickWidth; /*float*/
+    public function toTicks(): ?bool {
+        if (AxisConfig::validateTicks($this->ticks))  {
+            if (!is_null($this->ticks)) {
+                return $this->ticks; /*bool*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this AxisConfig::tickWidth');
+        throw new Exception('never get to this AxisConfig::ticks');
     }
 
     /**
-     * The width, in pixels, of ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
-     * @param float|null
+     * @param bool|null
      * @return bool
      * @throws Exception
      */
-    public static function validateTickWidth(?float $value): bool {
+    public static function validateTicks(?bool $value): bool {
         if (!is_null($value)) {
         }
         return true;
     }
 
     /**
-     * The width, in pixels, of ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
      * @throws Exception
-     * @return ?float
+     * @return ?bool
      */
-    public function getTickWidth(): ?float {
-        if (AxisConfig::validateTickWidth($this->tickWidth))  {
-            return $this->tickWidth;
+    public function getTicks(): ?bool {
+        if (AxisConfig::validateTicks($this->ticks))  {
+            return $this->ticks;
         }
-        throw new Exception('never get to getTickWidth AxisConfig::tickWidth');
+        throw new Exception('never get to getTicks AxisConfig::ticks');
     }
 
     /**
-     * The width, in pixels, of ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
-     * @return ?float
+     * @return ?bool
      */
-    public static function sampleTickWidth(): ?float {
-        return 57.057; /*57:tickWidth*/
+    public static function sampleTicks(): ?bool {
+        return true; /*57:ticks*/
     }
 
     /**
@@ -12153,9 +12153,9 @@ class AxisConfig {
         || AxisConfig::validateShortTimeLabels($this->shortTimeLabels)
         || AxisConfig::validateTickColor($this->tickColor)
         || AxisConfig::validateTickRound($this->tickRound)
-        || AxisConfig::validateTicks($this->ticks)
         || AxisConfig::validateTickSize($this->tickSize)
         || AxisConfig::validateTickWidth($this->tickWidth)
+        || AxisConfig::validateTicks($this->ticks)
         || AxisConfig::validateTitleAlign($this->titleAlign)
         || AxisConfig::validateTitleAngle($this->titleAngle)
         || AxisConfig::validateTitleBaseline($this->titleBaseline)
@@ -12200,9 +12200,9 @@ class AxisConfig {
         $out->{'shortTimeLabels'} = $this->toShortTimeLabels();
         $out->{'tickColor'} = $this->toTickColor();
         $out->{'tickRound'} = $this->toTickRound();
-        $out->{'ticks'} = $this->toTicks();
         $out->{'tickSize'} = $this->toTickSize();
         $out->{'tickWidth'} = $this->toTickWidth();
+        $out->{'ticks'} = $this->toTicks();
         $out->{'titleAlign'} = $this->toTitleAlign();
         $out->{'titleAngle'} = $this->toTitleAngle();
         $out->{'titleBaseline'} = $this->toTitleBaseline();
@@ -12249,9 +12249,9 @@ class AxisConfig {
         ,AxisConfig::fromShortTimeLabels($obj->{'shortTimeLabels'})
         ,AxisConfig::fromTickColor($obj->{'tickColor'})
         ,AxisConfig::fromTickRound($obj->{'tickRound'})
-        ,AxisConfig::fromTicks($obj->{'ticks'})
         ,AxisConfig::fromTickSize($obj->{'tickSize'})
         ,AxisConfig::fromTickWidth($obj->{'tickWidth'})
+        ,AxisConfig::fromTicks($obj->{'ticks'})
         ,AxisConfig::fromTitleAlign($obj->{'titleAlign'})
         ,AxisConfig::fromTitleAngle($obj->{'titleAngle'})
         ,AxisConfig::fromTitleBaseline($obj->{'titleBaseline'})
@@ -12296,9 +12296,9 @@ class AxisConfig {
         ,AxisConfig::sampleShortTimeLabels()
         ,AxisConfig::sampleTickColor()
         ,AxisConfig::sampleTickRound()
-        ,AxisConfig::sampleTicks()
         ,AxisConfig::sampleTickSize()
         ,AxisConfig::sampleTickWidth()
+        ,AxisConfig::sampleTicks()
         ,AxisConfig::sampleTitleAlign()
         ,AxisConfig::sampleTitleAngle()
         ,AxisConfig::sampleTitleBaseline()
@@ -12390,9 +12390,9 @@ class VGAxisConfig {
     private ?float $minExtent; // json:minExtent Optional
     private ?string $tickColor; // json:tickColor Optional
     private ?bool $tickRound; // json:tickRound Optional
-    private ?bool $ticks; // json:ticks Optional
     private ?float $tickSize; // json:tickSize Optional
     private ?float $tickWidth; // json:tickWidth Optional
+    private ?bool $ticks; // json:ticks Optional
     private ?string $titleAlign; // json:titleAlign Optional
     private ?float $titleAngle; // json:titleAngle Optional
     private ?string $titleBaseline; // json:titleBaseline Optional
@@ -12430,9 +12430,9 @@ class VGAxisConfig {
      * @param float|null $minExtent
      * @param string|null $tickColor
      * @param bool|null $tickRound
-     * @param bool|null $ticks
      * @param float|null $tickSize
      * @param float|null $tickWidth
+     * @param bool|null $ticks
      * @param string|null $titleAlign
      * @param float|null $titleAngle
      * @param string|null $titleBaseline
@@ -12446,7 +12446,7 @@ class VGAxisConfig {
      * @param float|null $titleX
      * @param float|null $titleY
      */
-    public function __construct(?float $bandPosition, ?bool $domain, ?string $domainColor, ?float $domainWidth, ?bool $grid, ?string $gridColor, ?array $gridDash, ?float $gridOpacity, ?float $gridWidth, ?float $labelAngle, bool|float|null $labelBound, ?string $labelColor, bool|float|null $labelFlush, ?string $labelFont, ?float $labelFontSize, ?float $labelLimit, LabelOverlap|bool|null $labelOverlap, ?float $labelPadding, ?bool $labels, ?float $maxExtent, ?float $minExtent, ?string $tickColor, ?bool $tickRound, ?bool $ticks, ?float $tickSize, ?float $tickWidth, ?string $titleAlign, ?float $titleAngle, ?string $titleBaseline, ?string $titleColor, ?string $titleFont, ?float $titleFontSize, float|string|null $titleFontWeight, ?float $titleLimit, ?float $titleMaxLength, ?float $titlePadding, ?float $titleX, ?float $titleY) {
+    public function __construct(?float $bandPosition, ?bool $domain, ?string $domainColor, ?float $domainWidth, ?bool $grid, ?string $gridColor, ?array $gridDash, ?float $gridOpacity, ?float $gridWidth, ?float $labelAngle, bool|float|null $labelBound, ?string $labelColor, bool|float|null $labelFlush, ?string $labelFont, ?float $labelFontSize, ?float $labelLimit, LabelOverlap|bool|null $labelOverlap, ?float $labelPadding, ?bool $labels, ?float $maxExtent, ?float $minExtent, ?string $tickColor, ?bool $tickRound, ?float $tickSize, ?float $tickWidth, ?bool $ticks, ?string $titleAlign, ?float $titleAngle, ?string $titleBaseline, ?string $titleColor, ?string $titleFont, ?float $titleFontSize, float|string|null $titleFontWeight, ?float $titleLimit, ?float $titleMaxLength, ?float $titlePadding, ?float $titleX, ?float $titleY) {
         $this->bandPosition = $bandPosition;
         $this->domain = $domain;
         $this->domainColor = $domainColor;
@@ -12470,9 +12470,9 @@ class VGAxisConfig {
         $this->minExtent = $minExtent;
         $this->tickColor = $tickColor;
         $this->tickRound = $tickRound;
-        $this->ticks = $ticks;
         $this->tickSize = $tickSize;
         $this->tickWidth = $tickWidth;
+        $this->ticks = $ticks;
         $this->titleAlign = $titleAlign;
         $this->titleAngle = $titleAngle;
         $this->titleBaseline = $titleBaseline;
@@ -14329,80 +14329,80 @@ class VGAxisConfig {
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
-     * @param ?bool $value
+     * @param ?float $value
      * @throws Exception
-     * @return ?bool
+     * @return ?float
      */
-    public static function fromTicks(?bool $value): ?bool {
+    public static function fromTickSize(?float $value): ?float {
         if (!is_null($value)) {
-            return $value; /*bool*/
+            return $value; /*float*/
         } else {
             return  null;
         }
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
      * @throws Exception
-     * @return ?bool
+     * @return ?float
      */
-    public function toTicks(): ?bool {
-        if (VGAxisConfig::validateTicks($this->ticks))  {
-            if (!is_null($this->ticks)) {
-                return $this->ticks; /*bool*/
+    public function toTickSize(): ?float {
+        if (VGAxisConfig::validateTickSize($this->tickSize))  {
+            if (!is_null($this->tickSize)) {
+                return $this->tickSize; /*float*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this VGAxisConfig::ticks');
+        throw new Exception('never get to this VGAxisConfig::tickSize');
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
-     * @param bool|null
+     * @param float|null
      * @return bool
      * @throws Exception
      */
-    public static function validateTicks(?bool $value): bool {
+    public static function validateTickSize(?float $value): bool {
         if (!is_null($value)) {
         }
         return true;
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
      * @throws Exception
-     * @return ?bool
+     * @return ?float
      */
-    public function getTicks(): ?bool {
-        if (VGAxisConfig::validateTicks($this->ticks))  {
-            return $this->ticks;
+    public function getTickSize(): ?float {
+        if (VGAxisConfig::validateTickSize($this->tickSize))  {
+            return $this->tickSize;
         }
-        throw new Exception('never get to getTicks VGAxisConfig::ticks');
+        throw new Exception('never get to getTickSize VGAxisConfig::tickSize');
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
-     * @return ?bool
+     * @return ?float
      */
-    public static function sampleTicks(): ?bool {
-        return true; /*54:ticks*/
+    public static function sampleTickSize(): ?float {
+        return 54.054; /*54:tickSize*/
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * The width, in pixels, of ticks.
      *
      * @param ?float $value
      * @throws Exception
      * @return ?float
      */
-    public static function fromTickSize(?float $value): ?float {
+    public static function fromTickWidth(?float $value): ?float {
         if (!is_null($value)) {
             return $value; /*float*/
         } else {
@@ -14411,122 +14411,122 @@ class VGAxisConfig {
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * The width, in pixels, of ticks.
      *
      * @throws Exception
      * @return ?float
      */
-    public function toTickSize(): ?float {
-        if (VGAxisConfig::validateTickSize($this->tickSize))  {
-            if (!is_null($this->tickSize)) {
-                return $this->tickSize; /*float*/
+    public function toTickWidth(): ?float {
+        if (VGAxisConfig::validateTickWidth($this->tickWidth))  {
+            if (!is_null($this->tickWidth)) {
+                return $this->tickWidth; /*float*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this VGAxisConfig::tickSize');
+        throw new Exception('never get to this VGAxisConfig::tickWidth');
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * The width, in pixels, of ticks.
      *
      * @param float|null
      * @return bool
      * @throws Exception
      */
-    public static function validateTickSize(?float $value): bool {
+    public static function validateTickWidth(?float $value): bool {
         if (!is_null($value)) {
         }
         return true;
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * The width, in pixels, of ticks.
      *
      * @throws Exception
      * @return ?float
      */
-    public function getTickSize(): ?float {
-        if (VGAxisConfig::validateTickSize($this->tickSize))  {
-            return $this->tickSize;
+    public function getTickWidth(): ?float {
+        if (VGAxisConfig::validateTickWidth($this->tickWidth))  {
+            return $this->tickWidth;
         }
-        throw new Exception('never get to getTickSize VGAxisConfig::tickSize');
+        throw new Exception('never get to getTickWidth VGAxisConfig::tickWidth');
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * The width, in pixels, of ticks.
      *
      * @return ?float
      */
-    public static function sampleTickSize(): ?float {
-        return 55.055; /*55:tickSize*/
+    public static function sampleTickWidth(): ?float {
+        return 55.055; /*55:tickWidth*/
     }
 
     /**
-     * The width, in pixels, of ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
-     * @param ?float $value
+     * @param ?bool $value
      * @throws Exception
-     * @return ?float
+     * @return ?bool
      */
-    public static function fromTickWidth(?float $value): ?float {
+    public static function fromTicks(?bool $value): ?bool {
         if (!is_null($value)) {
-            return $value; /*float*/
+            return $value; /*bool*/
         } else {
             return  null;
         }
     }
 
     /**
-     * The width, in pixels, of ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
      * @throws Exception
-     * @return ?float
+     * @return ?bool
      */
-    public function toTickWidth(): ?float {
-        if (VGAxisConfig::validateTickWidth($this->tickWidth))  {
-            if (!is_null($this->tickWidth)) {
-                return $this->tickWidth; /*float*/
+    public function toTicks(): ?bool {
+        if (VGAxisConfig::validateTicks($this->ticks))  {
+            if (!is_null($this->ticks)) {
+                return $this->ticks; /*bool*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this VGAxisConfig::tickWidth');
+        throw new Exception('never get to this VGAxisConfig::ticks');
     }
 
     /**
-     * The width, in pixels, of ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
-     * @param float|null
+     * @param bool|null
      * @return bool
      * @throws Exception
      */
-    public static function validateTickWidth(?float $value): bool {
+    public static function validateTicks(?bool $value): bool {
         if (!is_null($value)) {
         }
         return true;
     }
 
     /**
-     * The width, in pixels, of ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
      * @throws Exception
-     * @return ?float
+     * @return ?bool
      */
-    public function getTickWidth(): ?float {
-        if (VGAxisConfig::validateTickWidth($this->tickWidth))  {
-            return $this->tickWidth;
+    public function getTicks(): ?bool {
+        if (VGAxisConfig::validateTicks($this->ticks))  {
+            return $this->ticks;
         }
-        throw new Exception('never get to getTickWidth VGAxisConfig::tickWidth');
+        throw new Exception('never get to getTicks VGAxisConfig::ticks');
     }
 
     /**
-     * The width, in pixels, of ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
-     * @return ?float
+     * @return ?bool
      */
-    public static function sampleTickWidth(): ?float {
-        return 56.056; /*56:tickWidth*/
+    public static function sampleTicks(): ?bool {
+        return true; /*56:ticks*/
     }
 
     /**
@@ -15387,9 +15387,9 @@ class VGAxisConfig {
         || VGAxisConfig::validateMinExtent($this->minExtent)
         || VGAxisConfig::validateTickColor($this->tickColor)
         || VGAxisConfig::validateTickRound($this->tickRound)
-        || VGAxisConfig::validateTicks($this->ticks)
         || VGAxisConfig::validateTickSize($this->tickSize)
         || VGAxisConfig::validateTickWidth($this->tickWidth)
+        || VGAxisConfig::validateTicks($this->ticks)
         || VGAxisConfig::validateTitleAlign($this->titleAlign)
         || VGAxisConfig::validateTitleAngle($this->titleAngle)
         || VGAxisConfig::validateTitleBaseline($this->titleBaseline)
@@ -15433,9 +15433,9 @@ class VGAxisConfig {
         $out->{'minExtent'} = $this->toMinExtent();
         $out->{'tickColor'} = $this->toTickColor();
         $out->{'tickRound'} = $this->toTickRound();
-        $out->{'ticks'} = $this->toTicks();
         $out->{'tickSize'} = $this->toTickSize();
         $out->{'tickWidth'} = $this->toTickWidth();
+        $out->{'ticks'} = $this->toTicks();
         $out->{'titleAlign'} = $this->toTitleAlign();
         $out->{'titleAngle'} = $this->toTitleAngle();
         $out->{'titleBaseline'} = $this->toTitleBaseline();
@@ -15481,9 +15481,9 @@ class VGAxisConfig {
         ,VGAxisConfig::fromMinExtent($obj->{'minExtent'})
         ,VGAxisConfig::fromTickColor($obj->{'tickColor'})
         ,VGAxisConfig::fromTickRound($obj->{'tickRound'})
-        ,VGAxisConfig::fromTicks($obj->{'ticks'})
         ,VGAxisConfig::fromTickSize($obj->{'tickSize'})
         ,VGAxisConfig::fromTickWidth($obj->{'tickWidth'})
+        ,VGAxisConfig::fromTicks($obj->{'ticks'})
         ,VGAxisConfig::fromTitleAlign($obj->{'titleAlign'})
         ,VGAxisConfig::fromTitleAngle($obj->{'titleAngle'})
         ,VGAxisConfig::fromTitleBaseline($obj->{'titleBaseline'})
@@ -15527,9 +15527,9 @@ class VGAxisConfig {
         ,VGAxisConfig::sampleMinExtent()
         ,VGAxisConfig::sampleTickColor()
         ,VGAxisConfig::sampleTickRound()
-        ,VGAxisConfig::sampleTicks()
         ,VGAxisConfig::sampleTickSize()
         ,VGAxisConfig::sampleTickWidth()
+        ,VGAxisConfig::sampleTicks()
         ,VGAxisConfig::sampleTitleAlign()
         ,VGAxisConfig::sampleTitleAngle()
         ,VGAxisConfig::sampleTitleBaseline()
@@ -15560,8 +15560,8 @@ class BarConfig {
     private ?float $dx; // json:dx Optional
     private ?float $dy; // json:dy Optional
     private ?string $fill; // json:fill Optional
-    private ?bool $filled; // json:filled Optional
     private ?float $fillOpacity; // json:fillOpacity Optional
+    private ?bool $filled; // json:filled Optional
     private ?string $font; // json:font Optional
     private ?float $fontSize; // json:fontSize Optional
     private ?FontStyle $fontStyle; // json:fontStyle Optional
@@ -15595,8 +15595,8 @@ class BarConfig {
      * @param float|null $dx
      * @param float|null $dy
      * @param string|null $fill
-     * @param bool|null $filled
      * @param float|null $fillOpacity
+     * @param bool|null $filled
      * @param string|null $font
      * @param float|null $fontSize
      * @param FontStyle|null $fontStyle
@@ -15618,7 +15618,7 @@ class BarConfig {
      * @param string|null $text
      * @param float|null $theta
      */
-    public function __construct(?HorizontalAlign $align, ?float $angle, ?VerticalAlign $baseline, ?float $binSpacing, ?string $color, ?float $continuousBandSize, ?Cursor $cursor, ?float $discreteBandSize, ?float $dx, ?float $dy, ?string $fill, ?bool $filled, ?float $fillOpacity, ?string $font, ?float $fontSize, ?FontStyle $fontStyle, FontWeight|float|null $fontWeight, ?string $href, ?Interpolate $interpolate, ?float $limit, ?float $opacity, ?Orient $orient, ?float $radius, ?string $shape, ?float $size, ?string $stroke, ?array $strokeDash, ?float $strokeDashOffset, ?float $strokeOpacity, ?float $strokeWidth, ?float $tension, ?string $text, ?float $theta) {
+    public function __construct(?HorizontalAlign $align, ?float $angle, ?VerticalAlign $baseline, ?float $binSpacing, ?string $color, ?float $continuousBandSize, ?Cursor $cursor, ?float $discreteBandSize, ?float $dx, ?float $dy, ?string $fill, ?float $fillOpacity, ?bool $filled, ?string $font, ?float $fontSize, ?FontStyle $fontStyle, FontWeight|float|null $fontWeight, ?string $href, ?Interpolate $interpolate, ?float $limit, ?float $opacity, ?Orient $orient, ?float $radius, ?string $shape, ?float $size, ?string $stroke, ?array $strokeDash, ?float $strokeDashOffset, ?float $strokeOpacity, ?float $strokeWidth, ?float $tension, ?string $text, ?float $theta) {
         $this->align = $align;
         $this->angle = $angle;
         $this->baseline = $baseline;
@@ -15630,8 +15630,8 @@ class BarConfig {
         $this->dx = $dx;
         $this->dy = $dy;
         $this->fill = $fill;
-        $this->filled = $filled;
         $this->fillOpacity = $fillOpacity;
+        $this->filled = $filled;
         $this->font = $font;
         $this->fontSize = $fontSize;
         $this->fontStyle = $fontStyle;
@@ -16484,6 +16484,83 @@ class BarConfig {
         return 'BarConfig::fill::41'; /*41:fill*/
     }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @param ?float $value
+     * @throws Exception
+     * @return ?float
+     */
+    public static function fromFillOpacity(?float $value): ?float {
+        if (!is_null($value)) {
+            return $value; /*float*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @throws Exception
+     * @return ?float
+     */
+    public function toFillOpacity(): ?float {
+        if (BarConfig::validateFillOpacity($this->fillOpacity))  {
+            if (!is_null($this->fillOpacity)) {
+                return $this->fillOpacity; /*float*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this BarConfig::fillOpacity');
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @param float|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateFillOpacity(?float $value): bool {
+        if (!is_null($value)) {
+        }
+        return true;
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @throws Exception
+     * @return ?float
+     */
+    public function getFillOpacity(): ?float {
+        if (BarConfig::validateFillOpacity($this->fillOpacity))  {
+            return $this->fillOpacity;
+        }
+        throw new Exception('never get to getFillOpacity BarConfig::fillOpacity');
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @return ?float
+     */
+    public static function sampleFillOpacity(): ?float {
+        return 42.042; /*42:fillOpacity*/
+    }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -16578,84 +16655,7 @@ class BarConfig {
      * @return ?bool
      */
     public static function sampleFilled(): ?bool {
-        return true; /*42:filled*/
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @param ?float $value
-     * @throws Exception
-     * @return ?float
-     */
-    public static function fromFillOpacity(?float $value): ?float {
-        if (!is_null($value)) {
-            return $value; /*float*/
-        } else {
-            return  null;
-        }
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @throws Exception
-     * @return ?float
-     */
-    public function toFillOpacity(): ?float {
-        if (BarConfig::validateFillOpacity($this->fillOpacity))  {
-            if (!is_null($this->fillOpacity)) {
-                return $this->fillOpacity; /*float*/
-            } else {
-                return  null;
-            }
-        }
-        throw new Exception('never get to this BarConfig::fillOpacity');
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @param float|null
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateFillOpacity(?float $value): bool {
-        if (!is_null($value)) {
-        }
-        return true;
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @throws Exception
-     * @return ?float
-     */
-    public function getFillOpacity(): ?float {
-        if (BarConfig::validateFillOpacity($this->fillOpacity))  {
-            return $this->fillOpacity;
-        }
-        throw new Exception('never get to getFillOpacity BarConfig::fillOpacity');
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @return ?float
-     */
-    public static function sampleFillOpacity(): ?float {
-        return 43.043; /*43:fillOpacity*/
+        return true; /*43:filled*/
     }
 
     /**
@@ -18270,8 +18270,8 @@ class BarConfig {
         || BarConfig::validateDx($this->dx)
         || BarConfig::validateDy($this->dy)
         || BarConfig::validateFill($this->fill)
-        || BarConfig::validateFilled($this->filled)
         || BarConfig::validateFillOpacity($this->fillOpacity)
+        || BarConfig::validateFilled($this->filled)
         || BarConfig::validateFont($this->font)
         || BarConfig::validateFontSize($this->fontSize)
         || BarConfig::validateFontStyle($this->fontStyle)
@@ -18311,8 +18311,8 @@ class BarConfig {
         $out->{'dx'} = $this->toDx();
         $out->{'dy'} = $this->toDy();
         $out->{'fill'} = $this->toFill();
-        $out->{'filled'} = $this->toFilled();
         $out->{'fillOpacity'} = $this->toFillOpacity();
+        $out->{'filled'} = $this->toFilled();
         $out->{'font'} = $this->toFont();
         $out->{'fontSize'} = $this->toFontSize();
         $out->{'fontStyle'} = $this->toFontStyle();
@@ -18354,8 +18354,8 @@ class BarConfig {
         ,BarConfig::fromDx($obj->{'dx'})
         ,BarConfig::fromDy($obj->{'dy'})
         ,BarConfig::fromFill($obj->{'fill'})
-        ,BarConfig::fromFilled($obj->{'filled'})
         ,BarConfig::fromFillOpacity($obj->{'fillOpacity'})
+        ,BarConfig::fromFilled($obj->{'filled'})
         ,BarConfig::fromFont($obj->{'font'})
         ,BarConfig::fromFontSize($obj->{'fontSize'})
         ,BarConfig::fromFontStyle($obj->{'fontStyle'})
@@ -18395,8 +18395,8 @@ class BarConfig {
         ,BarConfig::sampleDx()
         ,BarConfig::sampleDy()
         ,BarConfig::sampleFill()
-        ,BarConfig::sampleFilled()
         ,BarConfig::sampleFillOpacity()
+        ,BarConfig::sampleFilled()
         ,BarConfig::sampleFont()
         ,BarConfig::sampleFontSize()
         ,BarConfig::sampleFontStyle()
@@ -31466,8 +31466,8 @@ class TextConfig {
     private ?float $dx; // json:dx Optional
     private ?float $dy; // json:dy Optional
     private ?string $fill; // json:fill Optional
-    private ?bool $filled; // json:filled Optional
     private ?float $fillOpacity; // json:fillOpacity Optional
+    private ?bool $filled; // json:filled Optional
     private ?string $font; // json:font Optional
     private ?float $fontSize; // json:fontSize Optional
     private ?FontStyle $fontStyle; // json:fontStyle Optional
@@ -31499,8 +31499,8 @@ class TextConfig {
      * @param float|null $dx
      * @param float|null $dy
      * @param string|null $fill
-     * @param bool|null $filled
      * @param float|null $fillOpacity
+     * @param bool|null $filled
      * @param string|null $font
      * @param float|null $fontSize
      * @param FontStyle|null $fontStyle
@@ -31523,7 +31523,7 @@ class TextConfig {
      * @param string|null $text
      * @param float|null $theta
      */
-    public function __construct(?HorizontalAlign $align, ?float $angle, ?VerticalAlign $baseline, ?string $color, ?Cursor $cursor, ?float $dx, ?float $dy, ?string $fill, ?bool $filled, ?float $fillOpacity, ?string $font, ?float $fontSize, ?FontStyle $fontStyle, FontWeight|float|null $fontWeight, ?string $href, ?Interpolate $interpolate, ?float $limit, ?float $opacity, ?Orient $orient, ?float $radius, ?string $shape, ?bool $shortTimeLabels, ?float $size, ?string $stroke, ?array $strokeDash, ?float $strokeDashOffset, ?float $strokeOpacity, ?float $strokeWidth, ?float $tension, ?string $text, ?float $theta) {
+    public function __construct(?HorizontalAlign $align, ?float $angle, ?VerticalAlign $baseline, ?string $color, ?Cursor $cursor, ?float $dx, ?float $dy, ?string $fill, ?float $fillOpacity, ?bool $filled, ?string $font, ?float $fontSize, ?FontStyle $fontStyle, FontWeight|float|null $fontWeight, ?string $href, ?Interpolate $interpolate, ?float $limit, ?float $opacity, ?Orient $orient, ?float $radius, ?string $shape, ?bool $shortTimeLabels, ?float $size, ?string $stroke, ?array $strokeDash, ?float $strokeDashOffset, ?float $strokeOpacity, ?float $strokeWidth, ?float $tension, ?string $text, ?float $theta) {
         $this->align = $align;
         $this->angle = $angle;
         $this->baseline = $baseline;
@@ -31532,8 +31532,8 @@ class TextConfig {
         $this->dx = $dx;
         $this->dy = $dy;
         $this->fill = $fill;
-        $this->filled = $filled;
         $this->fillOpacity = $fillOpacity;
+        $this->filled = $filled;
         $this->font = $font;
         $this->fontSize = $fontSize;
         $this->fontStyle = $fontStyle;
@@ -32156,6 +32156,83 @@ class TextConfig {
         return 'TextConfig::fill::38'; /*38:fill*/
     }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @param ?float $value
+     * @throws Exception
+     * @return ?float
+     */
+    public static function fromFillOpacity(?float $value): ?float {
+        if (!is_null($value)) {
+            return $value; /*float*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @throws Exception
+     * @return ?float
+     */
+    public function toFillOpacity(): ?float {
+        if (TextConfig::validateFillOpacity($this->fillOpacity))  {
+            if (!is_null($this->fillOpacity)) {
+                return $this->fillOpacity; /*float*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this TextConfig::fillOpacity');
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @param float|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateFillOpacity(?float $value): bool {
+        if (!is_null($value)) {
+        }
+        return true;
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @throws Exception
+     * @return ?float
+     */
+    public function getFillOpacity(): ?float {
+        if (TextConfig::validateFillOpacity($this->fillOpacity))  {
+            return $this->fillOpacity;
+        }
+        throw new Exception('never get to getFillOpacity TextConfig::fillOpacity');
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @return ?float
+     */
+    public static function sampleFillOpacity(): ?float {
+        return 39.039; /*39:fillOpacity*/
+    }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -32250,84 +32327,7 @@ class TextConfig {
      * @return ?bool
      */
     public static function sampleFilled(): ?bool {
-        return true; /*39:filled*/
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @param ?float $value
-     * @throws Exception
-     * @return ?float
-     */
-    public static function fromFillOpacity(?float $value): ?float {
-        if (!is_null($value)) {
-            return $value; /*float*/
-        } else {
-            return  null;
-        }
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @throws Exception
-     * @return ?float
-     */
-    public function toFillOpacity(): ?float {
-        if (TextConfig::validateFillOpacity($this->fillOpacity))  {
-            if (!is_null($this->fillOpacity)) {
-                return $this->fillOpacity; /*float*/
-            } else {
-                return  null;
-            }
-        }
-        throw new Exception('never get to this TextConfig::fillOpacity');
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @param float|null
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateFillOpacity(?float $value): bool {
-        if (!is_null($value)) {
-        }
-        return true;
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @throws Exception
-     * @return ?float
-     */
-    public function getFillOpacity(): ?float {
-        if (TextConfig::validateFillOpacity($this->fillOpacity))  {
-            return $this->fillOpacity;
-        }
-        throw new Exception('never get to getFillOpacity TextConfig::fillOpacity');
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @return ?float
-     */
-    public static function sampleFillOpacity(): ?float {
-        return 40.04; /*40:fillOpacity*/
+        return true; /*40:filled*/
     }
 
     /**
@@ -34006,8 +34006,8 @@ class TextConfig {
         || TextConfig::validateDx($this->dx)
         || TextConfig::validateDy($this->dy)
         || TextConfig::validateFill($this->fill)
-        || TextConfig::validateFilled($this->filled)
         || TextConfig::validateFillOpacity($this->fillOpacity)
+        || TextConfig::validateFilled($this->filled)
         || TextConfig::validateFont($this->font)
         || TextConfig::validateFontSize($this->fontSize)
         || TextConfig::validateFontStyle($this->fontStyle)
@@ -34045,8 +34045,8 @@ class TextConfig {
         $out->{'dx'} = $this->toDx();
         $out->{'dy'} = $this->toDy();
         $out->{'fill'} = $this->toFill();
-        $out->{'filled'} = $this->toFilled();
         $out->{'fillOpacity'} = $this->toFillOpacity();
+        $out->{'filled'} = $this->toFilled();
         $out->{'font'} = $this->toFont();
         $out->{'fontSize'} = $this->toFontSize();
         $out->{'fontStyle'} = $this->toFontStyle();
@@ -34086,8 +34086,8 @@ class TextConfig {
         ,TextConfig::fromDx($obj->{'dx'})
         ,TextConfig::fromDy($obj->{'dy'})
         ,TextConfig::fromFill($obj->{'fill'})
-        ,TextConfig::fromFilled($obj->{'filled'})
         ,TextConfig::fromFillOpacity($obj->{'fillOpacity'})
+        ,TextConfig::fromFilled($obj->{'filled'})
         ,TextConfig::fromFont($obj->{'font'})
         ,TextConfig::fromFontSize($obj->{'fontSize'})
         ,TextConfig::fromFontStyle($obj->{'fontStyle'})
@@ -34125,8 +34125,8 @@ class TextConfig {
         ,TextConfig::sampleDx()
         ,TextConfig::sampleDy()
         ,TextConfig::sampleFill()
-        ,TextConfig::sampleFilled()
         ,TextConfig::sampleFillOpacity()
+        ,TextConfig::sampleFilled()
         ,TextConfig::sampleFont()
         ,TextConfig::sampleFontSize()
         ,TextConfig::sampleFontStyle()
@@ -34164,8 +34164,8 @@ class TickConfig {
     private ?float $dx; // json:dx Optional
     private ?float $dy; // json:dy Optional
     private ?string $fill; // json:fill Optional
-    private ?bool $filled; // json:filled Optional
     private ?float $fillOpacity; // json:fillOpacity Optional
+    private ?bool $filled; // json:filled Optional
     private ?string $font; // json:font Optional
     private ?float $fontSize; // json:fontSize Optional
     private ?FontStyle $fontStyle; // json:fontStyle Optional
@@ -34198,8 +34198,8 @@ class TickConfig {
      * @param float|null $dx
      * @param float|null $dy
      * @param string|null $fill
-     * @param bool|null $filled
      * @param float|null $fillOpacity
+     * @param bool|null $filled
      * @param string|null $font
      * @param float|null $fontSize
      * @param FontStyle|null $fontStyle
@@ -34222,7 +34222,7 @@ class TickConfig {
      * @param float|null $theta
      * @param float|null $thickness
      */
-    public function __construct(?HorizontalAlign $align, ?float $angle, ?float $bandSize, ?VerticalAlign $baseline, ?string $color, ?Cursor $cursor, ?float $dx, ?float $dy, ?string $fill, ?bool $filled, ?float $fillOpacity, ?string $font, ?float $fontSize, ?FontStyle $fontStyle, FontWeight|float|null $fontWeight, ?string $href, ?Interpolate $interpolate, ?float $limit, ?float $opacity, ?Orient $orient, ?float $radius, ?string $shape, ?float $size, ?string $stroke, ?array $strokeDash, ?float $strokeDashOffset, ?float $strokeOpacity, ?float $strokeWidth, ?float $tension, ?string $text, ?float $theta, ?float $thickness) {
+    public function __construct(?HorizontalAlign $align, ?float $angle, ?float $bandSize, ?VerticalAlign $baseline, ?string $color, ?Cursor $cursor, ?float $dx, ?float $dy, ?string $fill, ?float $fillOpacity, ?bool $filled, ?string $font, ?float $fontSize, ?FontStyle $fontStyle, FontWeight|float|null $fontWeight, ?string $href, ?Interpolate $interpolate, ?float $limit, ?float $opacity, ?Orient $orient, ?float $radius, ?string $shape, ?float $size, ?string $stroke, ?array $strokeDash, ?float $strokeDashOffset, ?float $strokeOpacity, ?float $strokeWidth, ?float $tension, ?string $text, ?float $theta, ?float $thickness) {
         $this->align = $align;
         $this->angle = $angle;
         $this->bandSize = $bandSize;
@@ -34232,8 +34232,8 @@ class TickConfig {
         $this->dx = $dx;
         $this->dy = $dy;
         $this->fill = $fill;
-        $this->filled = $filled;
         $this->fillOpacity = $fillOpacity;
+        $this->filled = $filled;
         $this->font = $font;
         $this->fontSize = $fontSize;
         $this->fontStyle = $fontStyle;
@@ -34933,6 +34933,83 @@ class TickConfig {
         return 'TickConfig::fill::39'; /*39:fill*/
     }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @param ?float $value
+     * @throws Exception
+     * @return ?float
+     */
+    public static function fromFillOpacity(?float $value): ?float {
+        if (!is_null($value)) {
+            return $value; /*float*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @throws Exception
+     * @return ?float
+     */
+    public function toFillOpacity(): ?float {
+        if (TickConfig::validateFillOpacity($this->fillOpacity))  {
+            if (!is_null($this->fillOpacity)) {
+                return $this->fillOpacity; /*float*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this TickConfig::fillOpacity');
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @param float|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateFillOpacity(?float $value): bool {
+        if (!is_null($value)) {
+        }
+        return true;
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @throws Exception
+     * @return ?float
+     */
+    public function getFillOpacity(): ?float {
+        if (TickConfig::validateFillOpacity($this->fillOpacity))  {
+            return $this->fillOpacity;
+        }
+        throw new Exception('never get to getFillOpacity TickConfig::fillOpacity');
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @return ?float
+     */
+    public static function sampleFillOpacity(): ?float {
+        return 40.04; /*40:fillOpacity*/
+    }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -35027,84 +35104,7 @@ class TickConfig {
      * @return ?bool
      */
     public static function sampleFilled(): ?bool {
-        return true; /*40:filled*/
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @param ?float $value
-     * @throws Exception
-     * @return ?float
-     */
-    public static function fromFillOpacity(?float $value): ?float {
-        if (!is_null($value)) {
-            return $value; /*float*/
-        } else {
-            return  null;
-        }
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @throws Exception
-     * @return ?float
-     */
-    public function toFillOpacity(): ?float {
-        if (TickConfig::validateFillOpacity($this->fillOpacity))  {
-            if (!is_null($this->fillOpacity)) {
-                return $this->fillOpacity; /*float*/
-            } else {
-                return  null;
-            }
-        }
-        throw new Exception('never get to this TickConfig::fillOpacity');
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @param float|null
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateFillOpacity(?float $value): bool {
-        if (!is_null($value)) {
-        }
-        return true;
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @throws Exception
-     * @return ?float
-     */
-    public function getFillOpacity(): ?float {
-        if (TickConfig::validateFillOpacity($this->fillOpacity))  {
-            return $this->fillOpacity;
-        }
-        throw new Exception('never get to getFillOpacity TickConfig::fillOpacity');
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @return ?float
-     */
-    public static function sampleFillOpacity(): ?float {
-        return 41.041; /*41:fillOpacity*/
+        return true; /*41:filled*/
     }
 
     /**
@@ -36794,8 +36794,8 @@ class TickConfig {
         || TickConfig::validateDx($this->dx)
         || TickConfig::validateDy($this->dy)
         || TickConfig::validateFill($this->fill)
-        || TickConfig::validateFilled($this->filled)
         || TickConfig::validateFillOpacity($this->fillOpacity)
+        || TickConfig::validateFilled($this->filled)
         || TickConfig::validateFont($this->font)
         || TickConfig::validateFontSize($this->fontSize)
         || TickConfig::validateFontStyle($this->fontStyle)
@@ -36834,8 +36834,8 @@ class TickConfig {
         $out->{'dx'} = $this->toDx();
         $out->{'dy'} = $this->toDy();
         $out->{'fill'} = $this->toFill();
-        $out->{'filled'} = $this->toFilled();
         $out->{'fillOpacity'} = $this->toFillOpacity();
+        $out->{'filled'} = $this->toFilled();
         $out->{'font'} = $this->toFont();
         $out->{'fontSize'} = $this->toFontSize();
         $out->{'fontStyle'} = $this->toFontStyle();
@@ -36876,8 +36876,8 @@ class TickConfig {
         ,TickConfig::fromDx($obj->{'dx'})
         ,TickConfig::fromDy($obj->{'dy'})
         ,TickConfig::fromFill($obj->{'fill'})
-        ,TickConfig::fromFilled($obj->{'filled'})
         ,TickConfig::fromFillOpacity($obj->{'fillOpacity'})
+        ,TickConfig::fromFilled($obj->{'filled'})
         ,TickConfig::fromFont($obj->{'font'})
         ,TickConfig::fromFontSize($obj->{'fontSize'})
         ,TickConfig::fromFontStyle($obj->{'fontStyle'})
@@ -36916,8 +36916,8 @@ class TickConfig {
         ,TickConfig::sampleDx()
         ,TickConfig::sampleDy()
         ,TickConfig::sampleFill()
-        ,TickConfig::sampleFilled()
         ,TickConfig::sampleFillOpacity()
+        ,TickConfig::sampleFilled()
         ,TickConfig::sampleFont()
         ,TickConfig::sampleFontSize()
         ,TickConfig::sampleFontStyle()
@@ -58822,8 +58822,8 @@ class Axis {
     private ?TitleOrient $orient; // json:orient Optional
     private ?float $position; // json:position Optional
     private ?float $tickCount; // json:tickCount Optional
-    private ?bool $ticks; // json:ticks Optional
     private ?float $tickSize; // json:tickSize Optional
+    private ?bool $ticks; // json:ticks Optional
     private ?string $title; // json:title Optional
     private ?float $titleMaxLength; // json:titleMaxLength Optional
     private ?float $titlePadding; // json:titlePadding Optional
@@ -58846,15 +58846,15 @@ class Axis {
      * @param TitleOrient|null $orient
      * @param float|null $position
      * @param float|null $tickCount
-     * @param bool|null $ticks
      * @param float|null $tickSize
+     * @param bool|null $ticks
      * @param string|null $title
      * @param float|null $titleMaxLength
      * @param float|null $titlePadding
      * @param array|null $values
      * @param float|null $zindex
      */
-    public function __construct(?bool $domain, ?string $format, ?bool $grid, ?float $labelAngle, bool|float|null $labelBound, bool|float|null $labelFlush, LabelOverlap|bool|null $labelOverlap, ?float $labelPadding, ?bool $labels, ?float $maxExtent, ?float $minExtent, ?float $offset, ?TitleOrient $orient, ?float $position, ?float $tickCount, ?bool $ticks, ?float $tickSize, ?string $title, ?float $titleMaxLength, ?float $titlePadding, ?array $values, ?float $zindex) {
+    public function __construct(?bool $domain, ?string $format, ?bool $grid, ?float $labelAngle, bool|float|null $labelBound, bool|float|null $labelFlush, LabelOverlap|bool|null $labelOverlap, ?float $labelPadding, ?bool $labels, ?float $maxExtent, ?float $minExtent, ?float $offset, ?TitleOrient $orient, ?float $position, ?float $tickCount, ?float $tickSize, ?bool $ticks, ?string $title, ?float $titleMaxLength, ?float $titlePadding, ?array $values, ?float $zindex) {
         $this->domain = $domain;
         $this->format = $format;
         $this->grid = $grid;
@@ -58870,8 +58870,8 @@ class Axis {
         $this->orient = $orient;
         $this->position = $position;
         $this->tickCount = $tickCount;
-        $this->ticks = $ticks;
         $this->tickSize = $tickSize;
+        $this->ticks = $ticks;
         $this->title = $title;
         $this->titleMaxLength = $titleMaxLength;
         $this->titlePadding = $titlePadding;
@@ -60242,137 +60242,137 @@ class Axis {
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
-     * @param ?bool $value
+     * @param ?float $value
      * @throws Exception
-     * @return ?bool
+     * @return ?float
      */
-    public static function fromTicks(?bool $value): ?bool {
+    public static function fromTickSize(?float $value): ?float {
         if (!is_null($value)) {
-            return $value; /*bool*/
+            return $value; /*float*/
         } else {
             return  null;
         }
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
      * @throws Exception
-     * @return ?bool
+     * @return ?float
      */
-    public function toTicks(): ?bool {
-        if (Axis::validateTicks($this->ticks))  {
-            if (!is_null($this->ticks)) {
-                return $this->ticks; /*bool*/
+    public function toTickSize(): ?float {
+        if (Axis::validateTickSize($this->tickSize))  {
+            if (!is_null($this->tickSize)) {
+                return $this->tickSize; /*float*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Axis::ticks');
+        throw new Exception('never get to this Axis::tickSize');
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
-     * @param bool|null
+     * @param float|null
      * @return bool
      * @throws Exception
      */
-    public static function validateTicks(?bool $value): bool {
+    public static function validateTickSize(?float $value): bool {
         if (!is_null($value)) {
         }
         return true;
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
      * @throws Exception
-     * @return ?bool
+     * @return ?float
      */
-    public function getTicks(): ?bool {
-        if (Axis::validateTicks($this->ticks))  {
-            return $this->ticks;
+    public function getTickSize(): ?float {
+        if (Axis::validateTickSize($this->tickSize))  {
+            return $this->tickSize;
         }
-        throw new Exception('never get to getTicks Axis::ticks');
+        throw new Exception('never get to getTickSize Axis::tickSize');
     }
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      *
-     * @return ?bool
+     * @return ?float
      */
-    public static function sampleTicks(): ?bool {
-        return true; /*46:ticks*/
+    public static function sampleTickSize(): ?float {
+        return 46.046; /*46:tickSize*/
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
-     * @param ?float $value
+     * @param ?bool $value
      * @throws Exception
-     * @return ?float
+     * @return ?bool
      */
-    public static function fromTickSize(?float $value): ?float {
+    public static function fromTicks(?bool $value): ?bool {
         if (!is_null($value)) {
-            return $value; /*float*/
+            return $value; /*bool*/
         } else {
             return  null;
         }
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
      * @throws Exception
-     * @return ?float
+     * @return ?bool
      */
-    public function toTickSize(): ?float {
-        if (Axis::validateTickSize($this->tickSize))  {
-            if (!is_null($this->tickSize)) {
-                return $this->tickSize; /*float*/
+    public function toTicks(): ?bool {
+        if (Axis::validateTicks($this->ticks))  {
+            if (!is_null($this->ticks)) {
+                return $this->ticks; /*bool*/
             } else {
                 return  null;
             }
         }
-        throw new Exception('never get to this Axis::tickSize');
+        throw new Exception('never get to this Axis::ticks');
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
-     * @param float|null
+     * @param bool|null
      * @return bool
      * @throws Exception
      */
-    public static function validateTickSize(?float $value): bool {
+    public static function validateTicks(?bool $value): bool {
         if (!is_null($value)) {
         }
         return true;
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
      * @throws Exception
-     * @return ?float
+     * @return ?bool
      */
-    public function getTickSize(): ?float {
-        if (Axis::validateTickSize($this->tickSize))  {
-            return $this->tickSize;
+    public function getTicks(): ?bool {
+        if (Axis::validateTicks($this->ticks))  {
+            return $this->ticks;
         }
-        throw new Exception('never get to getTickSize Axis::tickSize');
+        throw new Exception('never get to getTicks Axis::ticks');
     }
 
     /**
-     * The size in pixels of axis ticks.
+     * Boolean value that determines whether the axis should include ticks.
      *
-     * @return ?float
+     * @return ?bool
      */
-    public static function sampleTickSize(): ?float {
-        return 47.047; /*47:tickSize*/
+    public static function sampleTicks(): ?bool {
+        return true; /*47:ticks*/
     }
 
     /**
@@ -60847,8 +60847,8 @@ class Axis {
         || Axis::validateOrient($this->orient)
         || Axis::validatePosition($this->position)
         || Axis::validateTickCount($this->tickCount)
-        || Axis::validateTicks($this->ticks)
         || Axis::validateTickSize($this->tickSize)
+        || Axis::validateTicks($this->ticks)
         || Axis::validateTitle($this->title)
         || Axis::validateTitleMaxLength($this->titleMaxLength)
         || Axis::validateTitlePadding($this->titlePadding)
@@ -60877,8 +60877,8 @@ class Axis {
         $out->{'orient'} = $this->toOrient();
         $out->{'position'} = $this->toPosition();
         $out->{'tickCount'} = $this->toTickCount();
-        $out->{'ticks'} = $this->toTicks();
         $out->{'tickSize'} = $this->toTickSize();
+        $out->{'ticks'} = $this->toTicks();
         $out->{'title'} = $this->toTitle();
         $out->{'titleMaxLength'} = $this->toTitleMaxLength();
         $out->{'titlePadding'} = $this->toTitlePadding();
@@ -60909,8 +60909,8 @@ class Axis {
         ,Axis::fromOrient($obj->{'orient'})
         ,Axis::fromPosition($obj->{'position'})
         ,Axis::fromTickCount($obj->{'tickCount'})
-        ,Axis::fromTicks($obj->{'ticks'})
         ,Axis::fromTickSize($obj->{'tickSize'})
+        ,Axis::fromTicks($obj->{'ticks'})
         ,Axis::fromTitle($obj->{'title'})
         ,Axis::fromTitleMaxLength($obj->{'titleMaxLength'})
         ,Axis::fromTitlePadding($obj->{'titlePadding'})
@@ -60939,8 +60939,8 @@ class Axis {
         ,Axis::sampleOrient()
         ,Axis::samplePosition()
         ,Axis::sampleTickCount()
-        ,Axis::sampleTicks()
         ,Axis::sampleTickSize()
+        ,Axis::sampleTicks()
         ,Axis::sampleTitle()
         ,Axis::sampleTitleMaxLength()
         ,Axis::sampleTitlePadding()
@@ -66085,8 +66085,8 @@ class MarkDef {
     private ?float $dx; // json:dx Optional
     private ?float $dy; // json:dy Optional
     private ?string $fill; // json:fill Optional
-    private ?bool $filled; // json:filled Optional
     private ?float $fillOpacity; // json:fillOpacity Optional
+    private ?bool $filled; // json:filled Optional
     private ?string $font; // json:font Optional
     private ?float $fontSize; // json:fontSize Optional
     private ?FontStyle $fontStyle; // json:fontStyle Optional
@@ -66120,8 +66120,8 @@ class MarkDef {
      * @param float|null $dx
      * @param float|null $dy
      * @param string|null $fill
-     * @param bool|null $filled
      * @param float|null $fillOpacity
+     * @param bool|null $filled
      * @param string|null $font
      * @param float|null $fontSize
      * @param FontStyle|null $fontStyle
@@ -66145,7 +66145,7 @@ class MarkDef {
      * @param float|null $theta
      * @param Mark $type
      */
-    public function __construct(?HorizontalAlign $align, ?float $angle, ?VerticalAlign $baseline, ?bool $clip, ?string $color, ?Cursor $cursor, ?float $dx, ?float $dy, ?string $fill, ?bool $filled, ?float $fillOpacity, ?string $font, ?float $fontSize, ?FontStyle $fontStyle, FontWeight|float|null $fontWeight, ?string $href, ?Interpolate $interpolate, ?float $limit, ?float $opacity, ?Orient $orient, ?float $radius, ?string $shape, ?float $size, ?string $stroke, ?array $strokeDash, ?float $strokeDashOffset, ?float $strokeOpacity, ?float $strokeWidth, array|string|null $style, ?float $tension, ?string $text, ?float $theta, Mark $type) {
+    public function __construct(?HorizontalAlign $align, ?float $angle, ?VerticalAlign $baseline, ?bool $clip, ?string $color, ?Cursor $cursor, ?float $dx, ?float $dy, ?string $fill, ?float $fillOpacity, ?bool $filled, ?string $font, ?float $fontSize, ?FontStyle $fontStyle, FontWeight|float|null $fontWeight, ?string $href, ?Interpolate $interpolate, ?float $limit, ?float $opacity, ?Orient $orient, ?float $radius, ?string $shape, ?float $size, ?string $stroke, ?array $strokeDash, ?float $strokeDashOffset, ?float $strokeOpacity, ?float $strokeWidth, array|string|null $style, ?float $tension, ?string $text, ?float $theta, Mark $type) {
         $this->align = $align;
         $this->angle = $angle;
         $this->baseline = $baseline;
@@ -66155,8 +66155,8 @@ class MarkDef {
         $this->dx = $dx;
         $this->dy = $dy;
         $this->fill = $fill;
-        $this->filled = $filled;
         $this->fillOpacity = $fillOpacity;
+        $this->filled = $filled;
         $this->font = $font;
         $this->fontSize = $fontSize;
         $this->fontStyle = $fontStyle;
@@ -66847,6 +66847,83 @@ class MarkDef {
         return 'MarkDef::fill::39'; /*39:fill*/
     }
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @param ?float $value
+     * @throws Exception
+     * @return ?float
+     */
+    public static function fromFillOpacity(?float $value): ?float {
+        if (!is_null($value)) {
+            return $value; /*float*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @throws Exception
+     * @return ?float
+     */
+    public function toFillOpacity(): ?float {
+        if (MarkDef::validateFillOpacity($this->fillOpacity))  {
+            if (!is_null($this->fillOpacity)) {
+                return $this->fillOpacity; /*float*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this MarkDef::fillOpacity');
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @param float|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateFillOpacity(?float $value): bool {
+        if (!is_null($value)) {
+        }
+        return true;
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @throws Exception
+     * @return ?float
+     */
+    public function getFillOpacity(): ?float {
+        if (MarkDef::validateFillOpacity($this->fillOpacity))  {
+            return $this->fillOpacity;
+        }
+        throw new Exception('never get to getFillOpacity MarkDef::fillOpacity');
+    }
+
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     *
+     * @return ?float
+     */
+    public static function sampleFillOpacity(): ?float {
+        return 40.04; /*40:fillOpacity*/
+    }
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -66941,84 +67018,7 @@ class MarkDef {
      * @return ?bool
      */
     public static function sampleFilled(): ?bool {
-        return true; /*40:filled*/
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @param ?float $value
-     * @throws Exception
-     * @return ?float
-     */
-    public static function fromFillOpacity(?float $value): ?float {
-        if (!is_null($value)) {
-            return $value; /*float*/
-        } else {
-            return  null;
-        }
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @throws Exception
-     * @return ?float
-     */
-    public function toFillOpacity(): ?float {
-        if (MarkDef::validateFillOpacity($this->fillOpacity))  {
-            if (!is_null($this->fillOpacity)) {
-                return $this->fillOpacity; /*float*/
-            } else {
-                return  null;
-            }
-        }
-        throw new Exception('never get to this MarkDef::fillOpacity');
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @param float|null
-     * @return bool
-     * @throws Exception
-     */
-    public static function validateFillOpacity(?float $value): bool {
-        if (!is_null($value)) {
-        }
-        return true;
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @throws Exception
-     * @return ?float
-     */
-    public function getFillOpacity(): ?float {
-        if (MarkDef::validateFillOpacity($this->fillOpacity))  {
-            return $this->fillOpacity;
-        }
-        throw new Exception('never get to getFillOpacity MarkDef::fillOpacity');
-    }
-
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     *
-     * @return ?float
-     */
-    public static function sampleFillOpacity(): ?float {
-        return 41.041; /*41:fillOpacity*/
+        return true; /*41:filled*/
     }
 
     /**
@@ -68848,8 +68848,8 @@ class MarkDef {
         || MarkDef::validateDx($this->dx)
         || MarkDef::validateDy($this->dy)
         || MarkDef::validateFill($this->fill)
-        || MarkDef::validateFilled($this->filled)
         || MarkDef::validateFillOpacity($this->fillOpacity)
+        || MarkDef::validateFilled($this->filled)
         || MarkDef::validateFont($this->font)
         || MarkDef::validateFontSize($this->fontSize)
         || MarkDef::validateFontStyle($this->fontStyle)
@@ -68889,8 +68889,8 @@ class MarkDef {
         $out->{'dx'} = $this->toDx();
         $out->{'dy'} = $this->toDy();
         $out->{'fill'} = $this->toFill();
-        $out->{'filled'} = $this->toFilled();
         $out->{'fillOpacity'} = $this->toFillOpacity();
+        $out->{'filled'} = $this->toFilled();
         $out->{'font'} = $this->toFont();
         $out->{'fontSize'} = $this->toFontSize();
         $out->{'fontStyle'} = $this->toFontStyle();
@@ -68932,8 +68932,8 @@ class MarkDef {
         ,MarkDef::fromDx($obj->{'dx'})
         ,MarkDef::fromDy($obj->{'dy'})
         ,MarkDef::fromFill($obj->{'fill'})
-        ,MarkDef::fromFilled($obj->{'filled'})
         ,MarkDef::fromFillOpacity($obj->{'fillOpacity'})
+        ,MarkDef::fromFilled($obj->{'filled'})
         ,MarkDef::fromFont($obj->{'font'})
         ,MarkDef::fromFontSize($obj->{'fontSize'})
         ,MarkDef::fromFontStyle($obj->{'fontStyle'})
@@ -68973,8 +68973,8 @@ class MarkDef {
         ,MarkDef::sampleDx()
         ,MarkDef::sampleDy()
         ,MarkDef::sampleFill()
-        ,MarkDef::sampleFilled()
         ,MarkDef::sampleFillOpacity()
+        ,MarkDef::sampleFilled()
         ,MarkDef::sampleFont()
         ,MarkDef::sampleFontSize()
         ,MarkDef::sampleFontStyle()
diff --git a/base/schema-pike/test/inputs/schema/accessors.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/accessors.schema/default/TopLevel.pmod
index bec650a..ddd364d 100644
--- a/base/schema-pike/test/inputs/schema/accessors.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/accessors.schema/default/TopLevel.pmod
@@ -13,17 +13,17 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    string barre;           // json: "bar"
+    Union  unionization;    // json: "union"
     Enum   enumerification; // json: "enum"
     string foo;             // json: "foo"
-    Union  unionization;    // json: "union"
+    string barre;           // json: "bar"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "bar" : barre,
+            "union" : unionization,
             "enum" : enumerification,
             "foo" : foo,
-            "union" : unionization,
+            "bar" : barre,
         ]);
 
         return Standards.JSON.encode(json);
@@ -33,10 +33,10 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.barre = json["bar"];
+    retval.unionization = json["union"];
     retval.enumerification = json["enum"];
     retval.foo = json["foo"];
-    retval.unionization = json["union"];
+    retval.barre = json["bar"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.pmod
index 3ca72a5..bf92a91 100644
--- a/base/schema-pike/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.pmod
@@ -15,15 +15,15 @@
 class TopLevel {
     float        amount;      // json: "amount"
     Frequency    frequency;   // json: "frequency"
-    mixed|string description; // json: "description"
     Type         type;        // json: "type"
+    mixed|string description; // json: "description"
 
     string encode_json() {
         mapping(string:mixed) json = ([
             "amount" : amount,
             "frequency" : frequency,
-            "description" : description,
             "type" : type,
+            "description" : description,
         ]);
 
         return Standards.JSON.encode(json);
@@ -35,8 +35,8 @@ TopLevel TopLevel_from_JSON(mixed json) {
 
     retval.amount = json["amount"];
     retval.frequency = json["frequency"];
-    retval.description = json["description"];
     retval.type = json["type"];
+    retval.description = json["description"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/bool-string.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/bool-string.schema/default/TopLevel.pmod
index 708f041..83585fc 100644
--- a/base/schema-pike/test/inputs/schema/bool-string.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/bool-string.schema/default/TopLevel.pmod
@@ -13,21 +13,21 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    array(mixed|string)|mixed arr_nullable;             // json: "arrNullable"
-    array(string)|mixed       arr_one;                  // json: "arrOne"
-    mixed|string              nullable;                 // json: "nullable"
     string                    one;                      // json: "one"
     mixed|string              top_level_optional;       // json: "optional"
+    mixed|string              nullable;                 // json: "nullable"
+    array(string)|mixed       arr_one;                  // json: "arrOne"
+    array(mixed|string)|mixed arr_nullable;             // json: "arrNullable"
     UnionWithBool             union_with_bool;          // json: "unionWithBool"
     UnionWithBool             union_with_bool_and_enum; // json: "unionWithBoolAndEnum"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "arrNullable" : arr_nullable,
-            "arrOne" : arr_one,
-            "nullable" : nullable,
             "one" : one,
             "optional" : top_level_optional,
+            "nullable" : nullable,
+            "arrOne" : arr_one,
+            "arrNullable" : arr_nullable,
             "unionWithBool" : union_with_bool,
             "unionWithBoolAndEnum" : union_with_bool_and_enum,
         ]);
@@ -39,11 +39,11 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.arr_nullable = json["arrNullable"];
-    retval.arr_one = json["arrOne"];
-    retval.nullable = json["nullable"];
     retval.one = json["one"];
     retval.top_level_optional = json["optional"];
+    retval.nullable = json["nullable"];
+    retval.arr_one = json["arrOne"];
+    retval.arr_nullable = json["arrNullable"];
     retval.union_with_bool = json["unionWithBool"];
     retval.union_with_bool_and_enum = json["unionWithBoolAndEnum"];
 
diff --git a/base/schema-pike/test/inputs/schema/boolean-subschema.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/boolean-subschema.schema/default/TopLevel.pmod
index f443ff4..c91352a 100644
--- a/base/schema-pike/test/inputs/schema/boolean-subschema.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/boolean-subschema.schema/default/TopLevel.pmod
@@ -13,16 +13,16 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
+    string       foo;        // json: "foo"
     mixed        disallowed; // json: "disallowed"
     array(mixed) empty;      // json: "empty"
-    string       foo;        // json: "foo"
     mixed        impossible; // json: "impossible"
 
     string encode_json() {
         mapping(string:mixed) json = ([
+            "foo" : foo,
             "disallowed" : disallowed,
             "empty" : empty,
-            "foo" : foo,
             "impossible" : impossible,
         ]);
 
@@ -33,9 +33,9 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
+    retval.foo = json["foo"];
     retval.disallowed = json["disallowed"];
     retval.empty = json["empty"];
-    retval.foo = json["foo"];
     retval.impossible = json["impossible"];
 
     return retval;
diff --git a/base/schema-pike/test/inputs/schema/comment-injection.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/comment-injection.schema/default/TopLevel.pmod
index 1c30aaa..4a9a5df 100644
--- a/base/schema-pike/test/inputs/schema/comment-injection.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/comment-injection.schema/default/TopLevel.pmod
@@ -25,17 +25,17 @@
 // }
 // }
 class TopLevel {
+    string       value;                 // json: "value"
     mixed|string trailing_backslash;    // json: "trailingBackslash"
     mixed|string trailing_quote;        // json: "trailingQuote"
     mixed|string trailing_triple_quote; // json: "trailingTripleQuote"
-    string       value;                 // json: "value"
 
     string encode_json() {
         mapping(string:mixed) json = ([
+            "value" : value,
             "trailingBackslash" : trailing_backslash,
             "trailingQuote" : trailing_quote,
             "trailingTripleQuote" : trailing_triple_quote,
-            "value" : value,
         ]);
 
         return Standards.JSON.encode(json);
@@ -45,10 +45,10 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
+    retval.value = json["value"];
     retval.trailing_backslash = json["trailingBackslash"];
     retval.trailing_quote = json["trailingQuote"];
     retval.trailing_triple_quote = json["trailingTripleQuote"];
-    retval.value = json["value"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/const-non-string.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/const-non-string.schema/default/TopLevel.pmod
index 64b8174..ed22ba7 100644
--- a/base/schema-pike/test/inputs/schema/const-non-string.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/const-non-string.schema/default/TopLevel.pmod
@@ -13,19 +13,19 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
+    float version; // json: "version"
     int   amount;  // json: "amount"
+    float ratio;   // json: "ratio"
     bool  enabled; // json: "enabled"
     Kind  kind;    // json: "kind"
-    float ratio;   // json: "ratio"
-    float version; // json: "version"
 
     string encode_json() {
         mapping(string:mixed) json = ([
+            "version" : version,
             "amount" : amount,
+            "ratio" : ratio,
             "enabled" : enabled,
             "kind" : kind,
-            "ratio" : ratio,
-            "version" : version,
         ]);
 
         return Standards.JSON.encode(json);
@@ -35,11 +35,11 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
+    retval.version = json["version"];
     retval.amount = json["amount"];
+    retval.ratio = json["ratio"];
     retval.enabled = json["enabled"];
     retval.kind = json["kind"];
-    retval.ratio = json["ratio"];
-    retval.version = json["version"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/date-time-or-string.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/date-time-or-string.schema/default/TopLevel.pmod
index 3c8589a..81e99a3 100644
--- a/base/schema-pike/test/inputs/schema/date-time-or-string.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/date-time-or-string.schema/default/TopLevel.pmod
@@ -13,13 +13,13 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    string bar; // json: "bar"
     string foo; // json: "foo"
+    string bar; // json: "bar"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "bar" : bar,
             "foo" : foo,
+            "bar" : bar,
         ]);
 
         return Standards.JSON.encode(json);
@@ -29,8 +29,8 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.bar = json["bar"];
     retval.foo = json["foo"];
+    retval.bar = json["bar"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/date-time.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/date-time.schema/default/TopLevel.pmod
index 642fe6f..8661d32 100644
--- a/base/schema-pike/test/inputs/schema/date-time.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/date-time.schema/default/TopLevel.pmod
@@ -13,19 +13,19 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    array(ComplexUnionArray) complex_union_array; // json: "complex-union-array"
     string                   date;                // json: "date"
-    string                   date_time;           // json: "date-time"
     string                   time;                // json: "time"
+    string                   date_time;           // json: "date-time"
     array(string)            union_array;         // json: "union-array"
+    array(ComplexUnionArray) complex_union_array; // json: "complex-union-array"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "complex-union-array" : complex_union_array,
             "date" : date,
-            "date-time" : date_time,
             "time" : time,
+            "date-time" : date_time,
             "union-array" : union_array,
+            "complex-union-array" : complex_union_array,
         ]);
 
         return Standards.JSON.encode(json);
@@ -35,11 +35,11 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.complex_union_array = json["complex-union-array"];
     retval.date = json["date"];
-    retval.date_time = json["date-time"];
     retval.time = json["time"];
+    retval.date_time = json["date-time"];
     retval.union_array = json["union-array"];
+    retval.complex_union_array = json["complex-union-array"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/description.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/description.schema/default/TopLevel.pmod
index ee3f05e..8361c5d 100644
--- a/base/schema-pike/test/inputs/schema/description.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/description.schema/default/TopLevel.pmod
@@ -15,19 +15,19 @@
 // The top-level class.
 // Its description has two lines.
 class TopLevel {
-    bool|mixed          bar;              // json: "bar"
+    Union               union;            // json: "union"
     Enum                top_level_enum;   // json: "enum"
     float|mixed         foo;              // json: "foo"
+    bool|mixed          bar;              // json: "bar"
     ObjectOrStringUnion object_or_string; // json: "object-or-string"
-    Union               union;            // json: "union"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "bar" : bar,
+            "union" : union,
             "enum" : top_level_enum,
             "foo" : foo,
+            "bar" : bar,
             "object-or-string" : object_or_string,
-            "union" : union,
         ]);
 
         return Standards.JSON.encode(json);
@@ -37,11 +37,11 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.bar = json["bar"];
+    retval.union = json["union"];
     retval.top_level_enum = json["enum"];
     retval.foo = json["foo"];
+    retval.bar = json["bar"];
     retval.object_or_string = json["object-or-string"];
-    retval.union = json["union"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/direct-union.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/direct-union.schema/default/TopLevel.pmod
index 301f9f7..3364602 100644
--- a/base/schema-pike/test/inputs/schema/direct-union.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/direct-union.schema/default/TopLevel.pmod
@@ -33,13 +33,13 @@ TopLevel TopLevel_from_JSON(mixed json) {
 }
 
 class Thing {
-    Anything thing_optional; // json: "optional"
     Anything required;       // json: "required"
+    Anything thing_optional; // json: "optional"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "optional" : thing_optional,
             "required" : required,
+            "optional" : thing_optional,
         ]);
 
         return Standards.JSON.encode(json);
@@ -49,8 +49,8 @@ class Thing {
 Thing Thing_from_JSON(mixed json) {
     Thing retval = Thing();
 
-    retval.thing_optional = json["optional"];
     retval.required = json["required"];
+    retval.thing_optional = json["optional"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/enum.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/enum.schema/default/TopLevel.pmod
index 41ef5a0..a54bb6f 100644
--- a/base/schema-pike/test/inputs/schema/enum.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/enum.schema/default/TopLevel.pmod
@@ -13,19 +13,19 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    array(Arr)|mixed      arr;           // json: "arr"
-    mixed|string          top_level_for; // json: "for"
-    Gve                   gve;           // json: "gve"
     Lvc|mixed             lvc;           // json: "lvc"
+    Gve                   gve;           // json: "gve"
+    array(Arr)|mixed      arr;           // json: "arr"
     array(OtherArr)|mixed other_arr;     // json: "otherArr"
+    mixed|string          top_level_for; // json: "for"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "arr" : arr,
-            "for" : top_level_for,
-            "gve" : gve,
             "lvc" : lvc,
+            "gve" : gve,
+            "arr" : arr,
             "otherArr" : other_arr,
+            "for" : top_level_for,
         ]);
 
         return Standards.JSON.encode(json);
@@ -35,11 +35,11 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.arr = json["arr"];
-    retval.top_level_for = json["for"];
-    retval.gve = json["gve"];
     retval.lvc = json["lvc"];
+    retval.gve = json["gve"];
+    retval.arr = json["arr"];
     retval.other_arr = json["otherArr"];
+    retval.top_level_for = json["for"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/integer-string.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/integer-string.schema/default/TopLevel.pmod
index 48c648c..6e3ad8a 100644
--- a/base/schema-pike/test/inputs/schema/integer-string.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/integer-string.schema/default/TopLevel.pmod
@@ -13,21 +13,21 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    array(mixed|string)|mixed arr_nullable;            // json: "arrNullable"
-    array(string)|mixed       arr_one;                 // json: "arrOne"
-    mixed|string              nullable;                // json: "nullable"
     string                    one;                     // json: "one"
     mixed|string              top_level_optional;      // json: "optional"
+    mixed|string              nullable;                // json: "nullable"
+    array(string)|mixed       arr_one;                 // json: "arrOne"
+    array(mixed|string)|mixed arr_nullable;            // json: "arrNullable"
     UnionWithInt              union_with_int;          // json: "unionWithInt"
     UnionWithInt              union_with_int_and_enum; // json: "unionWithIntAndEnum"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "arrNullable" : arr_nullable,
-            "arrOne" : arr_one,
-            "nullable" : nullable,
             "one" : one,
             "optional" : top_level_optional,
+            "nullable" : nullable,
+            "arrOne" : arr_one,
+            "arrNullable" : arr_nullable,
             "unionWithInt" : union_with_int,
             "unionWithIntAndEnum" : union_with_int_and_enum,
         ]);
@@ -39,11 +39,11 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.arr_nullable = json["arrNullable"];
-    retval.arr_one = json["arrOne"];
-    retval.nullable = json["nullable"];
     retval.one = json["one"];
     retval.top_level_optional = json["optional"];
+    retval.nullable = json["nullable"];
+    retval.arr_one = json["arrOne"];
+    retval.arr_nullable = json["arrNullable"];
     retval.union_with_int = json["unionWithInt"];
     retval.union_with_int_and_enum = json["unionWithIntAndEnum"];
 
diff --git a/base/schema-pike/test/inputs/schema/integer-type.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/integer-type.schema/default/TopLevel.pmod
index 4d75fc7..c208269 100644
--- a/base/schema-pike/test/inputs/schema/integer-type.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/integer-type.schema/default/TopLevel.pmod
@@ -13,27 +13,27 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
+    int small_positive; // json: "small_positive"
+    int small_negative; // json: "small_negative"
+    int i32_range;      // json: "i32_range"
     int above_i32_max;  // json: "above_i32_max"
     int below_i32_min;  // json: "below_i32_min"
-    int i32_range;      // json: "i32_range"
-    int large_bounds;   // json: "large_bounds"
-    int only_maximum;   // json: "only_maximum"
     int only_minimum;   // json: "only_minimum"
-    int small_negative; // json: "small_negative"
-    int small_positive; // json: "small_positive"
+    int only_maximum;   // json: "only_maximum"
     int unbounded;      // json: "unbounded"
+    int large_bounds;   // json: "large_bounds"
 
     string encode_json() {
         mapping(string:mixed) json = ([
+            "small_positive" : small_positive,
+            "small_negative" : small_negative,
+            "i32_range" : i32_range,
             "above_i32_max" : above_i32_max,
             "below_i32_min" : below_i32_min,
-            "i32_range" : i32_range,
-            "large_bounds" : large_bounds,
-            "only_maximum" : only_maximum,
             "only_minimum" : only_minimum,
-            "small_negative" : small_negative,
-            "small_positive" : small_positive,
+            "only_maximum" : only_maximum,
             "unbounded" : unbounded,
+            "large_bounds" : large_bounds,
         ]);
 
         return Standards.JSON.encode(json);
@@ -43,15 +43,15 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
+    retval.small_positive = json["small_positive"];
+    retval.small_negative = json["small_negative"];
+    retval.i32_range = json["i32_range"];
     retval.above_i32_max = json["above_i32_max"];
     retval.below_i32_min = json["below_i32_min"];
-    retval.i32_range = json["i32_range"];
-    retval.large_bounds = json["large_bounds"];
-    retval.only_maximum = json["only_maximum"];
     retval.only_minimum = json["only_minimum"];
-    retval.small_negative = json["small_negative"];
-    retval.small_positive = json["small_positive"];
+    retval.only_maximum = json["only_maximum"];
     retval.unbounded = json["unbounded"];
+    retval.large_bounds = json["large_bounds"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/light.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/light.schema/default/TopLevel.pmod
index e46f723..1f1846f 100644
--- a/base/schema-pike/test/inputs/schema/light.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/light.schema/default/TopLevel.pmod
@@ -33,14 +33,14 @@ TopLevel TopLevel_from_JSON(mixed json) {
 }
 
 class LightParams {
-    string app_id;    // json: "app_id"
     string outlet_id; // json: "outlet_id"
+    string app_id;    // json: "app_id"
     string rgba;      // json: "rgba"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "app_id" : app_id,
             "outlet_id" : outlet_id,
+            "app_id" : app_id,
             "rgba" : rgba,
         ]);
 
@@ -51,8 +51,8 @@ class LightParams {
 LightParams LightParams_from_JSON(mixed json) {
     LightParams retval = LightParams();
 
-    retval.app_id = json["app_id"];
     retval.outlet_id = json["outlet_id"];
+    retval.app_id = json["app_id"];
     retval.rgba = json["rgba"];
 
     return retval;
diff --git a/base/schema-pike/test/inputs/schema/min-max-items.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/min-max-items.schema/default/TopLevel.pmod
index 138bdfc..11b32f0 100644
--- a/base/schema-pike/test/inputs/schema/min-max-items.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/min-max-items.schema/default/TopLevel.pmod
@@ -13,17 +13,17 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
+    array(string)    min_only;    // json: "minOnly"
     array(int)       max_only;    // json: "maxOnly"
     array(float)     min_and_max; // json: "minAndMax"
-    array(string)    min_only;    // json: "minOnly"
     array(string)    plain;       // json: "plain"
     array(UnionItem) union_items; // json: "unionItems"
 
     string encode_json() {
         mapping(string:mixed) json = ([
+            "minOnly" : min_only,
             "maxOnly" : max_only,
             "minAndMax" : min_and_max,
-            "minOnly" : min_only,
             "plain" : plain,
             "unionItems" : union_items,
         ]);
@@ -35,9 +35,9 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
+    retval.min_only = json["minOnly"];
     retval.max_only = json["maxOnly"];
     retval.min_and_max = json["minAndMax"];
-    retval.min_only = json["minOnly"];
     retval.plain = json["plain"];
     retval.union_items = json["unionItems"];
 
diff --git a/base/schema-pike/test/inputs/schema/minmax-integer.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/minmax-integer.schema/default/TopLevel.pmod
index bcb4d4b..8a77a2b 100644
--- a/base/schema-pike/test/inputs/schema/minmax-integer.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/minmax-integer.schema/default/TopLevel.pmod
@@ -14,24 +14,24 @@
 
 class TopLevel {
     int free;                 // json: "free"
-    int intersection;         // json: "intersection"
-    int max;                  // json: "max"
     int min;                  // json: "min"
+    int max;                  // json: "max"
     int minmax;               // json: "minmax"
-    int min_max_intersection; // json: "minMaxIntersection"
-    int min_max_union;        // json: "minMaxUnion"
     int union;                // json: "union"
+    int min_max_union;        // json: "minMaxUnion"
+    int intersection;         // json: "intersection"
+    int min_max_intersection; // json: "minMaxIntersection"
 
     string encode_json() {
         mapping(string:mixed) json = ([
             "free" : free,
-            "intersection" : intersection,
-            "max" : max,
             "min" : min,
+            "max" : max,
             "minmax" : minmax,
-            "minMaxIntersection" : min_max_intersection,
-            "minMaxUnion" : min_max_union,
             "union" : union,
+            "minMaxUnion" : min_max_union,
+            "intersection" : intersection,
+            "minMaxIntersection" : min_max_intersection,
         ]);
 
         return Standards.JSON.encode(json);
@@ -42,13 +42,13 @@ TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
     retval.free = json["free"];
-    retval.intersection = json["intersection"];
-    retval.max = json["max"];
     retval.min = json["min"];
+    retval.max = json["max"];
     retval.minmax = json["minmax"];
-    retval.min_max_intersection = json["minMaxIntersection"];
-    retval.min_max_union = json["minMaxUnion"];
     retval.union = json["union"];
+    retval.min_max_union = json["minMaxUnion"];
+    retval.intersection = json["intersection"];
+    retval.min_max_intersection = json["minMaxIntersection"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/minmaxlength.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/minmaxlength.schema/default/TopLevel.pmod
index a60cbb5..4bdd252 100644
--- a/base/schema-pike/test/inputs/schema/minmaxlength.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/minmaxlength.schema/default/TopLevel.pmod
@@ -13,25 +13,25 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    string  intersection;         // json: "intersection"
-    InUnion in_union;             // json: "inUnion"
-    string  maxlength;            // json: "maxlength"
     string  minlength;            // json: "minlength"
-    string  min_max_intersection; // json: "minMaxIntersection"
+    string  maxlength;            // json: "maxlength"
     string  minmaxlength;         // json: "minmaxlength"
-    string  min_max_union;        // json: "minMaxUnion"
     string  union;                // json: "union"
+    InUnion in_union;             // json: "inUnion"
+    string  min_max_union;        // json: "minMaxUnion"
+    string  intersection;         // json: "intersection"
+    string  min_max_intersection; // json: "minMaxIntersection"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "intersection" : intersection,
-            "inUnion" : in_union,
-            "maxlength" : maxlength,
             "minlength" : minlength,
-            "minMaxIntersection" : min_max_intersection,
+            "maxlength" : maxlength,
             "minmaxlength" : minmaxlength,
-            "minMaxUnion" : min_max_union,
             "union" : union,
+            "inUnion" : in_union,
+            "minMaxUnion" : min_max_union,
+            "intersection" : intersection,
+            "minMaxIntersection" : min_max_intersection,
         ]);
 
         return Standards.JSON.encode(json);
@@ -41,14 +41,14 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.intersection = json["intersection"];
-    retval.in_union = json["inUnion"];
-    retval.maxlength = json["maxlength"];
     retval.minlength = json["minlength"];
-    retval.min_max_intersection = json["minMaxIntersection"];
+    retval.maxlength = json["maxlength"];
     retval.minmaxlength = json["minmaxlength"];
-    retval.min_max_union = json["minMaxUnion"];
     retval.union = json["union"];
+    retval.in_union = json["inUnion"];
+    retval.min_max_union = json["minMaxUnion"];
+    retval.intersection = json["intersection"];
+    retval.min_max_intersection = json["minMaxIntersection"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/non-standard-ref.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/non-standard-ref.schema/default/TopLevel.pmod
index ad59bb8..8d59b66 100644
--- a/base/schema-pike/test/inputs/schema/non-standard-ref.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/non-standard-ref.schema/default/TopLevel.pmod
@@ -13,14 +13,14 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    int  bar;  // json: "bar"
     int  foo;  // json: "foo"
+    int  bar;  // json: "bar"
     bool quux; // json: "quux"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "bar" : bar,
             "foo" : foo,
+            "bar" : bar,
             "quux" : quux,
         ]);
 
@@ -31,8 +31,8 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.bar = json["bar"];
     retval.foo = json["foo"];
+    retval.bar = json["bar"];
     retval.quux = json["quux"];
 
     return retval;
diff --git a/base/schema-pike/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.pmod
index d623a00..e359638 100644
--- a/base/schema-pike/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.pmod
@@ -13,13 +13,13 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    mixed|string b;    // json: "b"
     Kind         kind; // json: "kind"
+    mixed|string b;    // json: "b"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "b" : b,
             "kind" : kind,
+            "b" : b,
         ]);
 
         return Standards.JSON.encode(json);
@@ -29,8 +29,8 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.b = json["b"];
     retval.kind = json["kind"];
+    retval.b = json["b"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/optional-any.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/optional-any.schema/default/TopLevel.pmod
index e501fb6..dc82430 100644
--- a/base/schema-pike/test/inputs/schema/optional-any.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/optional-any.schema/default/TopLevel.pmod
@@ -13,13 +13,13 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    bool  bar; // json: "bar"
     mixed foo; // json: "foo"
+    bool  bar; // json: "bar"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "bar" : bar,
             "foo" : foo,
+            "bar" : bar,
         ]);
 
         return Standards.JSON.encode(json);
@@ -29,8 +29,8 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.bar = json["bar"];
     retval.foo = json["foo"];
+    retval.bar = json["bar"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/optional-const-ref.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/optional-const-ref.schema/default/TopLevel.pmod
index 5346a48..3007782 100644
--- a/base/schema-pike/test/inputs/schema/optional-const-ref.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/optional-const-ref.schema/default/TopLevel.pmod
@@ -14,22 +14,22 @@
 
 class TopLevel {
     array(Coordinate)|mixed coordinates;          // json: "coordinates"
-    int|mixed               count;                // json: "count"
-    mixed|string            label;                // json: "label"
     array(Coordinate)       required_coordinates; // json: "requiredCoordinates"
+    int|mixed               count;                // json: "count"
     int                     required_count;       // json: "requiredCount"
-    string                  required_label;       // json: "requiredLabel"
     float|mixed             weight;               // json: "weight"
+    mixed|string            label;                // json: "label"
+    string                  required_label;       // json: "requiredLabel"
 
     string encode_json() {
         mapping(string:mixed) json = ([
             "coordinates" : coordinates,
-            "count" : count,
-            "label" : label,
             "requiredCoordinates" : required_coordinates,
+            "count" : count,
             "requiredCount" : required_count,
-            "requiredLabel" : required_label,
             "weight" : weight,
+            "label" : label,
+            "requiredLabel" : required_label,
         ]);
 
         return Standards.JSON.encode(json);
@@ -40,12 +40,12 @@ TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
     retval.coordinates = json["coordinates"];
-    retval.count = json["count"];
-    retval.label = json["label"];
     retval.required_coordinates = json["requiredCoordinates"];
+    retval.count = json["count"];
     retval.required_count = json["requiredCount"];
-    retval.required_label = json["requiredLabel"];
     retval.weight = json["weight"];
+    retval.label = json["label"];
+    retval.required_label = json["requiredLabel"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/optional-constraints.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/optional-constraints.schema/default/TopLevel.pmod
index b3aba94..2891dcf 100644
--- a/base/schema-pike/test/inputs/schema/optional-constraints.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/optional-constraints.schema/default/TopLevel.pmod
@@ -13,19 +13,19 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    float|mixed  opt_double;   // json: "optDouble"
+    int          req_zero_min; // json: "reqZeroMin"
     int|mixed    opt_int;      // json: "optInt"
-    mixed|string opt_pattern;  // json: "optPattern"
+    float|mixed  opt_double;   // json: "optDouble"
     mixed|string opt_string;   // json: "optString"
-    int          req_zero_min; // json: "reqZeroMin"
+    mixed|string opt_pattern;  // json: "optPattern"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "optDouble" : opt_double,
+            "reqZeroMin" : req_zero_min,
             "optInt" : opt_int,
-            "optPattern" : opt_pattern,
+            "optDouble" : opt_double,
             "optString" : opt_string,
-            "reqZeroMin" : req_zero_min,
+            "optPattern" : opt_pattern,
         ]);
 
         return Standards.JSON.encode(json);
@@ -35,11 +35,11 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.opt_double = json["optDouble"];
+    retval.req_zero_min = json["reqZeroMin"];
     retval.opt_int = json["optInt"];
-    retval.opt_pattern = json["optPattern"];
+    retval.opt_double = json["optDouble"];
     retval.opt_string = json["optString"];
-    retval.req_zero_min = json["reqZeroMin"];
+    retval.opt_pattern = json["optPattern"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/optional-date-time.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/optional-date-time.schema/default/TopLevel.pmod
index 8eb889b..f20c056 100644
--- a/base/schema-pike/test/inputs/schema/optional-date-time.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/optional-date-time.schema/default/TopLevel.pmod
@@ -13,21 +13,21 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    mixed|string optional_date;      // json: "optional-date"
-    mixed|string optional_date_time; // json: "optional-date-time"
-    mixed|string optional_time;      // json: "optional-time"
     string       required_date;      // json: "required-date"
-    string       required_date_time; // json: "required-date-time"
     string       required_time;      // json: "required-time"
+    string       required_date_time; // json: "required-date-time"
+    mixed|string optional_date;      // json: "optional-date"
+    mixed|string optional_time;      // json: "optional-time"
+    mixed|string optional_date_time; // json: "optional-date-time"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "optional-date" : optional_date,
-            "optional-date-time" : optional_date_time,
-            "optional-time" : optional_time,
             "required-date" : required_date,
-            "required-date-time" : required_date_time,
             "required-time" : required_time,
+            "required-date-time" : required_date_time,
+            "optional-date" : optional_date,
+            "optional-time" : optional_time,
+            "optional-date-time" : optional_date_time,
         ]);
 
         return Standards.JSON.encode(json);
@@ -37,12 +37,12 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.optional_date = json["optional-date"];
-    retval.optional_date_time = json["optional-date-time"];
-    retval.optional_time = json["optional-time"];
     retval.required_date = json["required-date"];
-    retval.required_date_time = json["required-date-time"];
     retval.required_time = json["required-time"];
+    retval.required_date_time = json["required-date-time"];
+    retval.optional_date = json["optional-date"];
+    retval.optional_time = json["optional-time"];
+    retval.optional_date_time = json["optional-date-time"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/prefix-items.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/prefix-items.schema/default/TopLevel.pmod
index f445264..6f702a5 100644
--- a/base/schema-pike/test/inputs/schema/prefix-items.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/prefix-items.schema/default/TopLevel.pmod
@@ -13,13 +13,13 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    array(Open) open;  // json: "open"
     array(Open) tuple; // json: "tuple"
+    array(Open) open;  // json: "open"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "open" : open,
             "tuple" : tuple,
+            "open" : open,
         ]);
 
         return Standards.JSON.encode(json);
@@ -29,8 +29,8 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.open = json["open"];
     retval.tuple = json["tuple"];
+    retval.open = json["open"];
 
     return retval;
 }
diff --git a/head/schema-pike/test/inputs/schema/property-order.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/property-order.schema/default/TopLevel.pmod
new file mode 100644
index 0000000..9655c62
--- /dev/null
+++ b/head/schema-pike/test/inputs/schema/property-order.schema/default/TopLevel.pmod
@@ -0,0 +1,74 @@
+// This source has been automatically generated by quicktype.
+// ( https://github.com/quicktype/quicktype )
+//
+// To use this code, simply import it into your project as a Pike module.
+// To JSON-encode your object, you can pass it to `Standards.JSON.encode`
+// or call `encode_json` on it.
+//
+// To decode a JSON string, first pass it to `Standards.JSON.decode`,
+// and then pass the result to `<YourClass>_from_JSON`.
+// It will return an instance of <YourClass>.
+// Bear in mind that these functions have unexpected behavior,
+// and will likely throw an error, if the JSON string does not
+// match the expected interface, even if the JSON itself is valid.
+
+class TopLevel {
+    string  zebra;   // json: "zebra"
+    float   mango;   // json: "mango"
+    bool    apple;   // json: "apple"
+    string  delta;   // json: "delta"
+    int     banana;  // json: "banana"
+    Ordered ordered; // json: "ordered"
+
+    string encode_json() {
+        mapping(string:mixed) json = ([
+            "zebra" : zebra,
+            "mango" : mango,
+            "apple" : apple,
+            "delta" : delta,
+            "banana" : banana,
+            "ordered" : ordered,
+        ]);
+
+        return Standards.JSON.encode(json);
+    }
+}
+
+TopLevel TopLevel_from_JSON(mixed json) {
+    TopLevel retval = TopLevel();
+
+    retval.zebra = json["zebra"];
+    retval.mango = json["mango"];
+    retval.apple = json["apple"];
+    retval.delta = json["delta"];
+    retval.banana = json["banana"];
+    retval.ordered = json["ordered"];
+
+    return retval;
+}
+
+class Ordered {
+    float  mango; // json: "mango"
+    string zebra; // json: "zebra"
+    bool   apple; // json: "apple"
+
+    string encode_json() {
+        mapping(string:mixed) json = ([
+            "mango" : mango,
+            "zebra" : zebra,
+            "apple" : apple,
+        ]);
+
+        return Standards.JSON.encode(json);
+    }
+}
+
+Ordered Ordered_from_JSON(mixed json) {
+    Ordered retval = Ordered();
+
+    retval.mango = json["mango"];
+    retval.zebra = json["zebra"];
+    retval.apple = json["apple"];
+
+    return retval;
+}
diff --git a/base/schema-pike/test/inputs/schema/renaming-bug.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/renaming-bug.schema/default/TopLevel.pmod
index c8bc56f..bd737a2 100644
--- a/base/schema-pike/test/inputs/schema/renaming-bug.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/renaming-bug.schema/default/TopLevel.pmod
@@ -40,14 +40,14 @@ TopLevel TopLevel_from_JSON(mixed json) {
 
 class Fruit {
     bool|mixed         apple;   // json: "apple"
-    array(Berry)|mixed berries; // json: "berries"
     bool|mixed         orange;  // json: "orange"
+    array(Berry)|mixed berries; // json: "berries"
 
     string encode_json() {
         mapping(string:mixed) json = ([
             "apple" : apple,
-            "berries" : berries,
             "orange" : orange,
+            "berries" : berries,
         ]);
 
         return Standards.JSON.encode(json);
@@ -58,21 +58,21 @@ Fruit Fruit_from_JSON(mixed json) {
     Fruit retval = Fruit();
 
     retval.apple = json["apple"];
-    retval.berries = json["berries"];
     retval.orange = json["orange"];
+    retval.berries = json["berries"];
 
     return retval;
 }
 
 class Berry {
-    Color|mixed        color;  // json: "color"
     mixed|string       name;   // json: "name"
+    Color|mixed        color;  // json: "color"
     array(Shape)|mixed shapes; // json: "shapes"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "color" : color,
             "name" : name,
+            "color" : color,
             "shapes" : shapes,
         ]);
 
@@ -83,8 +83,8 @@ class Berry {
 Berry Berry_from_JSON(mixed json) {
     Berry retval = Berry();
 
-    retval.color = json["color"];
     retval.name = json["name"];
+    retval.color = json["color"];
     retval.shapes = json["shapes"];
 
     return retval;
@@ -111,13 +111,13 @@ Color Color_from_JSON(mixed json) {
 }
 
 class Shape {
-    Geometry|mixed geometry; // json: "geometry"
     History|mixed  history;  // json: "history"
+    Geometry|mixed geometry; // json: "geometry"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "geometry" : geometry,
             "history" : history,
+            "geometry" : geometry,
         ]);
 
         return Standards.JSON.encode(json);
@@ -127,8 +127,8 @@ class Shape {
 Shape Shape_from_JSON(mixed json) {
     Shape retval = Shape();
 
-    retval.geometry = json["geometry"];
     retval.history = json["history"];
+    retval.geometry = json["geometry"];
 
     return retval;
 }
@@ -197,15 +197,15 @@ RectShape RectShape_from_JSON(mixed json) {
 }
 
 class Part {
-    mixed|string depth;  // json: "depth"
     mixed|string length; // json: "length"
     mixed|string width;  // json: "width"
+    mixed|string depth;  // json: "depth"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "depth" : depth,
             "length" : length,
             "width" : width,
+            "depth" : depth,
         ]);
 
         return Standards.JSON.encode(json);
@@ -215,9 +215,9 @@ class Part {
 Part Part_from_JSON(mixed json) {
     Part retval = Part();
 
-    retval.depth = json["depth"];
     retval.length = json["length"];
     retval.width = json["width"];
+    retval.depth = json["depth"];
 
     return retval;
 }
@@ -243,21 +243,21 @@ History History_from_JSON(mixed json) {
 }
 
 class Vehicle {
-    mixed|string      brand;      // json: "brand"
     mixed|string      id;         // json: "id"
-    Speed|mixed       speed;      // json: "speed"
-    bool|mixed        sub_module; // json: "subModule"
     VehicleType|mixed type;       // json: "type"
+    Speed|mixed       speed;      // json: "speed"
     mixed|string      year;       // json: "year"
+    mixed|string      brand;      // json: "brand"
+    bool|mixed        sub_module; // json: "subModule"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "brand" : brand,
             "id" : id,
-            "speed" : speed,
-            "subModule" : sub_module,
             "type" : type,
+            "speed" : speed,
             "year" : year,
+            "brand" : brand,
+            "subModule" : sub_module,
         ]);
 
         return Standards.JSON.encode(json);
@@ -267,12 +267,12 @@ class Vehicle {
 Vehicle Vehicle_from_JSON(mixed json) {
     Vehicle retval = Vehicle();
 
-    retval.brand = json["brand"];
     retval.id = json["id"];
-    retval.speed = json["speed"];
-    retval.sub_module = json["subModule"];
     retval.type = json["type"];
+    retval.speed = json["speed"];
     retval.year = json["year"];
+    retval.brand = json["brand"];
+    retval.sub_module = json["subModule"];
 
     return retval;
 }
@@ -298,13 +298,13 @@ Speed Speed_from_JSON(mixed json) {
 }
 
 class Limit {
-    float|mixed maximum; // json: "maximum"
     float|mixed minimum; // json: "minimum"
+    float|mixed maximum; // json: "maximum"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "maximum" : maximum,
             "minimum" : minimum,
+            "maximum" : maximum,
         ]);
 
         return Standards.JSON.encode(json);
@@ -314,8 +314,8 @@ class Limit {
 Limit Limit_from_JSON(mixed json) {
     Limit retval = Limit();
 
-    retval.maximum = json["maximum"];
     retval.minimum = json["minimum"];
+    retval.maximum = json["maximum"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.pmod
index 24107bc..331e506 100644
--- a/base/schema-pike/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.pmod
@@ -13,13 +13,13 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    Next   next;  // json: "next"
     string value; // json: "value"
+    Next   next;  // json: "next"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "next" : next,
             "value" : value,
+            "next" : next,
         ]);
 
         return Standards.JSON.encode(json);
@@ -29,20 +29,20 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.next = json["next"];
     retval.value = json["value"];
+    retval.next = json["next"];
 
     return retval;
 }
 
 class Node {
-    Next   next;  // json: "next"
     string value; // json: "value"
+    Next   next;  // json: "next"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "next" : next,
             "value" : value,
+            "next" : next,
         ]);
 
         return Standards.JSON.encode(json);
@@ -52,8 +52,8 @@ class Node {
 Node Node_from_JSON(mixed json) {
     Node retval = Node();
 
-    retval.next = json["next"];
     retval.value = json["value"];
+    retval.next = json["next"];
 
     return retval;
 }
diff --git a/base/schema-pike/test/inputs/schema/uuid.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/uuid.schema/default/TopLevel.pmod
index 36c215d..faba962 100644
--- a/base/schema-pike/test/inputs/schema/uuid.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/uuid.schema/default/TopLevel.pmod
@@ -13,20 +13,20 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
-    array(mixed|string)|mixed arr_nullable;       // json: "arrNullable"
-    array(string)|mixed       arr_one;            // json: "arrOne"
-    mixed|string              nullable;           // json: "nullable"
     string                    one;                // json: "one"
     mixed|string              top_level_optional; // json: "optional"
+    mixed|string              nullable;           // json: "nullable"
+    array(string)|mixed       arr_one;            // json: "arrOne"
+    array(mixed|string)|mixed arr_nullable;       // json: "arrNullable"
     string                    union_with_enum;    // json: "unionWithEnum"
 
     string encode_json() {
         mapping(string:mixed) json = ([
-            "arrNullable" : arr_nullable,
-            "arrOne" : arr_one,
-            "nullable" : nullable,
             "one" : one,
             "optional" : top_level_optional,
+            "nullable" : nullable,
+            "arrOne" : arr_one,
+            "arrNullable" : arr_nullable,
             "unionWithEnum" : union_with_enum,
         ]);
 
@@ -37,11 +37,11 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
-    retval.arr_nullable = json["arrNullable"];
-    retval.arr_one = json["arrOne"];
-    retval.nullable = json["nullable"];
     retval.one = json["one"];
     retval.top_level_optional = json["optional"];
+    retval.nullable = json["nullable"];
+    retval.arr_one = json["arrOne"];
+    retval.arr_nullable = json["arrNullable"];
     retval.union_with_enum = json["unionWithEnum"];
 
     return retval;
diff --git a/base/schema-pike/test/inputs/schema/vega-lite.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/vega-lite.schema/default/TopLevel.pmod
index 141c32f..65aa7bc 100644
--- a/base/schema-pike/test/inputs/schema/vega-lite.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/vega-lite.schema/default/TopLevel.pmod
@@ -304,8 +304,8 @@ class MarkConfig {
     float|mixed           dx;                 // json: "dx"
     float|mixed           dy;                 // json: "dy"
     mixed|string          fill;               // json: "fill"
-    bool|mixed            filled;             // json: "filled"
     float|mixed           fill_opacity;       // json: "fillOpacity"
+    bool|mixed            filled;             // json: "filled"
     mixed|string          font;               // json: "font"
     float|mixed           font_size;          // json: "fontSize"
     FontStyle|mixed       font_style;         // json: "fontStyle"
@@ -337,8 +337,8 @@ class MarkConfig {
             "dx" : dx,
             "dy" : dy,
             "fill" : fill,
-            "filled" : filled,
             "fillOpacity" : fill_opacity,
+            "filled" : filled,
             "font" : font,
             "fontSize" : font_size,
             "fontStyle" : font_style,
@@ -376,8 +376,8 @@ MarkConfig MarkConfig_from_JSON(mixed json) {
     retval.dx = json["dx"];
     retval.dy = json["dy"];
     retval.fill = json["fill"];
-    retval.filled = json["filled"];
     retval.fill_opacity = json["fillOpacity"];
+    retval.filled = json["filled"];
     retval.font = json["font"];
     retval.font_size = json["fontSize"];
     retval.font_style = json["fontStyle"];
@@ -521,9 +521,9 @@ class AxisConfig {
     bool|mixed           short_time_labels; // json: "shortTimeLabels"
     mixed|string         tick_color;        // json: "tickColor"
     bool|mixed           tick_round;        // json: "tickRound"
-    bool|mixed           ticks;             // json: "ticks"
     float|mixed          tick_size;         // json: "tickSize"
     float|mixed          tick_width;        // json: "tickWidth"
+    bool|mixed           ticks;             // json: "ticks"
     mixed|string         title_align;       // json: "titleAlign"
     float|mixed          title_angle;       // json: "titleAngle"
     mixed|string         title_baseline;    // json: "titleBaseline"
@@ -563,9 +563,9 @@ class AxisConfig {
             "shortTimeLabels" : short_time_labels,
             "tickColor" : tick_color,
             "tickRound" : tick_round,
-            "ticks" : ticks,
             "tickSize" : tick_size,
             "tickWidth" : tick_width,
+            "ticks" : ticks,
             "titleAlign" : title_align,
             "titleAngle" : title_angle,
             "titleBaseline" : title_baseline,
@@ -611,9 +611,9 @@ AxisConfig AxisConfig_from_JSON(mixed json) {
     retval.short_time_labels = json["shortTimeLabels"];
     retval.tick_color = json["tickColor"];
     retval.tick_round = json["tickRound"];
-    retval.ticks = json["ticks"];
     retval.tick_size = json["tickSize"];
     retval.tick_width = json["tickWidth"];
+    retval.ticks = json["ticks"];
     retval.title_align = json["titleAlign"];
     retval.title_angle = json["titleAngle"];
     retval.title_baseline = json["titleBaseline"];
@@ -710,9 +710,9 @@ class VgAxisConfig {
     float|mixed          min_extent;        // json: "minExtent"
     mixed|string         tick_color;        // json: "tickColor"
     bool|mixed           tick_round;        // json: "tickRound"
-    bool|mixed           ticks;             // json: "ticks"
     float|mixed          tick_size;         // json: "tickSize"
     float|mixed          tick_width;        // json: "tickWidth"
+    bool|mixed           ticks;             // json: "ticks"
     mixed|string         title_align;       // json: "titleAlign"
     float|mixed          title_angle;       // json: "titleAngle"
     mixed|string         title_baseline;    // json: "titleBaseline"
@@ -751,9 +751,9 @@ class VgAxisConfig {
             "minExtent" : min_extent,
             "tickColor" : tick_color,
             "tickRound" : tick_round,
-            "ticks" : ticks,
             "tickSize" : tick_size,
             "tickWidth" : tick_width,
+            "ticks" : ticks,
             "titleAlign" : title_align,
             "titleAngle" : title_angle,
             "titleBaseline" : title_baseline,
@@ -798,9 +798,9 @@ VgAxisConfig VgAxisConfig_from_JSON(mixed json) {
     retval.min_extent = json["minExtent"];
     retval.tick_color = json["tickColor"];
     retval.tick_round = json["tickRound"];
-    retval.ticks = json["ticks"];
     retval.tick_size = json["tickSize"];
     retval.tick_width = json["tickWidth"];
+    retval.ticks = json["ticks"];
     retval.title_align = json["titleAlign"];
     retval.title_angle = json["titleAngle"];
     retval.title_baseline = json["titleBaseline"];
@@ -830,8 +830,8 @@ class BarConfig {
     float|mixed           dx;                   // json: "dx"
     float|mixed           dy;                   // json: "dy"
     mixed|string          fill;                 // json: "fill"
-    bool|mixed            filled;               // json: "filled"
     float|mixed           fill_opacity;         // json: "fillOpacity"
+    bool|mixed            filled;               // json: "filled"
     mixed|string          font;                 // json: "font"
     float|mixed           font_size;            // json: "fontSize"
     FontStyle|mixed       font_style;           // json: "fontStyle"
@@ -866,8 +866,8 @@ class BarConfig {
             "dx" : dx,
             "dy" : dy,
             "fill" : fill,
-            "filled" : filled,
             "fillOpacity" : fill_opacity,
+            "filled" : filled,
             "font" : font,
             "fontSize" : font_size,
             "fontStyle" : font_style,
@@ -908,8 +908,8 @@ BarConfig BarConfig_from_JSON(mixed json) {
     retval.dx = json["dx"];
     retval.dy = json["dy"];
     retval.fill = json["fill"];
-    retval.filled = json["filled"];
     retval.fill_opacity = json["fillOpacity"];
+    retval.filled = json["filled"];
     retval.font = json["font"];
     retval.font_size = json["fontSize"];
     retval.font_style = json["fontStyle"];
@@ -1748,8 +1748,8 @@ class TextConfig {
     float|mixed           dx;                 // json: "dx"
     float|mixed           dy;                 // json: "dy"
     mixed|string          fill;               // json: "fill"
-    bool|mixed            filled;             // json: "filled"
     float|mixed           fill_opacity;       // json: "fillOpacity"
+    bool|mixed            filled;             // json: "filled"
     mixed|string          font;               // json: "font"
     float|mixed           font_size;          // json: "fontSize"
     FontStyle|mixed       font_style;         // json: "fontStyle"
@@ -1782,8 +1782,8 @@ class TextConfig {
             "dx" : dx,
             "dy" : dy,
             "fill" : fill,
-            "filled" : filled,
             "fillOpacity" : fill_opacity,
+            "filled" : filled,
             "font" : font,
             "fontSize" : font_size,
             "fontStyle" : font_style,
@@ -1822,8 +1822,8 @@ TextConfig TextConfig_from_JSON(mixed json) {
     retval.dx = json["dx"];
     retval.dy = json["dy"];
     retval.fill = json["fill"];
-    retval.filled = json["filled"];
     retval.fill_opacity = json["fillOpacity"];
+    retval.filled = json["filled"];
     retval.font = json["font"];
     retval.font_size = json["fontSize"];
     retval.font_style = json["fontStyle"];
@@ -1860,8 +1860,8 @@ class TickConfig {
     float|mixed           dx;                 // json: "dx"
     float|mixed           dy;                 // json: "dy"
     mixed|string          fill;               // json: "fill"
-    bool|mixed            filled;             // json: "filled"
     float|mixed           fill_opacity;       // json: "fillOpacity"
+    bool|mixed            filled;             // json: "filled"
     mixed|string          font;               // json: "font"
     float|mixed           font_size;          // json: "fontSize"
     FontStyle|mixed       font_style;         // json: "fontStyle"
@@ -1895,8 +1895,8 @@ class TickConfig {
             "dx" : dx,
             "dy" : dy,
             "fill" : fill,
-            "filled" : filled,
             "fillOpacity" : fill_opacity,
+            "filled" : filled,
             "font" : font,
             "fontSize" : font_size,
             "fontStyle" : font_style,
@@ -1936,8 +1936,8 @@ TickConfig TickConfig_from_JSON(mixed json) {
     retval.dx = json["dx"];
     retval.dy = json["dy"];
     retval.fill = json["fill"];
-    retval.filled = json["filled"];
     retval.fill_opacity = json["fillOpacity"];
+    retval.filled = json["filled"];
     retval.font = json["font"];
     retval.font_size = json["fontSize"];
     retval.font_style = json["fontStyle"];
@@ -3625,8 +3625,8 @@ class Axis {
     TitleOrient|mixed      orient;           // json: "orient"
     float|mixed            position;         // json: "position"
     float|mixed            tick_count;       // json: "tickCount"
-    bool|mixed             ticks;            // json: "ticks"
     float|mixed            tick_size;        // json: "tickSize"
+    bool|mixed             ticks;            // json: "ticks"
     mixed|string           title;            // json: "title"
     float|mixed            title_max_length; // json: "titleMaxLength"
     float|mixed            title_padding;    // json: "titlePadding"
@@ -3650,8 +3650,8 @@ class Axis {
             "orient" : orient,
             "position" : position,
             "tickCount" : tick_count,
-            "ticks" : ticks,
             "tickSize" : tick_size,
+            "ticks" : ticks,
             "title" : title,
             "titleMaxLength" : title_max_length,
             "titlePadding" : title_padding,
@@ -3681,8 +3681,8 @@ Axis Axis_from_JSON(mixed json) {
     retval.orient = json["orient"];
     retval.position = json["position"];
     retval.tick_count = json["tickCount"];
-    retval.ticks = json["ticks"];
     retval.tick_size = json["tickSize"];
+    retval.ticks = json["ticks"];
     retval.title = json["title"];
     retval.title_max_length = json["titleMaxLength"];
     retval.title_padding = json["titlePadding"];
@@ -3971,8 +3971,8 @@ class MarkDef {
     float|mixed           dx;                 // json: "dx"
     float|mixed           dy;                 // json: "dy"
     mixed|string          fill;               // json: "fill"
-    bool|mixed            filled;             // json: "filled"
     float|mixed           fill_opacity;       // json: "fillOpacity"
+    bool|mixed            filled;             // json: "filled"
     mixed|string          font;               // json: "font"
     float|mixed           font_size;          // json: "fontSize"
     FontStyle|mixed       font_style;         // json: "fontStyle"
@@ -4007,8 +4007,8 @@ class MarkDef {
             "dx" : dx,
             "dy" : dy,
             "fill" : fill,
-            "filled" : filled,
             "fillOpacity" : fill_opacity,
+            "filled" : filled,
             "font" : font,
             "fontSize" : font_size,
             "fontStyle" : font_style,
@@ -4049,8 +4049,8 @@ MarkDef MarkDef_from_JSON(mixed json) {
     retval.dx = json["dx"];
     retval.dy = json["dy"];
     retval.fill = json["fill"];
-    retval.filled = json["filled"];
     retval.fill_opacity = json["fillOpacity"];
+    retval.filled = json["filled"];
     retval.font = json["font"];
     retval.font_size = json["fontSize"];
     retval.font_style = json["fontStyle"];
diff --git a/base/schema-python/test/inputs/schema/accessors.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/accessors.schema/default/quicktype.py
index 561e524..9cb786b 100644
--- a/base/schema-python/test/inputs/schema/accessors.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/accessors.schema/default/quicktype.py
@@ -7,11 +7,6 @@ T = TypeVar("T")
 EnumT = TypeVar("EnumT", bound=Enum)
 
 
-def from_str(x: Any) -> str:
-    assert isinstance(x, str)
-    return x
-
-
 def from_bool(x: Any) -> bool:
     assert isinstance(x, bool)
     return x
@@ -31,9 +26,9 @@ def from_union(fs, x):
     assert False
 
 
-def to_enum(c: Type[EnumT], x: Any) -> EnumT:
-    assert isinstance(x, c)
-    return x.value
+def from_str(x: Any) -> str:
+    assert isinstance(x, str)
+    return x
 
 
 def to_float(x: Any) -> float:
@@ -41,6 +36,11 @@ def to_float(x: Any) -> float:
     return x
 
 
+def to_enum(c: Type[EnumT], x: Any) -> EnumT:
+    assert isinstance(x, c)
+    return x.value
+
+
 def to_class(c: Type[T], x: Any) -> dict:
     assert isinstance(x, c)
     return cast(Any, x).to_dict()
@@ -54,26 +54,26 @@ class EnumEnum(Enum):
 
 @dataclass
 class TopLevel:
-    barre: str
+    unionization: bool | float
     enumerification: EnumEnum
     foo: str
-    unionization: bool | float
+    barre: str
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
-        barre = from_str(obj.get("bar"))
+        unionization = from_union([from_bool, from_float], obj.get("union"))
         enumerification = EnumEnum(obj.get("enum"))
         foo = from_str(obj.get("foo"))
-        unionization = from_union([from_bool, from_float], obj.get("union"))
-        return TopLevel(barre, enumerification, foo, unionization)
+        barre = from_str(obj.get("bar"))
+        return TopLevel(unionization, enumerification, foo, barre)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        result["bar"] = from_str(self.barre)
+        result["union"] = from_union([from_bool, to_float], self.unionization)
         result["enum"] = to_enum(EnumEnum, self.enumerification)
         result["foo"] = from_str(self.foo)
-        result["union"] = from_union([from_bool, to_float], self.unionization)
+        result["bar"] = from_str(self.barre)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/bool-string.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/bool-string.schema/default/quicktype.py
index 3f52777..f9da921 100644
--- a/base/schema-python/test/inputs/schema/bool-string.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/bool-string.schema/default/quicktype.py
@@ -34,16 +34,16 @@ def from_union(fs, x):
     assert False
 
 
-def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
-    assert isinstance(x, list)
-    return [f(y) for y in x]
-
-
 def from_none(x: Any) -> Any:
     assert x is None
     return x
 
 
+def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
+    assert isinstance(x, list)
+    return [f(y) for y in x]
+
+
 def is_type(t: Type[T], x: Any) -> T:
     assert isinstance(x, t)
     return x
@@ -68,10 +68,10 @@ class TopLevel:
     one: bool
     union_with_bool: bool
     union_with_bool_and_enum: bool | UnionWithBoolAndEnumEnum
-    arr_nullable: list[bool | None] | None = None
-    arr_one: list[bool] | None = None
-    nullable: bool | None = None
     optional: bool | None = None
+    nullable: bool | None = None
+    arr_one: list[bool] | None = None
+    arr_nullable: list[bool | None] | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
@@ -79,24 +79,24 @@ class TopLevel:
         one = from_stringified_bool(from_str(obj.get("one")))
         union_with_bool = from_union([from_bool, lambda x: from_stringified_bool(from_str(x))], obj.get("unionWithBool"))
         union_with_bool_and_enum = from_union([from_bool, lambda x: from_union([from_stringified_bool, UnionWithBoolAndEnumEnum], from_str(x))], obj.get("unionWithBoolAndEnum"))
-        arr_nullable = from_union([lambda x: from_list(lambda x: from_union([from_none, lambda x: from_stringified_bool(from_str(x))], x), x), from_none], obj.get("arrNullable"))
-        arr_one = from_union([lambda x: from_list(lambda x: from_stringified_bool(from_str(x)), x), from_none], obj.get("arrOne"))
-        nullable = from_union([from_none, lambda x: from_stringified_bool(from_str(x))], obj.get("nullable"))
         optional = from_union([from_none, lambda x: from_stringified_bool(from_str(x))], obj.get("optional"))
-        return TopLevel(one, union_with_bool, union_with_bool_and_enum, arr_nullable, arr_one, nullable, optional)
+        nullable = from_union([from_none, lambda x: from_stringified_bool(from_str(x))], obj.get("nullable"))
+        arr_one = from_union([lambda x: from_list(lambda x: from_stringified_bool(from_str(x)), x), from_none], obj.get("arrOne"))
+        arr_nullable = from_union([lambda x: from_list(lambda x: from_union([from_none, lambda x: from_stringified_bool(from_str(x))], x), x), from_none], obj.get("arrNullable"))
+        return TopLevel(one, union_with_bool, union_with_bool_and_enum, optional, nullable, arr_one, arr_nullable)
 
     def to_dict(self) -> dict:
         result: dict = {}
         result["one"] = from_str(str(self.one).lower())
         result["unionWithBool"] = from_bool(self.union_with_bool)
         result["unionWithBoolAndEnum"] = from_union([lambda x: from_bool((lambda x: is_type(bool, x))(x)), lambda x: from_str((lambda x: to_enum(UnionWithBoolAndEnumEnum, (lambda x: is_type(UnionWithBoolAndEnumEnum, x))(x)))(x))], self.union_with_bool_and_enum)
-        if self.arr_nullable is not None:
-            result["arrNullable"] = from_union([lambda x: from_list(lambda x: from_union([lambda x: from_none((lambda x: is_type(type(None), x))(x)), lambda x: from_str((lambda x: str((lambda x: is_type(bool, x))(x)).lower())(x))], x), x), from_none], self.arr_nullable)
-        if self.arr_one is not None:
-            result["arrOne"] = from_union([lambda x: from_list(lambda x: from_str((lambda x: str(x).lower())(x)), x), from_none], self.arr_one)
-        result["nullable"] = from_union([lambda x: from_none((lambda x: is_type(type(None), x))(x)), lambda x: from_str((lambda x: str((lambda x: is_type(bool, x))(x)).lower())(x))], self.nullable)
         if self.optional is not None:
             result["optional"] = from_union([lambda x: from_none((lambda x: is_type(type(None), x))(x)), lambda x: from_str((lambda x: str((lambda x: is_type(bool, x))(x)).lower())(x))], self.optional)
+        result["nullable"] = from_union([lambda x: from_none((lambda x: is_type(type(None), x))(x)), lambda x: from_str((lambda x: str((lambda x: is_type(bool, x))(x)).lower())(x))], self.nullable)
+        if self.arr_one is not None:
+            result["arrOne"] = from_union([lambda x: from_list(lambda x: from_str((lambda x: str(x).lower())(x)), x), from_none], self.arr_one)
+        if self.arr_nullable is not None:
+            result["arrNullable"] = from_union([lambda x: from_list(lambda x: from_union([lambda x: from_none((lambda x: is_type(type(None), x))(x)), lambda x: from_str((lambda x: str((lambda x: is_type(bool, x))(x)).lower())(x))], x), x), from_none], self.arr_nullable)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/boolean-subschema.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/boolean-subschema.schema/default/quicktype.py
index 32ef45c..05f695f 100644
--- a/base/schema-python/test/inputs/schema/boolean-subschema.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/boolean-subschema.schema/default/quicktype.py
@@ -5,16 +5,16 @@ from typing import Any, TypeVar, Callable, Type, cast
 T = TypeVar("T")
 
 
-def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
-    assert isinstance(x, list)
-    return [f(y) for y in x]
-
-
 def from_str(x: Any) -> str:
     assert isinstance(x, str)
     return x
 
 
+def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
+    assert isinstance(x, list)
+    return [f(y) for y in x]
+
+
 def to_class(c: Type[T], x: Any) -> dict:
     assert isinstance(x, c)
     return cast(Any, x).to_dict()
@@ -22,24 +22,24 @@ def to_class(c: Type[T], x: Any) -> dict:
 
 @dataclass
 class TopLevel:
-    empty: list[Any]
     foo: str
+    empty: list[Any]
     disallowed: Any = None
     impossible: Any = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
-        empty = from_list(lambda x: x, obj.get("empty"))
         foo = from_str(obj.get("foo"))
+        empty = from_list(lambda x: x, obj.get("empty"))
         disallowed = obj.get("disallowed")
         impossible = obj.get("impossible")
-        return TopLevel(empty, foo, disallowed, impossible)
+        return TopLevel(foo, empty, disallowed, impossible)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        result["empty"] = from_list(lambda x: x, self.empty)
         result["foo"] = from_str(self.foo)
+        result["empty"] = from_list(lambda x: x, self.empty)
         if self.disallowed is not None:
             result["disallowed"] = self.disallowed
         if self.impossible is not None:
diff --git a/base/schema-python/test/inputs/schema/const-non-string.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/const-non-string.schema/default/quicktype.py
index dab13a1..0c62fc0 100644
--- a/base/schema-python/test/inputs/schema/const-non-string.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/const-non-string.schema/default/quicktype.py
@@ -7,6 +7,11 @@ T = TypeVar("T")
 EnumT = TypeVar("EnumT", bound=Enum)
 
 
+def from_float(x: Any) -> float:
+    assert isinstance(x, (float, int)) and not isinstance(x, bool)
+    return float(x)
+
+
 def from_int(x: Any) -> int:
     assert isinstance(x, int) and not isinstance(x, bool)
     return x
@@ -17,9 +22,9 @@ def from_bool(x: Any) -> bool:
     return x
 
 
-def from_float(x: Any) -> float:
-    assert isinstance(x, (float, int)) and not isinstance(x, bool)
-    return float(x)
+def to_float(x: Any) -> float:
+    assert isinstance(x, (int, float))
+    return x
 
 
 def to_enum(c: Type[EnumT], x: Any) -> EnumT:
@@ -27,11 +32,6 @@ def to_enum(c: Type[EnumT], x: Any) -> EnumT:
     return x.value
 
 
-def to_float(x: Any) -> float:
-    assert isinstance(x, (int, float))
-    return x
-
-
 def to_class(c: Type[T], x: Any) -> dict:
     assert isinstance(x, c)
     return cast(Any, x).to_dict()
@@ -43,29 +43,29 @@ class Kind(Enum):
 
 @dataclass
 class TopLevel:
+    version: float
     amount: int
+    ratio: float
     enabled: bool
     kind: Kind
-    ratio: float
-    version: float
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
+        version = from_float(obj.get("version"))
         amount = from_int(obj.get("amount"))
+        ratio = from_float(obj.get("ratio"))
         enabled = from_bool(obj.get("enabled"))
         kind = Kind(obj.get("kind"))
-        ratio = from_float(obj.get("ratio"))
-        version = from_float(obj.get("version"))
-        return TopLevel(amount, enabled, kind, ratio, version)
+        return TopLevel(version, amount, ratio, enabled, kind)
 
     def to_dict(self) -> dict:
         result: dict = {}
+        result["version"] = to_float(self.version)
         result["amount"] = from_int(self.amount)
+        result["ratio"] = to_float(self.ratio)
         result["enabled"] = from_bool(self.enabled)
         result["kind"] = to_enum(Kind, self.kind)
-        result["ratio"] = to_float(self.ratio)
-        result["version"] = to_float(self.version)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/date-time-or-string.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/date-time-or-string.schema/default/quicktype.py
index 012ffa8..7e2ce54 100644
--- a/base/schema-python/test/inputs/schema/date-time-or-string.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/date-time-or-string.schema/default/quicktype.py
@@ -9,6 +9,11 @@ T = TypeVar("T")
 EnumT = TypeVar("EnumT", bound=Enum)
 
 
+def from_str(x: Any) -> str:
+    assert isinstance(x, str)
+    return x
+
+
 def from_datetime(x: Any) -> datetime.datetime:
     return dateutil.parser.parse(x)
 
@@ -22,11 +27,6 @@ def from_union(fs, x):
     assert False
 
 
-def from_str(x: Any) -> str:
-    assert isinstance(x, str)
-    return x
-
-
 def to_enum(c: Type[EnumT], x: Any) -> EnumT:
     assert isinstance(x, c)
     return x.value
@@ -43,20 +43,20 @@ class BarEnum(Enum):
 
 @dataclass
 class TopLevel:
-    bar: BarEnum | datetime.datetime
     foo: str
+    bar: BarEnum | datetime.datetime
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
-        bar = from_union([BarEnum, from_datetime], obj.get("bar"))
         foo = from_str(obj.get("foo"))
-        return TopLevel(bar, foo)
+        bar = from_union([BarEnum, from_datetime], obj.get("bar"))
+        return TopLevel(foo, bar)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        result["bar"] = from_union([lambda x: to_enum(BarEnum, x), lambda x: x.isoformat()], self.bar)
         result["foo"] = from_str(self.foo)
+        result["bar"] = from_union([lambda x: to_enum(BarEnum, x), lambda x: x.isoformat()], self.bar)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/date-time.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/date-time.schema/default/quicktype.py
index d9d8887..ed89fd7 100644
--- a/base/schema-python/test/inputs/schema/date-time.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/date-time.schema/default/quicktype.py
@@ -10,20 +10,25 @@ T = TypeVar("T")
 EnumT = TypeVar("EnumT", bound=Enum)
 
 
-def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
-    assert isinstance(x, list)
-    return [f(y) for y in x]
+def from_date(x: Any) -> datetime.date:
+    assert isinstance(x, str) and re.match(r"^\d{4}-\d{2}-\d{2}$", x)
+    return dateutil.parser.parse(x).date()
 
 
-def from_int(x: Any) -> int:
-    assert isinstance(x, int) and not isinstance(x, bool)
-    return x
+def from_time(x: Any) -> datetime.time:
+    assert isinstance(x, str) and re.match(r"^\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$", x)
+    return dateutil.parser.parse(x).time()
 
 
 def from_datetime(x: Any) -> datetime.datetime:
     return dateutil.parser.parse(x)
 
 
+def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
+    assert isinstance(x, list)
+    return [f(y) for y in x]
+
+
 def from_union(fs, x):
     for f in fs:
         try:
@@ -33,14 +38,9 @@ def from_union(fs, x):
     assert False
 
 
-def from_date(x: Any) -> datetime.date:
-    assert isinstance(x, str) and re.match(r"^\d{4}-\d{2}-\d{2}$", x)
-    return dateutil.parser.parse(x).date()
-
-
-def from_time(x: Any) -> datetime.time:
-    assert isinstance(x, str) and re.match(r"^\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$", x)
-    return dateutil.parser.parse(x).time()
+def from_int(x: Any) -> int:
+    assert isinstance(x, int) and not isinstance(x, bool)
+    return x
 
 
 def to_enum(c: Type[EnumT], x: Any) -> EnumT:
@@ -60,29 +60,29 @@ class ComplexUnionArrayEnum(Enum):
 
 @dataclass
 class TopLevel:
-    complex_union_array: list[int | ComplexUnionArrayEnum | datetime.datetime]
     date: datetime.date
-    date_time: datetime.datetime
     time: datetime.time
+    date_time: datetime.datetime
     union_array: list[datetime.date | datetime.time | datetime.datetime]
+    complex_union_array: list[int | ComplexUnionArrayEnum | datetime.datetime]
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
-        complex_union_array = from_list(lambda x: from_union([from_int, ComplexUnionArrayEnum, from_datetime], x), obj.get("complex-union-array"))
         date = from_date(obj.get("date"))
-        date_time = from_datetime(obj.get("date-time"))
         time = from_time(obj.get("time"))
+        date_time = from_datetime(obj.get("date-time"))
         union_array = from_list(lambda x: from_union([from_date, from_time, from_datetime], x), obj.get("union-array"))
-        return TopLevel(complex_union_array, date, date_time, time, union_array)
+        complex_union_array = from_list(lambda x: from_union([from_int, ComplexUnionArrayEnum, from_datetime], x), obj.get("complex-union-array"))
+        return TopLevel(date, time, date_time, union_array, complex_union_array)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        result["complex-union-array"] = from_list(lambda x: from_union([from_int, lambda x: to_enum(ComplexUnionArrayEnum, x), lambda x: x.isoformat()], x), self.complex_union_array)
         result["date"] = self.date.isoformat()
-        result["date-time"] = self.date_time.isoformat()
         result["time"] = self.time.isoformat()
+        result["date-time"] = self.date_time.isoformat()
         result["union-array"] = from_list(lambda x: from_union([lambda x: x.isoformat(), lambda x: x.isoformat(), lambda x: x.isoformat()], x), self.union_array)
+        result["complex-union-array"] = from_list(lambda x: from_union([from_int, lambda x: to_enum(ComplexUnionArrayEnum, x), lambda x: x.isoformat()], x), self.complex_union_array)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/description.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/description.schema/default/quicktype.py
index c1d069a..cb895fc 100644
--- a/base/schema-python/test/inputs/schema/description.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/description.schema/default/quicktype.py
@@ -31,13 +31,13 @@ def from_union(fs, x):
     assert False
 
 
-def from_bool(x: Any) -> bool:
-    assert isinstance(x, bool)
+def from_none(x: Any) -> Any:
+    assert x is None
     return x
 
 
-def from_none(x: Any) -> Any:
-    assert x is None
+def from_bool(x: Any) -> bool:
+    assert isinstance(x, bool)
     return x
 
 
@@ -80,37 +80,36 @@ class TopLevel:
     """The top-level class.
     Its description has two lines.
     """
+    union: float | str
+    """Either a number or a string"""
+
     enum: EnumEnum
     """An enumeration"""
 
     object_or_string: str | ObjectOrStringClass
-    union: float | str
-    """Either a number or a string"""
-
+    foo: float | None = None
     bar: bool | None = None
     """A pretty boolean"""
 
-    foo: float | None = None
-
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
+        union = from_union([from_float, from_str], obj.get("union"))
         enum = EnumEnum(obj.get("enum"))
         object_or_string = from_union([from_str, ObjectOrStringClass.from_dict], obj.get("object-or-string"))
-        union = from_union([from_float, from_str], obj.get("union"))
-        bar = from_union([from_bool, from_none], obj.get("bar"))
         foo = from_union([from_float, from_none], obj.get("foo"))
-        return TopLevel(enum, object_or_string, union, bar, foo)
+        bar = from_union([from_bool, from_none], obj.get("bar"))
+        return TopLevel(union, enum, object_or_string, foo, bar)
 
     def to_dict(self) -> dict:
         result: dict = {}
+        result["union"] = from_union([to_float, from_str], self.union)
         result["enum"] = to_enum(EnumEnum, self.enum)
         result["object-or-string"] = from_union([from_str, lambda x: to_class(ObjectOrStringClass, x)], self.object_or_string)
-        result["union"] = from_union([to_float, from_str], self.union)
-        if self.bar is not None:
-            result["bar"] = from_union([from_bool, from_none], self.bar)
         if self.foo is not None:
             result["foo"] = from_union([to_float, from_none], self.foo)
+        if self.bar is not None:
+            result["bar"] = from_union([from_bool, from_none], self.bar)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/direct-union.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/direct-union.schema/default/quicktype.py
index 821959c..da81d2e 100644
--- a/base/schema-python/test/inputs/schema/direct-union.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/direct-union.schema/default/quicktype.py
@@ -61,21 +61,21 @@ def to_class(c: Type[T], x: Any) -> dict:
 
 @dataclass
 class Thing:
-    optional: float | int | bool | str | list[Any] | dict[str, Any] | None = None
     required: float | int | bool | str | list[Any] | dict[str, Any] | None = None
+    optional: float | int | bool | str | list[Any] | dict[str, Any] | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'Thing':
         assert isinstance(obj, dict)
-        optional = from_union([from_none, from_int, from_float, from_bool, from_str, lambda x: from_list(lambda x: x, x), lambda x: from_dict(lambda x: x, x)], obj.get("optional"))
         required = from_union([from_none, from_int, from_float, from_bool, from_str, lambda x: from_list(lambda x: x, x), lambda x: from_dict(lambda x: x, x)], obj.get("required"))
-        return Thing(optional, required)
+        optional = from_union([from_none, from_int, from_float, from_bool, from_str, lambda x: from_list(lambda x: x, x), lambda x: from_dict(lambda x: x, x)], obj.get("optional"))
+        return Thing(required, optional)
 
     def to_dict(self) -> dict:
         result: dict = {}
+        result["required"] = from_union([from_none, from_int, to_float, from_bool, from_str, lambda x: from_list(lambda x: x, x), lambda x: from_dict(lambda x: x, x)], self.required)
         if self.optional is not None:
             result["optional"] = from_union([from_none, from_int, to_float, from_bool, from_str, lambda x: from_list(lambda x: x, x), lambda x: from_dict(lambda x: x, x)], self.optional)
-        result["required"] = from_union([from_none, from_int, to_float, from_bool, from_str, lambda x: from_list(lambda x: x, x), lambda x: from_dict(lambda x: x, x)], self.required)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/enum.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/enum.schema/default/quicktype.py
index 62a3890..48ad6f3 100644
--- a/base/schema-python/test/inputs/schema/enum.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/enum.schema/default/quicktype.py
@@ -7,13 +7,8 @@ T = TypeVar("T")
 EnumT = TypeVar("EnumT", bound=Enum)
 
 
-def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
-    assert isinstance(x, list)
-    return [f(y) for y in x]
-
-
-def from_int(x: Any) -> int:
-    assert isinstance(x, int) and not isinstance(x, bool)
+def from_none(x: Any) -> Any:
+    assert x is None
     return x
 
 
@@ -26,8 +21,13 @@ def from_union(fs, x):
     assert False
 
 
-def from_none(x: Any) -> Any:
-    assert x is None
+def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
+    assert isinstance(x, list)
+    return [f(y) for y in x]
+
+
+def from_int(x: Any) -> int:
+    assert isinstance(x, int) and not isinstance(x, bool)
     return x
 
 
@@ -67,32 +67,32 @@ class Lvc(Enum):
 @dataclass
 class TopLevel:
     gve: Gve
-    arr: list[int | OtherArr] | None = None
-    top_level_for: str | None = None
     lvc: Lvc | None = None
+    arr: list[int | OtherArr] | None = None
     other_arr: list[OtherArr] | None = None
+    top_level_for: str | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
         gve = Gve(obj.get("gve"))
-        arr = from_union([lambda x: from_list(lambda x: from_union([from_int, OtherArr], x), x), from_none], obj.get("arr"))
-        top_level_for = from_union([from_str, from_none], obj.get("for"))
         lvc = from_union([Lvc, from_none], obj.get("lvc"))
+        arr = from_union([lambda x: from_list(lambda x: from_union([from_int, OtherArr], x), x), from_none], obj.get("arr"))
         other_arr = from_union([lambda x: from_list(OtherArr, x), from_none], obj.get("otherArr"))
-        return TopLevel(gve, arr, top_level_for, lvc, other_arr)
+        top_level_for = from_union([from_str, from_none], obj.get("for"))
+        return TopLevel(gve, lvc, arr, other_arr, top_level_for)
 
     def to_dict(self) -> dict:
         result: dict = {}
         result["gve"] = to_enum(Gve, self.gve)
-        if self.arr is not None:
-            result["arr"] = from_union([lambda x: from_list(lambda x: from_union([from_int, lambda x: to_enum(OtherArr, x)], x), x), from_none], self.arr)
-        if self.top_level_for is not None:
-            result["for"] = from_union([from_str, from_none], self.top_level_for)
         if self.lvc is not None:
             result["lvc"] = from_union([lambda x: to_enum(Lvc, x), from_none], self.lvc)
+        if self.arr is not None:
+            result["arr"] = from_union([lambda x: from_list(lambda x: from_union([from_int, lambda x: to_enum(OtherArr, x)], x), x), from_none], self.arr)
         if self.other_arr is not None:
             result["otherArr"] = from_union([lambda x: from_list(lambda x: to_enum(OtherArr, x), x), from_none], self.other_arr)
+        if self.top_level_for is not None:
+            result["for"] = from_union([from_str, from_none], self.top_level_for)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/integer-string.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/integer-string.schema/default/quicktype.py
index cd4352c..bd837a7 100644
--- a/base/schema-python/test/inputs/schema/integer-string.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/integer-string.schema/default/quicktype.py
@@ -26,16 +26,16 @@ def from_union(fs, x):
     assert False
 
 
-def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
-    assert isinstance(x, list)
-    return [f(y) for y in x]
-
-
 def from_none(x: Any) -> Any:
     assert x is None
     return x
 
 
+def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
+    assert isinstance(x, list)
+    return [f(y) for y in x]
+
+
 def is_type(t: Type[T], x: Any) -> T:
     assert isinstance(x, t)
     return x
@@ -60,10 +60,10 @@ class TopLevel:
     one: int
     union_with_int: int
     union_with_int_and_enum: int | UnionWithIntAndEnumEnum
-    arr_nullable: list[int | None] | None = None
-    arr_one: list[int] | None = None
-    nullable: int | None = None
     optional: int | None = None
+    nullable: int | None = None
+    arr_one: list[int] | None = None
+    arr_nullable: list[int | None] | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
@@ -71,24 +71,24 @@ class TopLevel:
         one = int(from_str(obj.get("one")))
         union_with_int = from_union([from_int, lambda x: int(from_str(x))], obj.get("unionWithInt"))
         union_with_int_and_enum = from_union([from_int, lambda x: from_union([UnionWithIntAndEnumEnum, lambda x: int(x)], from_str(x))], obj.get("unionWithIntAndEnum"))
-        arr_nullable = from_union([lambda x: from_list(lambda x: from_union([from_none, lambda x: int(from_str(x))], x), x), from_none], obj.get("arrNullable"))
-        arr_one = from_union([lambda x: from_list(lambda x: int(from_str(x)), x), from_none], obj.get("arrOne"))
-        nullable = from_union([from_none, lambda x: int(from_str(x))], obj.get("nullable"))
         optional = from_union([from_none, lambda x: int(from_str(x))], obj.get("optional"))
-        return TopLevel(one, union_with_int, union_with_int_and_enum, arr_nullable, arr_one, nullable, optional)
+        nullable = from_union([from_none, lambda x: int(from_str(x))], obj.get("nullable"))
+        arr_one = from_union([lambda x: from_list(lambda x: int(from_str(x)), x), from_none], obj.get("arrOne"))
+        arr_nullable = from_union([lambda x: from_list(lambda x: from_union([from_none, lambda x: int(from_str(x))], x), x), from_none], obj.get("arrNullable"))
+        return TopLevel(one, union_with_int, union_with_int_and_enum, optional, nullable, arr_one, arr_nullable)
 
     def to_dict(self) -> dict:
         result: dict = {}
         result["one"] = from_str(str(self.one))
         result["unionWithInt"] = from_int(self.union_with_int)
         result["unionWithIntAndEnum"] = from_union([lambda x: from_int((lambda x: is_type(int, x))(x)), lambda x: from_str((lambda x: to_enum(UnionWithIntAndEnumEnum, (lambda x: is_type(UnionWithIntAndEnumEnum, x))(x)))(x))], self.union_with_int_and_enum)
-        if self.arr_nullable is not None:
-            result["arrNullable"] = from_union([lambda x: from_list(lambda x: from_union([lambda x: from_none((lambda x: is_type(type(None), x))(x)), lambda x: from_str((lambda x: str((lambda x: is_type(int, x))(x)))(x))], x), x), from_none], self.arr_nullable)
-        if self.arr_one is not None:
-            result["arrOne"] = from_union([lambda x: from_list(lambda x: from_str((lambda x: str(x))(x)), x), from_none], self.arr_one)
-        result["nullable"] = from_union([lambda x: from_none((lambda x: is_type(type(None), x))(x)), lambda x: from_str((lambda x: str((lambda x: is_type(int, x))(x)))(x))], self.nullable)
         if self.optional is not None:
             result["optional"] = from_union([lambda x: from_none((lambda x: is_type(type(None), x))(x)), lambda x: from_str((lambda x: str((lambda x: is_type(int, x))(x)))(x))], self.optional)
+        result["nullable"] = from_union([lambda x: from_none((lambda x: is_type(type(None), x))(x)), lambda x: from_str((lambda x: str((lambda x: is_type(int, x))(x)))(x))], self.nullable)
+        if self.arr_one is not None:
+            result["arrOne"] = from_union([lambda x: from_list(lambda x: from_str((lambda x: str(x))(x)), x), from_none], self.arr_one)
+        if self.arr_nullable is not None:
+            result["arrNullable"] = from_union([lambda x: from_list(lambda x: from_union([lambda x: from_none((lambda x: is_type(type(None), x))(x)), lambda x: from_str((lambda x: str((lambda x: is_type(int, x))(x)))(x))], x), x), from_none], self.arr_nullable)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/integer-type.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/integer-type.schema/default/quicktype.py
index d73e046..cd95faf 100644
--- a/base/schema-python/test/inputs/schema/integer-type.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/integer-type.schema/default/quicktype.py
@@ -17,41 +17,41 @@ def to_class(c: Type[T], x: Any) -> dict:
 
 @dataclass
 class TopLevel:
+    small_positive: int
+    small_negative: int
+    i32_range: int
     above_i32_max: int
     below_i32_min: int
-    i32_range: int
-    large_bounds: int
-    only_maximum: int
     only_minimum: int
-    small_negative: int
-    small_positive: int
+    only_maximum: int
     unbounded: int
+    large_bounds: int
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
+        small_positive = from_int(obj.get("small_positive"))
+        small_negative = from_int(obj.get("small_negative"))
+        i32_range = from_int(obj.get("i32_range"))
         above_i32_max = from_int(obj.get("above_i32_max"))
         below_i32_min = from_int(obj.get("below_i32_min"))
-        i32_range = from_int(obj.get("i32_range"))
-        large_bounds = from_int(obj.get("large_bounds"))
-        only_maximum = from_int(obj.get("only_maximum"))
         only_minimum = from_int(obj.get("only_minimum"))
-        small_negative = from_int(obj.get("small_negative"))
-        small_positive = from_int(obj.get("small_positive"))
+        only_maximum = from_int(obj.get("only_maximum"))
         unbounded = from_int(obj.get("unbounded"))
-        return TopLevel(above_i32_max, below_i32_min, i32_range, large_bounds, only_maximum, only_minimum, small_negative, small_positive, unbounded)
+        large_bounds = from_int(obj.get("large_bounds"))
+        return TopLevel(small_positive, small_negative, i32_range, above_i32_max, below_i32_min, only_minimum, only_maximum, unbounded, large_bounds)
 
     def to_dict(self) -> dict:
         result: dict = {}
+        result["small_positive"] = from_int(self.small_positive)
+        result["small_negative"] = from_int(self.small_negative)
+        result["i32_range"] = from_int(self.i32_range)
         result["above_i32_max"] = from_int(self.above_i32_max)
         result["below_i32_min"] = from_int(self.below_i32_min)
-        result["i32_range"] = from_int(self.i32_range)
-        result["large_bounds"] = from_int(self.large_bounds)
-        result["only_maximum"] = from_int(self.only_maximum)
         result["only_minimum"] = from_int(self.only_minimum)
-        result["small_negative"] = from_int(self.small_negative)
-        result["small_positive"] = from_int(self.small_positive)
+        result["only_maximum"] = from_int(self.only_maximum)
         result["unbounded"] = from_int(self.unbounded)
+        result["large_bounds"] = from_int(self.large_bounds)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/light.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/light.schema/default/quicktype.py
index d6dc755..c8b27c6 100644
--- a/base/schema-python/test/inputs/schema/light.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/light.schema/default/quicktype.py
@@ -17,22 +17,22 @@ def to_class(c: Type[T], x: Any) -> dict:
 
 @dataclass
 class LightParams:
-    app_id: str
     outlet_id: str
+    app_id: str
     rgba: str
 
     @staticmethod
     def from_dict(obj: Any) -> 'LightParams':
         assert isinstance(obj, dict)
-        app_id = from_str(obj.get("app_id"))
         outlet_id = from_str(obj.get("outlet_id"))
+        app_id = from_str(obj.get("app_id"))
         rgba = from_str(obj.get("rgba"))
-        return LightParams(app_id, outlet_id, rgba)
+        return LightParams(outlet_id, app_id, rgba)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        result["app_id"] = from_str(self.app_id)
         result["outlet_id"] = from_str(self.outlet_id)
+        result["app_id"] = from_str(self.app_id)
         result["rgba"] = from_str(self.rgba)
         return result
 
diff --git a/base/schema-python/test/inputs/schema/min-max-items.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/min-max-items.schema/default/quicktype.py
index d381b49..d82daec 100644
--- a/base/schema-python/test/inputs/schema/min-max-items.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/min-max-items.schema/default/quicktype.py
@@ -10,6 +10,11 @@ def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
     return [f(y) for y in x]
 
 
+def from_str(x: Any) -> str:
+    assert isinstance(x, str)
+    return x
+
+
 def from_int(x: Any) -> int:
     assert isinstance(x, int) and not isinstance(x, bool)
     return x
@@ -20,11 +25,6 @@ def from_float(x: Any) -> float:
     return float(x)
 
 
-def from_str(x: Any) -> str:
-    assert isinstance(x, str)
-    return x
-
-
 def from_union(fs, x):
     for f in fs:
         try:
@@ -46,27 +46,27 @@ def to_class(c: Type[T], x: Any) -> dict:
 
 @dataclass
 class TopLevel:
+    min_only: list[str]
     max_only: list[int]
     min_and_max: list[float]
-    min_only: list[str]
     plain: list[str]
     union_items: list[int | str]
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
+        min_only = from_list(from_str, obj.get("minOnly"))
         max_only = from_list(from_int, obj.get("maxOnly"))
         min_and_max = from_list(from_float, obj.get("minAndMax"))
-        min_only = from_list(from_str, obj.get("minOnly"))
         plain = from_list(from_str, obj.get("plain"))
         union_items = from_list(lambda x: from_union([from_int, from_str], x), obj.get("unionItems"))
-        return TopLevel(max_only, min_and_max, min_only, plain, union_items)
+        return TopLevel(min_only, max_only, min_and_max, plain, union_items)
 
     def to_dict(self) -> dict:
         result: dict = {}
+        result["minOnly"] = from_list(from_str, self.min_only)
         result["maxOnly"] = from_list(from_int, self.max_only)
         result["minAndMax"] = from_list(to_float, self.min_and_max)
-        result["minOnly"] = from_list(from_str, self.min_only)
         result["plain"] = from_list(from_str, self.plain)
         result["unionItems"] = from_list(lambda x: from_union([from_int, from_str], x), self.union_items)
         return result
diff --git a/base/schema-python/test/inputs/schema/minmax-integer.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/minmax-integer.schema/default/quicktype.py
index 7ac372f..2178eb2 100644
--- a/base/schema-python/test/inputs/schema/minmax-integer.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/minmax-integer.schema/default/quicktype.py
@@ -18,37 +18,37 @@ def to_class(c: Type[T], x: Any) -> dict:
 @dataclass
 class TopLevel:
     free: int
-    intersection: int
-    max: int
     min: int
+    max: int
     minmax: int
-    min_max_intersection: int
-    min_max_union: int
     union: int
+    min_max_union: int
+    intersection: int
+    min_max_intersection: int
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
         free = from_int(obj.get("free"))
-        intersection = from_int(obj.get("intersection"))
-        max = from_int(obj.get("max"))
         min = from_int(obj.get("min"))
+        max = from_int(obj.get("max"))
         minmax = from_int(obj.get("minmax"))
-        min_max_intersection = from_int(obj.get("minMaxIntersection"))
-        min_max_union = from_int(obj.get("minMaxUnion"))
         union = from_int(obj.get("union"))
-        return TopLevel(free, intersection, max, min, minmax, min_max_intersection, min_max_union, union)
+        min_max_union = from_int(obj.get("minMaxUnion"))
+        intersection = from_int(obj.get("intersection"))
+        min_max_intersection = from_int(obj.get("minMaxIntersection"))
+        return TopLevel(free, min, max, minmax, union, min_max_union, intersection, min_max_intersection)
 
     def to_dict(self) -> dict:
         result: dict = {}
         result["free"] = from_int(self.free)
-        result["intersection"] = from_int(self.intersection)
-        result["max"] = from_int(self.max)
         result["min"] = from_int(self.min)
+        result["max"] = from_int(self.max)
         result["minmax"] = from_int(self.minmax)
-        result["minMaxIntersection"] = from_int(self.min_max_intersection)
-        result["minMaxUnion"] = from_int(self.min_max_union)
         result["union"] = from_int(self.union)
+        result["minMaxUnion"] = from_int(self.min_max_union)
+        result["intersection"] = from_int(self.intersection)
+        result["minMaxIntersection"] = from_int(self.min_max_intersection)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/minmax.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/minmax.schema/default/quicktype.py
index 71d4a44..c15489a 100644
--- a/base/schema-python/test/inputs/schema/minmax.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/minmax.schema/default/quicktype.py
@@ -23,37 +23,37 @@ def to_class(c: Type[T], x: Any) -> dict:
 @dataclass
 class TopLevel:
     free: float
-    intersection: float
-    max: float
     min: float
+    max: float
     minmax: float
-    min_max_intersection: float
-    min_max_union: float
     union: float
+    min_max_union: float
+    intersection: float
+    min_max_intersection: float
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
         free = from_float(obj.get("free"))
-        intersection = from_float(obj.get("intersection"))
-        max = from_float(obj.get("max"))
         min = from_float(obj.get("min"))
+        max = from_float(obj.get("max"))
         minmax = from_float(obj.get("minmax"))
-        min_max_intersection = from_float(obj.get("minMaxIntersection"))
-        min_max_union = from_float(obj.get("minMaxUnion"))
         union = from_float(obj.get("union"))
-        return TopLevel(free, intersection, max, min, minmax, min_max_intersection, min_max_union, union)
+        min_max_union = from_float(obj.get("minMaxUnion"))
+        intersection = from_float(obj.get("intersection"))
+        min_max_intersection = from_float(obj.get("minMaxIntersection"))
+        return TopLevel(free, min, max, minmax, union, min_max_union, intersection, min_max_intersection)
 
     def to_dict(self) -> dict:
         result: dict = {}
         result["free"] = to_float(self.free)
-        result["intersection"] = to_float(self.intersection)
-        result["max"] = to_float(self.max)
         result["min"] = to_float(self.min)
+        result["max"] = to_float(self.max)
         result["minmax"] = to_float(self.minmax)
-        result["minMaxIntersection"] = to_float(self.min_max_intersection)
-        result["minMaxUnion"] = to_float(self.min_max_union)
         result["union"] = to_float(self.union)
+        result["minMaxUnion"] = to_float(self.min_max_union)
+        result["intersection"] = to_float(self.intersection)
+        result["minMaxIntersection"] = to_float(self.min_max_intersection)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/minmaxlength.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/minmaxlength.schema/default/quicktype.py
index 1ad7ca0..1666181 100644
--- a/base/schema-python/test/inputs/schema/minmaxlength.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/minmaxlength.schema/default/quicktype.py
@@ -36,38 +36,38 @@ def to_class(c: Type[T], x: Any) -> dict:
 
 @dataclass
 class TopLevel:
-    intersection: str
-    in_union: float | str
-    maxlength: str
     minlength: str
-    min_max_intersection: str
+    maxlength: str
     minmaxlength: str
-    min_max_union: str
     union: str
+    in_union: float | str
+    min_max_union: str
+    intersection: str
+    min_max_intersection: str
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
-        intersection = from_str(obj.get("intersection"))
-        in_union = from_union([from_float, from_str], obj.get("inUnion"))
-        maxlength = from_str(obj.get("maxlength"))
         minlength = from_str(obj.get("minlength"))
-        min_max_intersection = from_str(obj.get("minMaxIntersection"))
+        maxlength = from_str(obj.get("maxlength"))
         minmaxlength = from_str(obj.get("minmaxlength"))
-        min_max_union = from_str(obj.get("minMaxUnion"))
         union = from_str(obj.get("union"))
-        return TopLevel(intersection, in_union, maxlength, minlength, min_max_intersection, minmaxlength, min_max_union, union)
+        in_union = from_union([from_float, from_str], obj.get("inUnion"))
+        min_max_union = from_str(obj.get("minMaxUnion"))
+        intersection = from_str(obj.get("intersection"))
+        min_max_intersection = from_str(obj.get("minMaxIntersection"))
+        return TopLevel(minlength, maxlength, minmaxlength, union, in_union, min_max_union, intersection, min_max_intersection)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        result["intersection"] = from_str(self.intersection)
-        result["inUnion"] = from_union([to_float, from_str], self.in_union)
-        result["maxlength"] = from_str(self.maxlength)
         result["minlength"] = from_str(self.minlength)
-        result["minMaxIntersection"] = from_str(self.min_max_intersection)
+        result["maxlength"] = from_str(self.maxlength)
         result["minmaxlength"] = from_str(self.minmaxlength)
-        result["minMaxUnion"] = from_str(self.min_max_union)
         result["union"] = from_str(self.union)
+        result["inUnion"] = from_union([to_float, from_str], self.in_union)
+        result["minMaxUnion"] = from_str(self.min_max_union)
+        result["intersection"] = from_str(self.intersection)
+        result["minMaxIntersection"] = from_str(self.min_max_intersection)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/non-standard-ref.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/non-standard-ref.schema/default/quicktype.py
index 279866a..e46ea49 100644
--- a/base/schema-python/test/inputs/schema/non-standard-ref.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/non-standard-ref.schema/default/quicktype.py
@@ -22,22 +22,22 @@ def to_class(c: Type[T], x: Any) -> dict:
 
 @dataclass
 class TopLevel:
-    bar: int
     foo: int
+    bar: int
     quux: bool
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
-        bar = from_int(obj.get("bar"))
         foo = from_int(obj.get("foo"))
+        bar = from_int(obj.get("bar"))
         quux = from_bool(obj.get("quux"))
-        return TopLevel(bar, foo, quux)
+        return TopLevel(foo, bar, quux)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        result["bar"] = from_int(self.bar)
         result["foo"] = from_int(self.foo)
+        result["bar"] = from_int(self.bar)
         result["quux"] = from_bool(self.quux)
         return result
 
diff --git a/base/schema-python/test/inputs/schema/optional-const-ref.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/optional-const-ref.schema/default/quicktype.py
index 342a494..42bdee6 100644
--- a/base/schema-python/test/inputs/schema/optional-const-ref.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/optional-const-ref.schema/default/quicktype.py
@@ -75,8 +75,8 @@ class TopLevel:
     required_label: str
     coordinates: list[Coordinate] | None = None
     count: int | None = None
-    label: str | None = None
     weight: float | None = None
+    label: str | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
@@ -86,9 +86,9 @@ class TopLevel:
         required_label = from_str(obj.get("requiredLabel"))
         coordinates = from_union([lambda x: from_list(Coordinate.from_dict, x), from_none], obj.get("coordinates"))
         count = from_union([from_int, from_none], obj.get("count"))
-        label = from_union([from_str, from_none], obj.get("label"))
         weight = from_union([from_float, from_none], obj.get("weight"))
-        return TopLevel(required_coordinates, required_count, required_label, coordinates, count, label, weight)
+        label = from_union([from_str, from_none], obj.get("label"))
+        return TopLevel(required_coordinates, required_count, required_label, coordinates, count, weight, label)
 
     def to_dict(self) -> dict:
         result: dict = {}
@@ -99,10 +99,10 @@ class TopLevel:
             result["coordinates"] = from_union([lambda x: from_list(lambda x: to_class(Coordinate, x), x), from_none], self.coordinates)
         if self.count is not None:
             result["count"] = from_union([from_int, from_none], self.count)
-        if self.label is not None:
-            result["label"] = from_union([from_str, from_none], self.label)
         if self.weight is not None:
             result["weight"] = from_union([to_float, from_none], self.weight)
+        if self.label is not None:
+            result["label"] = from_union([from_str, from_none], self.label)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/optional-constraints.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/optional-constraints.schema/default/quicktype.py
index b8bb44d..2967bd5 100644
--- a/base/schema-python/test/inputs/schema/optional-constraints.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/optional-constraints.schema/default/quicktype.py
@@ -10,11 +10,6 @@ def from_int(x: Any) -> int:
     return x
 
 
-def from_float(x: Any) -> float:
-    assert isinstance(x, (float, int)) and not isinstance(x, bool)
-    return float(x)
-
-
 def from_none(x: Any) -> Any:
     assert x is None
     return x
@@ -29,6 +24,11 @@ def from_union(fs, x):
     assert False
 
 
+def from_float(x: Any) -> float:
+    assert isinstance(x, (float, int)) and not isinstance(x, bool)
+    return float(x)
+
+
 def from_str(x: Any) -> str:
     assert isinstance(x, str)
     return x
@@ -47,32 +47,32 @@ def to_class(c: Type[T], x: Any) -> dict:
 @dataclass
 class TopLevel:
     req_zero_min: int
-    opt_double: float | None = None
     opt_int: int | None = None
-    opt_pattern: str | None = None
+    opt_double: float | None = None
     opt_string: str | None = None
+    opt_pattern: str | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
         req_zero_min = from_int(obj.get("reqZeroMin"))
-        opt_double = from_union([from_float, from_none], obj.get("optDouble"))
         opt_int = from_union([from_int, from_none], obj.get("optInt"))
-        opt_pattern = from_union([from_str, from_none], obj.get("optPattern"))
+        opt_double = from_union([from_float, from_none], obj.get("optDouble"))
         opt_string = from_union([from_str, from_none], obj.get("optString"))
-        return TopLevel(req_zero_min, opt_double, opt_int, opt_pattern, opt_string)
+        opt_pattern = from_union([from_str, from_none], obj.get("optPattern"))
+        return TopLevel(req_zero_min, opt_int, opt_double, opt_string, opt_pattern)
 
     def to_dict(self) -> dict:
         result: dict = {}
         result["reqZeroMin"] = from_int(self.req_zero_min)
-        if self.opt_double is not None:
-            result["optDouble"] = from_union([to_float, from_none], self.opt_double)
         if self.opt_int is not None:
             result["optInt"] = from_union([from_int, from_none], self.opt_int)
-        if self.opt_pattern is not None:
-            result["optPattern"] = from_union([from_str, from_none], self.opt_pattern)
+        if self.opt_double is not None:
+            result["optDouble"] = from_union([to_float, from_none], self.opt_double)
         if self.opt_string is not None:
             result["optString"] = from_union([from_str, from_none], self.opt_string)
+        if self.opt_pattern is not None:
+            result["optPattern"] = from_union([from_str, from_none], self.opt_pattern)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/optional-date-time.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/optional-date-time.schema/default/quicktype.py
index a2059f1..149b95c 100644
--- a/base/schema-python/test/inputs/schema/optional-date-time.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/optional-date-time.schema/default/quicktype.py
@@ -13,15 +13,15 @@ def from_date(x: Any) -> datetime.date:
     return dateutil.parser.parse(x).date()
 
 
-def from_datetime(x: Any) -> datetime.datetime:
-    return dateutil.parser.parse(x)
-
-
 def from_time(x: Any) -> datetime.time:
     assert isinstance(x, str) and re.match(r"^\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$", x)
     return dateutil.parser.parse(x).time()
 
 
+def from_datetime(x: Any) -> datetime.datetime:
+    return dateutil.parser.parse(x)
+
+
 def from_none(x: Any) -> Any:
     assert x is None
     return x
@@ -44,34 +44,34 @@ def to_class(c: Type[T], x: Any) -> dict:
 @dataclass
 class TopLevel:
     required_date: datetime.date
-    required_date_time: datetime.datetime
     required_time: datetime.time
+    required_date_time: datetime.datetime
     optional_date: datetime.date | None = None
-    optional_date_time: datetime.datetime | None = None
     optional_time: datetime.time | None = None
+    optional_date_time: datetime.datetime | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
         required_date = from_date(obj.get("required-date"))
-        required_date_time = from_datetime(obj.get("required-date-time"))
         required_time = from_time(obj.get("required-time"))
+        required_date_time = from_datetime(obj.get("required-date-time"))
         optional_date = from_union([from_date, from_none], obj.get("optional-date"))
-        optional_date_time = from_union([from_datetime, from_none], obj.get("optional-date-time"))
         optional_time = from_union([from_time, from_none], obj.get("optional-time"))
-        return TopLevel(required_date, required_date_time, required_time, optional_date, optional_date_time, optional_time)
+        optional_date_time = from_union([from_datetime, from_none], obj.get("optional-date-time"))
+        return TopLevel(required_date, required_time, required_date_time, optional_date, optional_time, optional_date_time)
 
     def to_dict(self) -> dict:
         result: dict = {}
         result["required-date"] = self.required_date.isoformat()
-        result["required-date-time"] = self.required_date_time.isoformat()
         result["required-time"] = self.required_time.isoformat()
+        result["required-date-time"] = self.required_date_time.isoformat()
         if self.optional_date is not None:
             result["optional-date"] = from_union([lambda x: x.isoformat(), from_none], self.optional_date)
-        if self.optional_date_time is not None:
-            result["optional-date-time"] = from_union([lambda x: x.isoformat(), from_none], self.optional_date_time)
         if self.optional_time is not None:
             result["optional-time"] = from_union([lambda x: x.isoformat(), from_none], self.optional_time)
+        if self.optional_date_time is not None:
+            result["optional-date-time"] = from_union([lambda x: x.isoformat(), from_none], self.optional_date_time)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/prefix-items.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/prefix-items.schema/default/quicktype.py
index 92b6ac2..f5986c7 100644
--- a/base/schema-python/test/inputs/schema/prefix-items.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/prefix-items.schema/default/quicktype.py
@@ -36,20 +36,20 @@ def to_class(c: Type[T], x: Any) -> dict:
 
 @dataclass
 class TopLevel:
-    open: list[bool | int]
     tuple: list[bool | int]
+    open: list[bool | int]
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
-        open = from_list(lambda x: from_union([from_bool, from_int], x), obj.get("open"))
         tuple = from_list(lambda x: from_union([from_bool, from_int], x), obj.get("tuple"))
-        return TopLevel(open, tuple)
+        open = from_list(lambda x: from_union([from_bool, from_int], x), obj.get("open"))
+        return TopLevel(tuple, open)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        result["open"] = from_list(lambda x: from_union([from_bool, from_int], x), self.open)
         result["tuple"] = from_list(lambda x: from_union([from_bool, from_int], x), self.tuple)
+        result["open"] = from_list(lambda x: from_union([from_bool, from_int], x), self.open)
         return result
 
 
diff --git a/head/schema-python/test/inputs/schema/property-order.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/property-order.schema/default/quicktype.py
new file mode 100644
index 0000000..7837858
--- /dev/null
+++ b/head/schema-python/test/inputs/schema/property-order.schema/default/quicktype.py
@@ -0,0 +1,96 @@
+from dataclasses import dataclass
+from typing import Any, TypeVar, Type, cast
+
+
+T = TypeVar("T")
+
+
+def from_float(x: Any) -> float:
+    assert isinstance(x, (float, int)) and not isinstance(x, bool)
+    return float(x)
+
+
+def from_str(x: Any) -> str:
+    assert isinstance(x, str)
+    return x
+
+
+def from_bool(x: Any) -> bool:
+    assert isinstance(x, bool)
+    return x
+
+
+def to_float(x: Any) -> float:
+    assert isinstance(x, (int, float))
+    return x
+
+
+def from_int(x: Any) -> int:
+    assert isinstance(x, int) and not isinstance(x, bool)
+    return x
+
+
+def to_class(c: Type[T], x: Any) -> dict:
+    assert isinstance(x, c)
+    return cast(Any, x).to_dict()
+
+
+@dataclass
+class Ordered:
+    mango: float
+    zebra: str
+    apple: bool
+
+    @staticmethod
+    def from_dict(obj: Any) -> 'Ordered':
+        assert isinstance(obj, dict)
+        mango = from_float(obj.get("mango"))
+        zebra = from_str(obj.get("zebra"))
+        apple = from_bool(obj.get("apple"))
+        return Ordered(mango, zebra, apple)
+
+    def to_dict(self) -> dict:
+        result: dict = {}
+        result["mango"] = to_float(self.mango)
+        result["zebra"] = from_str(self.zebra)
+        result["apple"] = from_bool(self.apple)
+        return result
+
+
+@dataclass
+class TopLevel:
+    zebra: str
+    mango: float
+    apple: bool
+    delta: str
+    banana: int
+    ordered: Ordered
+
+    @staticmethod
+    def from_dict(obj: Any) -> 'TopLevel':
+        assert isinstance(obj, dict)
+        zebra = from_str(obj.get("zebra"))
+        mango = from_float(obj.get("mango"))
+        apple = from_bool(obj.get("apple"))
+        delta = from_str(obj.get("delta"))
+        banana = from_int(obj.get("banana"))
+        ordered = Ordered.from_dict(obj.get("ordered"))
+        return TopLevel(zebra, mango, apple, delta, banana, ordered)
+
+    def to_dict(self) -> dict:
+        result: dict = {}
+        result["zebra"] = from_str(self.zebra)
+        result["mango"] = to_float(self.mango)
+        result["apple"] = from_bool(self.apple)
+        result["delta"] = from_str(self.delta)
+        result["banana"] = from_int(self.banana)
+        result["ordered"] = to_class(Ordered, self.ordered)
+        return result
+
+
+def top_level_from_dict(s: Any) -> TopLevel:
+    return TopLevel.from_dict(s)
+
+
+def top_level_to_dict(x: TopLevel) -> Any:
+    return to_class(TopLevel, x)
diff --git a/base/schema-python/test/inputs/schema/renaming-bug.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/renaming-bug.schema/default/quicktype.py
index fc3dea6..1bfaf75 100644
--- a/base/schema-python/test/inputs/schema/renaming-bug.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/renaming-bug.schema/default/quicktype.py
@@ -92,26 +92,26 @@ class CircularShape:
 
 @dataclass
 class Part:
-    depth: str | None = None
     length: str | None = None
     width: str | None = None
+    depth: str | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'Part':
         assert isinstance(obj, dict)
-        depth = from_union([from_str, from_none], obj.get("depth"))
         length = from_union([from_str, from_none], obj.get("length"))
         width = from_union([from_str, from_none], obj.get("width"))
-        return Part(depth, length, width)
+        depth = from_union([from_str, from_none], obj.get("depth"))
+        return Part(length, width, depth)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        if self.depth is not None:
-            result["depth"] = from_union([from_str, from_none], self.depth)
         if self.length is not None:
             result["length"] = from_union([from_str, from_none], self.length)
         if self.width is not None:
             result["width"] = from_union([from_str, from_none], self.width)
+        if self.depth is not None:
+            result["depth"] = from_union([from_str, from_none], self.depth)
         return result
 
 
@@ -172,45 +172,45 @@ class History:
 
 @dataclass
 class Shape:
-    geometry: Geometry | None = None
     history: History | None = None
+    geometry: Geometry | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'Shape':
         assert isinstance(obj, dict)
-        geometry = from_union([Geometry.from_dict, from_none], obj.get("geometry"))
         history = from_union([History.from_dict, from_none], obj.get("history"))
-        return Shape(geometry, history)
+        geometry = from_union([Geometry.from_dict, from_none], obj.get("geometry"))
+        return Shape(history, geometry)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        if self.geometry is not None:
-            result["geometry"] = from_union([lambda x: to_class(Geometry, x), from_none], self.geometry)
         if self.history is not None:
             result["history"] = from_union([lambda x: to_class(History, x), from_none], self.history)
+        if self.geometry is not None:
+            result["geometry"] = from_union([lambda x: to_class(Geometry, x), from_none], self.geometry)
         return result
 
 
 @dataclass
 class Berry:
-    color: Color | None = None
     name: str | None = None
+    color: Color | None = None
     shapes: list[Shape] | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'Berry':
         assert isinstance(obj, dict)
-        color = from_union([Color.from_dict, from_none], obj.get("color"))
         name = from_union([from_str, from_none], obj.get("name"))
+        color = from_union([Color.from_dict, from_none], obj.get("color"))
         shapes = from_union([lambda x: from_list(Shape.from_dict, x), from_none], obj.get("shapes"))
-        return Berry(color, name, shapes)
+        return Berry(name, color, shapes)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        if self.color is not None:
-            result["color"] = from_union([lambda x: to_class(Color, x), from_none], self.color)
         if self.name is not None:
             result["name"] = from_union([from_str, from_none], self.name)
+        if self.color is not None:
+            result["color"] = from_union([lambda x: to_class(Color, x), from_none], self.color)
         if self.shapes is not None:
             result["shapes"] = from_union([lambda x: from_list(lambda x: to_class(Shape, x), x), from_none], self.shapes)
         return result
@@ -219,46 +219,46 @@ class Berry:
 @dataclass
 class Fruit:
     apple: bool | None = None
-    berries: list[Berry] | None = None
     orange: bool | None = None
+    berries: list[Berry] | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'Fruit':
         assert isinstance(obj, dict)
         apple = from_union([from_bool, from_none], obj.get("apple"))
-        berries = from_union([lambda x: from_list(Berry.from_dict, x), from_none], obj.get("berries"))
         orange = from_union([from_bool, from_none], obj.get("orange"))
-        return Fruit(apple, berries, orange)
+        berries = from_union([lambda x: from_list(Berry.from_dict, x), from_none], obj.get("berries"))
+        return Fruit(apple, orange, berries)
 
     def to_dict(self) -> dict:
         result: dict = {}
         if self.apple is not None:
             result["apple"] = from_union([from_bool, from_none], self.apple)
-        if self.berries is not None:
-            result["berries"] = from_union([lambda x: from_list(lambda x: to_class(Berry, x), x), from_none], self.berries)
         if self.orange is not None:
             result["orange"] = from_union([from_bool, from_none], self.orange)
+        if self.berries is not None:
+            result["berries"] = from_union([lambda x: from_list(lambda x: to_class(Berry, x), x), from_none], self.berries)
         return result
 
 
 @dataclass
 class Limit:
-    maximum: float | None = None
     minimum: float | None = None
+    maximum: float | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'Limit':
         assert isinstance(obj, dict)
-        maximum = from_union([from_float, from_none], obj.get("maximum"))
         minimum = from_union([from_float, from_none], obj.get("minimum"))
-        return Limit(maximum, minimum)
+        maximum = from_union([from_float, from_none], obj.get("maximum"))
+        return Limit(minimum, maximum)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        if self.maximum is not None:
-            result["maximum"] = from_union([to_float, from_none], self.maximum)
         if self.minimum is not None:
             result["minimum"] = from_union([to_float, from_none], self.minimum)
+        if self.maximum is not None:
+            result["maximum"] = from_union([to_float, from_none], self.maximum)
         return result
 
 
@@ -327,38 +327,38 @@ class VehicleType:
 
 @dataclass
 class Vehicle:
-    brand: str | None = None
     id: str | None = None
-    speed: Speed | None = None
-    sub_module: bool | None = None
     type: VehicleType | None = None
+    speed: Speed | None = None
     year: str | None = None
+    brand: str | None = None
+    sub_module: bool | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'Vehicle':
         assert isinstance(obj, dict)
-        brand = from_union([from_str, from_none], obj.get("brand"))
         id = from_union([from_str, from_none], obj.get("id"))
-        speed = from_union([Speed.from_dict, from_none], obj.get("speed"))
-        sub_module = from_union([from_bool, from_none], obj.get("subModule"))
         type = from_union([VehicleType.from_dict, from_none], obj.get("type"))
+        speed = from_union([Speed.from_dict, from_none], obj.get("speed"))
         year = from_union([from_str, from_none], obj.get("year"))
-        return Vehicle(brand, id, speed, sub_module, type, year)
+        brand = from_union([from_str, from_none], obj.get("brand"))
+        sub_module = from_union([from_bool, from_none], obj.get("subModule"))
+        return Vehicle(id, type, speed, year, brand, sub_module)
 
     def to_dict(self) -> dict:
         result: dict = {}
-        if self.brand is not None:
-            result["brand"] = from_union([from_str, from_none], self.brand)
         if self.id is not None:
             result["id"] = from_union([from_str, from_none], self.id)
-        if self.speed is not None:
-            result["speed"] = from_union([lambda x: to_class(Speed, x), from_none], self.speed)
-        if self.sub_module is not None:
-            result["subModule"] = from_union([from_bool, from_none], self.sub_module)
         if self.type is not None:
             result["type"] = from_union([lambda x: to_class(VehicleType, x), from_none], self.type)
+        if self.speed is not None:
+            result["speed"] = from_union([lambda x: to_class(Speed, x), from_none], self.speed)
         if self.year is not None:
             result["year"] = from_union([from_str, from_none], self.year)
+        if self.brand is not None:
+            result["brand"] = from_union([from_str, from_none], self.brand)
+        if self.sub_module is not None:
+            result["subModule"] = from_union([from_bool, from_none], self.sub_module)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/uuid.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/uuid.schema/default/quicktype.py
index 0bd86f1..06d1bea 100644
--- a/base/schema-python/test/inputs/schema/uuid.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/uuid.schema/default/quicktype.py
@@ -17,16 +17,16 @@ def from_union(fs, x):
     assert False
 
 
-def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
-    assert isinstance(x, list)
-    return [f(y) for y in x]
-
-
 def from_none(x: Any) -> Any:
     assert x is None
     return x
 
 
+def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
+    assert isinstance(x, list)
+    return [f(y) for y in x]
+
+
 def to_enum(c: Type[EnumT], x: Any) -> EnumT:
     assert isinstance(x, c)
     return x.value
@@ -45,33 +45,33 @@ class UnionWithEnumEnum(Enum):
 class TopLevel:
     one: UUID
     union_with_enum: UnionWithEnumEnum | UUID
-    arr_nullable: list[UUID | None] | None = None
-    arr_one: list[UUID] | None = None
-    nullable: UUID | None = None
     optional: UUID | None = None
+    nullable: UUID | None = None
+    arr_one: list[UUID] | None = None
+    arr_nullable: list[UUID | None] | None = None
 
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
         one = UUID(obj.get("one"))
         union_with_enum = from_union([UnionWithEnumEnum, lambda x: UUID(x)], obj.get("unionWithEnum"))
-        arr_nullable = from_union([lambda x: from_list(lambda x: from_union([from_none, lambda x: UUID(x)], x), x), from_none], obj.get("arrNullable"))
-        arr_one = from_union([lambda x: from_list(lambda x: UUID(x), x), from_none], obj.get("arrOne"))
-        nullable = from_union([from_none, lambda x: UUID(x)], obj.get("nullable"))
         optional = from_union([from_none, lambda x: UUID(x)], obj.get("optional"))
-        return TopLevel(one, union_with_enum, arr_nullable, arr_one, nullable, optional)
+        nullable = from_union([from_none, lambda x: UUID(x)], obj.get("nullable"))
+        arr_one = from_union([lambda x: from_list(lambda x: UUID(x), x), from_none], obj.get("arrOne"))
+        arr_nullable = from_union([lambda x: from_list(lambda x: from_union([from_none, lambda x: UUID(x)], x), x), from_none], obj.get("arrNullable"))
+        return TopLevel(one, union_with_enum, optional, nullable, arr_one, arr_nullable)
 
     def to_dict(self) -> dict:
         result: dict = {}
         result["one"] = str(self.one)
         result["unionWithEnum"] = from_union([lambda x: to_enum(UnionWithEnumEnum, x), lambda x: str(x)], self.union_with_enum)
-        if self.arr_nullable is not None:
-            result["arrNullable"] = from_union([lambda x: from_list(lambda x: from_union([from_none, lambda x: str(x)], x), x), from_none], self.arr_nullable)
-        if self.arr_one is not None:
-            result["arrOne"] = from_union([lambda x: from_list(lambda x: str(x), x), from_none], self.arr_one)
-        result["nullable"] = from_union([from_none, lambda x: str(x)], self.nullable)
         if self.optional is not None:
             result["optional"] = from_union([from_none, lambda x: str(x)], self.optional)
+        result["nullable"] = from_union([from_none, lambda x: str(x)], self.nullable)
+        if self.arr_one is not None:
+            result["arrOne"] = from_union([lambda x: from_list(lambda x: str(x), x), from_none], self.arr_one)
+        if self.arr_nullable is not None:
+            result["arrNullable"] = from_union([lambda x: from_list(lambda x: from_union([from_none, lambda x: str(x)], x), x), from_none], self.arr_nullable)
         return result
 
 
diff --git a/base/schema-python/test/inputs/schema/vega-lite.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/vega-lite.schema/default/quicktype.py
index af71a4d..2597582 100644
--- a/base/schema-python/test/inputs/schema/vega-lite.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/vega-lite.schema/default/quicktype.py
@@ -310,6 +310,11 @@ class MarkConfig:
     
     __Default value:__ (None)
     """
+    fill_opacity: float | None = None
+    """The fill opacity (value between [0,1]).
+    
+    __Default value:__ `1`
+    """
     filled: bool | None = None
     """Whether the mark's color should be used as fill color instead of stroke color.
     
@@ -319,11 +324,6 @@ class MarkConfig:
     
     __Note:__ This property cannot be used in a [style config](mark.html#style-config).
     """
-    fill_opacity: float | None = None
-    """The fill opacity (value between [0,1]).
-    
-    __Default value:__ `1`
-    """
     font: str | None = None
     """The typeface to set the text in (e.g., `"Helvetica Neue"`)."""
 
@@ -440,8 +440,8 @@ class MarkConfig:
         dx = from_union([from_float, from_none], obj.get("dx"))
         dy = from_union([from_float, from_none], obj.get("dy"))
         fill = from_union([from_str, from_none], obj.get("fill"))
-        filled = from_union([from_bool, from_none], obj.get("filled"))
         fill_opacity = from_union([from_float, from_none], obj.get("fillOpacity"))
+        filled = from_union([from_bool, from_none], obj.get("filled"))
         font = from_union([from_str, from_none], obj.get("font"))
         font_size = from_union([from_float, from_none], obj.get("fontSize"))
         font_style = from_union([FontStyle, from_none], obj.get("fontStyle"))
@@ -462,7 +462,7 @@ class MarkConfig:
         tension = from_union([from_float, from_none], obj.get("tension"))
         text = from_union([from_str, from_none], obj.get("text"))
         theta = from_union([from_float, from_none], obj.get("theta"))
-        return MarkConfig(align, angle, baseline, color, cursor, dx, dy, fill, filled, fill_opacity, font, font_size, font_style, font_weight, href, interpolate, limit, opacity, orient, radius, shape, size, stroke, stroke_dash, stroke_dash_offset, stroke_opacity, stroke_width, tension, text, theta)
+        return MarkConfig(align, angle, baseline, color, cursor, dx, dy, fill, fill_opacity, filled, font, font_size, font_style, font_weight, href, interpolate, limit, opacity, orient, radius, shape, size, stroke, stroke_dash, stroke_dash_offset, stroke_opacity, stroke_width, tension, text, theta)
 
     def to_dict(self) -> dict:
         result: dict = {}
@@ -482,10 +482,10 @@ class MarkConfig:
             result["dy"] = from_union([to_float, from_none], self.dy)
         if self.fill is not None:
             result["fill"] = from_union([from_str, from_none], self.fill)
-        if self.filled is not None:
-            result["filled"] = from_union([from_bool, from_none], self.filled)
         if self.fill_opacity is not None:
             result["fillOpacity"] = from_union([to_float, from_none], self.fill_opacity)
+        if self.filled is not None:
+            result["filled"] = from_union([from_bool, from_none], self.filled)
         if self.font is not None:
             result["font"] = from_union([from_str, from_none], self.font)
         if self.font_size is not None:
@@ -659,15 +659,15 @@ class AxisConfig:
     tick_round: bool | None = None
     """Boolean flag indicating if pixel position values should be rounded to the nearest integer."""
 
-    ticks: bool | None = None
-    """Boolean value that determines whether the axis should include ticks."""
-
     tick_size: float | None = None
     """The size in pixels of axis ticks."""
 
     tick_width: float | None = None
     """The width, in pixels, of ticks."""
 
+    ticks: bool | None = None
+    """Boolean value that determines whether the axis should include ticks."""
+
     title_align: str | None = None
     """Horizontal text alignment of axis titles."""
 
@@ -732,9 +732,9 @@ class AxisConfig:
         short_time_labels = from_union([from_bool, from_none], obj.get("shortTimeLabels"))
         tick_color = from_union([from_str, from_none], obj.get("tickColor"))
         tick_round = from_union([from_bool, from_none], obj.get("tickRound"))
-        ticks = from_union([from_bool, from_none], obj.get("ticks"))
         tick_size = from_union([from_float, from_none], obj.get("tickSize"))
         tick_width = from_union([from_float, from_none], obj.get("tickWidth"))
+        ticks = from_union([from_bool, from_none], obj.get("ticks"))
         title_align = from_union([from_str, from_none], obj.get("titleAlign"))
         title_angle = from_union([from_float, from_none], obj.get("titleAngle"))
         title_baseline = from_union([from_str, from_none], obj.get("titleBaseline"))
@@ -747,7 +747,7 @@ class AxisConfig:
         title_padding = from_union([from_float, from_none], obj.get("titlePadding"))
         title_x = from_union([from_float, from_none], obj.get("titleX"))
         title_y = from_union([from_float, from_none], obj.get("titleY"))
-        return AxisConfig(band_position, domain, domain_color, domain_width, grid, grid_color, grid_dash, grid_opacity, grid_width, label_angle, label_bound, label_color, label_flush, label_font, label_font_size, label_limit, label_overlap, label_padding, labels, max_extent, min_extent, short_time_labels, tick_color, tick_round, ticks, tick_size, tick_width, title_align, title_angle, title_baseline, title_color, title_font, title_font_size, title_font_weight, title_limit, title_max_length, title_padding, title_x, title_y)
+        return AxisConfig(band_position, domain, domain_color, domain_width, grid, grid_color, grid_dash, grid_opacity, grid_width, label_angle, label_bound, label_color, label_flush, label_font, label_font_size, label_limit, label_overlap, label_padding, labels, max_extent, min_extent, short_time_labels, tick_color, tick_round, tick_size, tick_width, ticks, title_align, title_angle, title_baseline, title_color, title_font, title_font_size, title_font_weight, title_limit, title_max_length, title_padding, title_x, title_y)
 
     def to_dict(self) -> dict:
         result: dict = {}
@@ -799,12 +799,12 @@ class AxisConfig:
             result["tickColor"] = from_union([from_str, from_none], self.tick_color)
         if self.tick_round is not None:
             result["tickRound"] = from_union([from_bool, from_none], self.tick_round)
-        if self.ticks is not None:
-            result["ticks"] = from_union([from_bool, from_none], self.ticks)
         if self.tick_size is not None:
             result["tickSize"] = from_union([to_float, from_none], self.tick_size)
         if self.tick_width is not None:
             result["tickWidth"] = from_union([to_float, from_none], self.tick_width)
+        if self.ticks is not None:
+            result["ticks"] = from_union([from_bool, from_none], self.ticks)
         if self.title_align is not None:
             result["titleAlign"] = from_union([from_str, from_none], self.title_align)
         if self.title_angle is not None:
@@ -962,15 +962,15 @@ class VGAxisConfig:
     tick_round: bool | None = None
     """Boolean flag indicating if pixel position values should be rounded to the nearest integer."""
 
-    ticks: bool | None = None
-    """Boolean value that determines whether the axis should include ticks."""
-
     tick_size: float | None = None
     """The size in pixels of axis ticks."""
 
     tick_width: float | None = None
     """The width, in pixels, of ticks."""
 
+    ticks: bool | None = None
+    """Boolean value that determines whether the axis should include ticks."""
+
     title_align: str | None = None
     """Horizontal text alignment of axis titles."""
 
@@ -1034,9 +1034,9 @@ class VGAxisConfig:
         min_extent = from_union([from_float, from_none], obj.get("minExtent"))
         tick_color = from_union([from_str, from_none], obj.get("tickColor"))
         tick_round = from_union([from_bool, from_none], obj.get("tickRound"))
-        ticks = from_union([from_bool, from_none], obj.get("ticks"))
         tick_size = from_union([from_float, from_none], obj.get("tickSize"))
         tick_width = from_union([from_float, from_none], obj.get("tickWidth"))
+        ticks = from_union([from_bool, from_none], obj.get("ticks"))
         title_align = from_union([from_str, from_none], obj.get("titleAlign"))
         title_angle = from_union([from_float, from_none], obj.get("titleAngle"))
         title_baseline = from_union([from_str, from_none], obj.get("titleBaseline"))
@@ -1049,7 +1049,7 @@ class VGAxisConfig:
         title_padding = from_union([from_float, from_none], obj.get("titlePadding"))
         title_x = from_union([from_float, from_none], obj.get("titleX"))
         title_y = from_union([from_float, from_none], obj.get("titleY"))
-        return VGAxisConfig(band_position, domain, domain_color, domain_width, grid, grid_color, grid_dash, grid_opacity, grid_width, label_angle, label_bound, label_color, label_flush, label_font, label_font_size, label_limit, label_overlap, label_padding, labels, max_extent, min_extent, tick_color, tick_round, ticks, tick_size, tick_width, title_align, title_angle, title_baseline, title_color, title_font, title_font_size, title_font_weight, title_limit, title_max_length, title_padding, title_x, title_y)
+        return VGAxisConfig(band_position, domain, domain_color, domain_width, grid, grid_color, grid_dash, grid_opacity, grid_width, label_angle, label_bound, label_color, label_flush, label_font, label_font_size, label_limit, label_overlap, label_padding, labels, max_extent, min_extent, tick_color, tick_round, tick_size, tick_width, ticks, title_align, title_angle, title_baseline, title_color, title_font, title_font_size, title_font_weight, title_limit, title_max_length, title_padding, title_x, title_y)
 
     def to_dict(self) -> dict:
         result: dict = {}
@@ -1099,12 +1099,12 @@ class VGAxisConfig:
             result["tickColor"] = from_union([from_str, from_none], self.tick_color)
         if self.tick_round is not None:
             result["tickRound"] = from_union([from_bool, from_none], self.tick_round)
-        if self.ticks is not None:
-            result["ticks"] = from_union([from_bool, from_none], self.ticks)
         if self.tick_size is not None:
             result["tickSize"] = from_union([to_float, from_none], self.tick_size)
         if self.tick_width is not None:
             result["tickWidth"] = from_union([to_float, from_none], self.tick_width)
+        if self.ticks is not None:
+            result["ticks"] = from_union([from_bool, from_none], self.ticks)
         if self.title_align is not None:
             result["titleAlign"] = from_union([from_str, from_none], self.title_align)
         if self.title_angle is not None:
@@ -1187,6 +1187,11 @@ class BarConfig:
     
     __Default value:__ (None)
     """
+    fill_opacity: float | None = None
+    """The fill opacity (value between [0,1]).
+    
+    __Default value:__ `1`
+    """
     filled: bool | None = None
     """Whether the mark's color should be used as fill color instead of stroke color.
     
@@ -1196,11 +1201,6 @@ class BarConfig:
     
     __Note:__ This property cannot be used in a [style config](mark.html#style-config).
     """
-    fill_opacity: float | None = None
-    """The fill opacity (value between [0,1]).
-    
-    __Default value:__ `1`
-    """
     font: str | None = None
     """The typeface to set the text in (e.g., `"Helvetica Neue"`)."""
 
@@ -1320,8 +1320,8 @@ class BarConfig:
         dx = from_union([from_float, from_none], obj.get("dx"))
         dy = from_union([from_float, from_none], obj.get("dy"))
         fill = from_union([from_str, from_none], obj.get("fill"))
-        filled = from_union([from_bool, from_none], obj.get("filled"))
         fill_opacity = from_union([from_float, from_none], obj.get("fillOpacity"))
+        filled = from_union([from_bool, from_none], obj.get("filled"))
         font = from_union([from_str, from_none], obj.get("font"))
         font_size = from_union([from_float, from_none], obj.get("fontSize"))
         font_style = from_union([FontStyle, from_none], obj.get("fontStyle"))
@@ -1342,7 +1342,7 @@ class BarConfig:
         tension = from_union([from_float, from_none], obj.get("tension"))
         text = from_union([from_str, from_none], obj.get("text"))
         theta = from_union([from_float, from_none], obj.get("theta"))
-        return BarConfig(align, angle, baseline, bin_spacing, color, continuous_band_size, cursor, discrete_band_size, dx, dy, fill, filled, fill_opacity, font, font_size, font_style, font_weight, href, interpolate, limit, opacity, orient, radius, shape, size, stroke, stroke_dash, stroke_dash_offset, stroke_opacity, stroke_width, tension, text, theta)
+        return BarConfig(align, angle, baseline, bin_spacing, color, continuous_band_size, cursor, discrete_band_size, dx, dy, fill, fill_opacity, filled, font, font_size, font_style, font_weight, href, interpolate, limit, opacity, orient, radius, shape, size, stroke, stroke_dash, stroke_dash_offset, stroke_opacity, stroke_width, tension, text, theta)
 
     def to_dict(self) -> dict:
         result: dict = {}
@@ -1368,10 +1368,10 @@ class BarConfig:
             result["dy"] = from_union([to_float, from_none], self.dy)
         if self.fill is not None:
             result["fill"] = from_union([from_str, from_none], self.fill)
-        if self.filled is not None:
-            result["filled"] = from_union([from_bool, from_none], self.filled)
         if self.fill_opacity is not None:
             result["fillOpacity"] = from_union([to_float, from_none], self.fill_opacity)
+        if self.filled is not None:
+            result["filled"] = from_union([from_bool, from_none], self.filled)
         if self.font is not None:
             result["font"] = from_union([from_str, from_none], self.font)
         if self.font_size is not None:
@@ -2801,6 +2801,11 @@ class TextConfig:
     
     __Default value:__ (None)
     """
+    fill_opacity: float | None = None
+    """The fill opacity (value between [0,1]).
+    
+    __Default value:__ `1`
+    """
     filled: bool | None = None
     """Whether the mark's color should be used as fill color instead of stroke color.
     
@@ -2810,11 +2815,6 @@ class TextConfig:
     
     __Note:__ This property cannot be used in a [style config](mark.html#style-config).
     """
-    fill_opacity: float | None = None
-    """The fill opacity (value between [0,1]).
-    
-    __Default value:__ `1`
-    """
     font: str | None = None
     """The typeface to set the text in (e.g., `"Helvetica Neue"`)."""
 
@@ -2934,8 +2934,8 @@ class TextConfig:
         dx = from_union([from_float, from_none], obj.get("dx"))
         dy = from_union([from_float, from_none], obj.get("dy"))
         fill = from_union([from_str, from_none], obj.get("fill"))
-        filled = from_union([from_bool, from_none], obj.get("filled"))
         fill_opacity = from_union([from_float, from_none], obj.get("fillOpacity"))
+        filled = from_union([from_bool, from_none], obj.get("filled"))
         font = from_union([from_str, from_none], obj.get("font"))
         font_size = from_union([from_float, from_none], obj.get("fontSize"))
         font_style = from_union([FontStyle, from_none], obj.get("fontStyle"))
@@ -2957,7 +2957,7 @@ class TextConfig:
         tension = from_union([from_float, from_none], obj.get("tension"))
         text = from_union([from_str, from_none], obj.get("text"))
         theta = from_union([from_float, from_none], obj.get("theta"))
-        return TextConfig(align, angle, baseline, color, cursor, dx, dy, fill, filled, fill_opacity, font, font_size, font_style, font_weight, href, interpolate, limit, opacity, orient, radius, shape, short_time_labels, size, stroke, stroke_dash, stroke_dash_offset, stroke_opacity, stroke_width, tension, text, theta)
+        return TextConfig(align, angle, baseline, color, cursor, dx, dy, fill, fill_opacity, filled, font, font_size, font_style, font_weight, href, interpolate, limit, opacity, orient, radius, shape, short_time_labels, size, stroke, stroke_dash, stroke_dash_offset, stroke_opacity, stroke_width, tension, text, theta)
 
     def to_dict(self) -> dict:
         result: dict = {}
@@ -2977,10 +2977,10 @@ class TextConfig:
             result["dy"] = from_union([to_float, from_none], self.dy)
         if self.fill is not None:
             result["fill"] = from_union([from_str, from_none], self.fill)
-        if self.filled is not None:
-            result["filled"] = from_union([from_bool, from_none], self.filled)
         if self.fill_opacity is not None:
             result["fillOpacity"] = from_union([to_float, from_none], self.fill_opacity)
+        if self.filled is not None:
+            result["filled"] = from_union([from_bool, from_none], self.filled)
         if self.font is not None:
             result["font"] = from_union([from_str, from_none], self.font)
         if self.font_size is not None:
@@ -3071,6 +3071,11 @@ class TickConfig:
     
     __Default value:__ (None)
     """
+    fill_opacity: float | None = None
+    """The fill opacity (value between [0,1]).
+    
+    __Default value:__ `1`
+    """
     filled: bool | None = None
     """Whether the mark's color should be used as fill color instead of stroke color.
     
@@ -3080,11 +3085,6 @@ class TickConfig:
     
     __Note:__ This property cannot be used in a [style config](mark.html#style-config).
     """
-    fill_opacity: float | None = None
-    """The fill opacity (value between [0,1]).
-    
-    __Default value:__ `1`
-    """
     font: str | None = None
     """The typeface to set the text in (e.g., `"Helvetica Neue"`)."""
 
@@ -3207,8 +3207,8 @@ class TickConfig:
         dx = from_union([from_float, from_none], obj.get("dx"))
         dy = from_union([from_float, from_none], obj.get("dy"))
         fill = from_union([from_str, from_none], obj.get("fill"))
-        filled = from_union([from_bool, from_none], obj.get("filled"))
         fill_opacity = from_union([from_float, from_none], obj.get("fillOpacity"))
+        filled = from_union([from_bool, from_none], obj.get("filled"))
         font = from_union([from_str, from_none], obj.get("font"))
         font_size = from_union([from_float, from_none], obj.get("fontSize"))
         font_style = from_union([FontStyle, from_none], obj.get("fontStyle"))
@@ -3230,7 +3230,7 @@ class TickConfig:
         text = from_union([from_str, from_none], obj.get("text"))
         theta = from_union([from_float, from_none], obj.get("theta"))
         thickness = from_union([from_float, from_none], obj.get("thickness"))
-        return TickConfig(align, angle, band_size, baseline, color, cursor, dx, dy, fill, filled, fill_opacity, font, font_size, font_style, font_weight, href, interpolate, limit, opacity, orient, radius, shape, size, stroke, stroke_dash, stroke_dash_offset, stroke_opacity, stroke_width, tension, text, theta, thickness)
+        return TickConfig(align, angle, band_size, baseline, color, cursor, dx, dy, fill, fill_opacity, filled, font, font_size, font_style, font_weight, href, interpolate, limit, opacity, orient, radius, shape, size, stroke, stroke_dash, stroke_dash_offset, stroke_opacity, stroke_width, tension, text, theta, thickness)
 
     def to_dict(self) -> dict:
         result: dict = {}
@@ -3252,10 +3252,10 @@ class TickConfig:
             result["dy"] = from_union([to_float, from_none], self.dy)
         if self.fill is not None:
             result["fill"] = from_union([from_str, from_none], self.fill)
-        if self.filled is not None:
-            result["filled"] = from_union([from_bool, from_none], self.filled)
         if self.fill_opacity is not None:
             result["fillOpacity"] = from_union([to_float, from_none], self.fill_opacity)
+        if self.filled is not None:
+            result["filled"] = from_union([from_bool, from_none], self.filled)
         if self.font is not None:
             result["font"] = from_union([from_str, from_none], self.font)
         if self.font_size is not None:
@@ -5949,12 +5949,12 @@ class Axis:
     may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the
     underlying scale's range.
     """
-    ticks: bool | None = None
-    """Boolean value that determines whether the axis should include ticks."""
-
     tick_size: float | None = None
     """The size in pixels of axis ticks."""
 
+    ticks: bool | None = None
+    """Boolean value that determines whether the axis should include ticks."""
+
     title: str | None = None
     """A title for the field. If `null`, the title will be removed.
     
@@ -6006,14 +6006,14 @@ class Axis:
         orient = from_union([TitleOrient, from_none], obj.get("orient"))
         position = from_union([from_float, from_none], obj.get("position"))
         tick_count = from_union([from_float, from_none], obj.get("tickCount"))
-        ticks = from_union([from_bool, from_none], obj.get("ticks"))
         tick_size = from_union([from_float, from_none], obj.get("tickSize"))
+        ticks = from_union([from_bool, from_none], obj.get("ticks"))
         title = from_union([from_none, from_str], obj.get("title"))
         title_max_length = from_union([from_float, from_none], obj.get("titleMaxLength"))
         title_padding = from_union([from_float, from_none], obj.get("titlePadding"))
         values = from_union([lambda x: from_list(lambda x: from_union([from_float, DateTime.from_dict], x), x), from_none], obj.get("values"))
         zindex = from_union([from_float, from_none], obj.get("zindex"))
-        return Axis(domain, format, grid, label_angle, label_bound, label_flush, label_overlap, label_padding, labels, max_extent, min_extent, offset, orient, position, tick_count, ticks, tick_size, title, title_max_length, title_padding, values, zindex)
+        return Axis(domain, format, grid, label_angle, label_bound, label_flush, label_overlap, label_padding, labels, max_extent, min_extent, offset, orient, position, tick_count, tick_size, ticks, title, title_max_length, title_padding, values, zindex)
 
     def to_dict(self) -> dict:
         result: dict = {}
@@ -6047,10 +6047,10 @@ class Axis:
             result["position"] = from_union([to_float, from_none], self.position)
         if self.tick_count is not None:
             result["tickCount"] = from_union([to_float, from_none], self.tick_count)
-        if self.ticks is not None:
-            result["ticks"] = from_union([from_bool, from_none], self.ticks)
         if self.tick_size is not None:
             result["tickSize"] = from_union([to_float, from_none], self.tick_size)
+        if self.ticks is not None:
+            result["ticks"] = from_union([from_bool, from_none], self.ticks)
         if self.title is not None:
             result["title"] = from_union([from_none, from_str], self.title)
         if self.title_max_length is not None:
@@ -6618,6 +6618,11 @@ class MarkDef:
     
     __Default value:__ (None)
     """
+    fill_opacity: float | None = None
+    """The fill opacity (value between [0,1]).
+    
+    __Default value:__ `1`
+    """
     filled: bool | None = None
     """Whether the mark's color should be used as fill color instead of stroke color.
     
@@ -6627,11 +6632,6 @@ class MarkDef:
     
     __Note:__ This property cannot be used in a [style config](mark.html#style-config).
     """
-    fill_opacity: float | None = None
-    """The fill opacity (value between [0,1]).
-    
-    __Default value:__ `1`
-    """
     font: str | None = None
     """The typeface to set the text in (e.g., `"Helvetica Neue"`)."""
 
@@ -6763,8 +6763,8 @@ class MarkDef:
         dx = from_union([from_float, from_none], obj.get("dx"))
         dy = from_union([from_float, from_none], obj.get("dy"))
         fill = from_union([from_str, from_none], obj.get("fill"))
-        filled = from_union([from_bool, from_none], obj.get("filled"))
         fill_opacity = from_union([from_float, from_none], obj.get("fillOpacity"))
+        filled = from_union([from_bool, from_none], obj.get("filled"))
         font = from_union([from_str, from_none], obj.get("font"))
         font_size = from_union([from_float, from_none], obj.get("fontSize"))
         font_style = from_union([FontStyle, from_none], obj.get("fontStyle"))
@@ -6786,7 +6786,7 @@ class MarkDef:
         tension = from_union([from_float, from_none], obj.get("tension"))
         text = from_union([from_str, from_none], obj.get("text"))
         theta = from_union([from_float, from_none], obj.get("theta"))
-        return MarkDef(type, align, angle, baseline, clip, color, cursor, dx, dy, fill, filled, fill_opacity, font, font_size, font_style, font_weight, href, interpolate, limit, opacity, orient, radius, shape, size, stroke, stroke_dash, stroke_dash_offset, stroke_opacity, stroke_width, style, tension, text, theta)
+        return MarkDef(type, align, angle, baseline, clip, color, cursor, dx, dy, fill, fill_opacity, filled, font, font_size, font_style, font_weight, href, interpolate, limit, opacity, orient, radius, shape, size, stroke, stroke_dash, stroke_dash_offset, stroke_opacity, stroke_width, style, tension, text, theta)
 
     def to_dict(self) -> dict:
         result: dict = {}
@@ -6809,10 +6809,10 @@ class MarkDef:
             result["dy"] = from_union([to_float, from_none], self.dy)
         if self.fill is not None:
             result["fill"] = from_union([from_str, from_none], self.fill)
-        if self.filled is not None:
-            result["filled"] = from_union([from_bool, from_none], self.filled)
         if self.fill_opacity is not None:
             result["fillOpacity"] = from_union([to_float, from_none], self.fill_opacity)
+        if self.filled is not None:
+            result["filled"] = from_union([from_bool, from_none], self.filled)
         if self.font is not None:
             result["font"] = from_union([from_str, from_none], self.font)
         if self.font_size is not None:
diff --git a/base/schema-ruby/test/inputs/schema/accessors.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/accessors.schema/default/TopLevel.rb
index 50599bd..97c104b 100644
--- a/base/schema-ruby/test/inputs/schema/accessors.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/accessors.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.barre
+#   puts top_level.unionization
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -60,18 +60,18 @@ class Union < Dry::Struct
 end
 
 class TopLevel < Dry::Struct
-  attribute :barre,           Types::String
+  attribute :unionization,    Types.Instance(Union)
   attribute :enumerification, Types::Enum
   attribute :foo,             Types::String
-  attribute :unionization,    Types.Instance(Union)
+  attribute :barre,           Types::String
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      barre:           d.fetch("bar"),
+      unionization:    Union.from_dynamic!(d.fetch("union")),
       enumerification: d.fetch("enum"),
       foo:             d.fetch("foo"),
-      unionization:    Union.from_dynamic!(d.fetch("union")),
+      barre:           d.fetch("bar"),
     )
   end
 
@@ -81,10 +81,10 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "bar"   => barre,
+      "union" => unionization.to_dynamic,
       "enum"  => enumerification,
       "foo"   => foo,
-      "union" => unionization.to_dynamic,
+      "bar"   => barre,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.rb
index 5a50d39..5435020 100644
--- a/base/schema-ruby/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.rb
@@ -36,16 +36,16 @@ end
 class TopLevel < Dry::Struct
   attribute :amount,         Types::Double
   attribute :frequency,      Types::Frequency
-  attribute :description,    Types::String.optional
   attribute :top_level_type, Types::Type
+  attribute :description,    Types::String.optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
       amount:         d.fetch("amount"),
       frequency:      d.fetch("frequency"),
-      description:    d["description"],
       top_level_type: d.fetch("type"),
+      description:    d["description"],
     )
   end
 
@@ -57,8 +57,8 @@ class TopLevel < Dry::Struct
     {
       "amount"      => amount,
       "frequency"   => frequency,
-      "description" => description,
       "type"        => top_level_type,
+      "description" => description,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/bool-string.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/bool-string.schema/default/TopLevel.rb
index 8cb72d5..f57c31a 100644
--- a/base/schema-ruby/test/inputs/schema/bool-string.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/bool-string.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.arr_one&.first
+#   puts top_level.arr_nullable&.first.nil?
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -53,22 +53,22 @@ class UnionWithBool < Dry::Struct
 end
 
 class TopLevel < Dry::Struct
-  attribute :arr_nullable,             Types.Array(Types::String.optional).optional
-  attribute :arr_one,                  Types.Array(Types::String).optional
-  attribute :nullable,                 Types::String.optional
   attribute :one,                      Types::String
   attribute :top_level_optional,       Types::String.optional
+  attribute :nullable,                 Types::String.optional
+  attribute :arr_one,                  Types.Array(Types::String).optional
+  attribute :arr_nullable,             Types.Array(Types::String.optional).optional
   attribute :union_with_bool,          Types.Instance(UnionWithBool)
   attribute :union_with_bool_and_enum, Types.Instance(UnionWithBool)
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      arr_nullable:             d["arrNullable"],
-      arr_one:                  d["arrOne"],
-      nullable:                 d.fetch("nullable"),
       one:                      d.fetch("one"),
       top_level_optional:       d["optional"],
+      nullable:                 d.fetch("nullable"),
+      arr_one:                  d["arrOne"],
+      arr_nullable:             d["arrNullable"],
       union_with_bool:          UnionWithBool.from_dynamic!(d.fetch("unionWithBool")),
       union_with_bool_and_enum: UnionWithBool.from_dynamic!(d.fetch("unionWithBoolAndEnum")),
     )
@@ -80,11 +80,11 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "arrNullable"          => arr_nullable,
-      "arrOne"               => arr_one,
-      "nullable"             => nullable,
       "one"                  => one,
       "optional"             => top_level_optional,
+      "nullable"             => nullable,
+      "arrOne"               => arr_one,
+      "arrNullable"          => arr_nullable,
       "unionWithBool"        => union_with_bool.to_dynamic,
       "unionWithBoolAndEnum" => union_with_bool_and_enum.to_dynamic,
     }
diff --git a/base/schema-ruby/test/inputs/schema/boolean-subschema.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/boolean-subschema.schema/default/TopLevel.rb
index 963d05a..0cabc5f 100644
--- a/base/schema-ruby/test/inputs/schema/boolean-subschema.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/boolean-subschema.schema/default/TopLevel.rb
@@ -20,17 +20,17 @@ module Types
 end
 
 class TopLevel < Dry::Struct
+  attribute :foo,        Types::String
   attribute :disallowed, Types::Any.optional
   attribute :empty,      Types.Array(Types::Any)
-  attribute :foo,        Types::String
   attribute :impossible, Types::Any.optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
+      foo:        d.fetch("foo"),
       disallowed: d["disallowed"],
       empty:      d.fetch("empty"),
-      foo:        d.fetch("foo"),
       impossible: d["impossible"],
     )
   end
@@ -41,9 +41,9 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
+      "foo"        => foo,
       "disallowed" => disallowed,
       "empty"      => empty,
-      "foo"        => foo,
       "impossible" => impossible,
     }
   end
diff --git a/base/schema-ruby/test/inputs/schema/comment-injection.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/comment-injection.schema/default/TopLevel.rb
index deaff05..60cf6a5 100644
--- a/base/schema-ruby/test/inputs/schema/comment-injection.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/comment-injection.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.trailing_backslash
+#   puts top_level.value
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -33,15 +33,6 @@ end
 # }
 class TopLevel < Dry::Struct
 
-  # Ends with a backslash \
-  attribute :trailing_backslash, Types::String.optional
-
-  # Ends with a quote "
-  attribute :trailing_quote, Types::String.optional
-
-  # Ends with a triple quote """
-  attribute :trailing_triple_quote, Types::String.optional
-
   # Property delimiters:
   # */
   # /*
@@ -56,13 +47,22 @@ class TopLevel < Dry::Struct
   # }
   attribute :value, Types::String
 
+  # Ends with a backslash \
+  attribute :trailing_backslash, Types::String.optional
+
+  # Ends with a quote "
+  attribute :trailing_quote, Types::String.optional
+
+  # Ends with a triple quote """
+  attribute :trailing_triple_quote, Types::String.optional
+
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
+      value:                 d.fetch("value"),
       trailing_backslash:    d["trailingBackslash"],
       trailing_quote:        d["trailingQuote"],
       trailing_triple_quote: d["trailingTripleQuote"],
-      value:                 d.fetch("value"),
     )
   end
 
@@ -72,10 +72,10 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
+      "value"               => value,
       "trailingBackslash"   => trailing_backslash,
       "trailingQuote"       => trailing_quote,
       "trailingTripleQuote" => trailing_triple_quote,
-      "value"               => value,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/const-non-string.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/const-non-string.schema/default/TopLevel.rb
index a4744f1..19843ce 100644
--- a/base/schema-ruby/test/inputs/schema/const-non-string.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/const-non-string.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.amount.even?
+#   puts top_level.version
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -28,20 +28,20 @@ module Kind
 end
 
 class TopLevel < Dry::Struct
+  attribute :version, Types::Double
   attribute :amount,  Types::Integer
+  attribute :ratio,   Types::Double
   attribute :enabled, Types::Bool
   attribute :kind,    Types::Kind
-  attribute :ratio,   Types::Double
-  attribute :version, Types::Double
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
+      version: d.fetch("version"),
       amount:  d.fetch("amount"),
+      ratio:   d.fetch("ratio"),
       enabled: d.fetch("enabled"),
       kind:    d.fetch("kind"),
-      ratio:   d.fetch("ratio"),
-      version: d.fetch("version"),
     )
   end
 
@@ -51,11 +51,11 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
+      "version" => version,
       "amount"  => amount,
+      "ratio"   => ratio,
       "enabled" => enabled,
       "kind"    => kind,
-      "ratio"   => ratio,
-      "version" => version,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/date-time-or-string.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/date-time-or-string.schema/default/TopLevel.rb
index 966477b..2c892c8 100644
--- a/base/schema-ruby/test/inputs/schema/date-time-or-string.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/date-time-or-string.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.bar
+#   puts top_level.foo
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -20,14 +20,14 @@ module Types
 end
 
 class TopLevel < Dry::Struct
-  attribute :bar, Types::String
   attribute :foo, Types::String
+  attribute :bar, Types::String
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      bar: d.fetch("bar"),
       foo: d.fetch("foo"),
+      bar: d.fetch("bar"),
     )
   end
 
@@ -37,8 +37,8 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "bar" => bar,
       "foo" => foo,
+      "bar" => bar,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/date-time.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/date-time.schema/default/TopLevel.rb
index 6dfa5e2..f3b91fe 100644
--- a/base/schema-ruby/test/inputs/schema/date-time.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/date-time.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.union_array.first
+#   puts top_level.complex_union_array.first
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -52,20 +52,20 @@ class ComplexUnionArray < Dry::Struct
 end
 
 class TopLevel < Dry::Struct
-  attribute :complex_union_array, Types.Array(Types.Instance(ComplexUnionArray))
   attribute :date,                Types::String
-  attribute :date_time,           Types::String
   attribute :time,                Types::String
+  attribute :date_time,           Types::String
   attribute :union_array,         Types.Array(Types::String)
+  attribute :complex_union_array, Types.Array(Types.Instance(ComplexUnionArray))
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      complex_union_array: d.fetch("complex-union-array").map { |x| ComplexUnionArray.from_dynamic!(x) },
       date:                d.fetch("date"),
-      date_time:           d.fetch("date-time"),
       time:                d.fetch("time"),
+      date_time:           d.fetch("date-time"),
       union_array:         d.fetch("union-array"),
+      complex_union_array: d.fetch("complex-union-array").map { |x| ComplexUnionArray.from_dynamic!(x) },
     )
   end
 
@@ -75,11 +75,11 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "complex-union-array" => complex_union_array.map { |x| x.to_dynamic },
       "date"                => date,
-      "date-time"           => date_time,
       "time"                => time,
+      "date-time"           => date_time,
       "union-array"         => union_array,
+      "complex-union-array" => complex_union_array.map { |x| x.to_dynamic },
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/description.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/description.schema/default/TopLevel.rb
index 5a85461..d3e3377 100644
--- a/base/schema-ruby/test/inputs/schema/description.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/description.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.bar
+#   puts top_level.union
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -126,26 +126,27 @@ end
 # Its description has two lines.
 class TopLevel < Dry::Struct
 
-  # A pretty boolean
-  attribute :bar, Types::Bool.optional
+  # Either a number or a string
+  attribute :union, Types.Instance(Union)
 
   # An enumeration
   attribute :top_level_enum, Types::Enum
 
-  attribute :foo,              Types::Double.optional
-  attribute :object_or_string, Types.Instance(ObjectOrStringUnion)
+  attribute :foo, Types::Double.optional
 
-  # Either a number or a string
-  attribute :union, Types.Instance(Union)
+  # A pretty boolean
+  attribute :bar, Types::Bool.optional
+
+  attribute :object_or_string, Types.Instance(ObjectOrStringUnion)
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      bar:              d["bar"],
+      union:            Union.from_dynamic!(d.fetch("union")),
       top_level_enum:   d.fetch("enum"),
       foo:              d["foo"],
+      bar:              d["bar"],
       object_or_string: ObjectOrStringUnion.from_dynamic!(d.fetch("object-or-string")),
-      union:            Union.from_dynamic!(d.fetch("union")),
     )
   end
 
@@ -155,11 +156,11 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "bar"              => bar,
+      "union"            => union.to_dynamic,
       "enum"             => top_level_enum,
       "foo"              => foo,
+      "bar"              => bar,
       "object-or-string" => object_or_string.to_dynamic,
-      "union"            => union.to_dynamic,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/direct-union.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/direct-union.schema/default/TopLevel.rb
index af86a0d..b8c2c57 100644
--- a/base/schema-ruby/test/inputs/schema/direct-union.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/direct-union.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.stuff["…"].thing_optional
+#   puts top_level.stuff["…"].required
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -89,14 +89,14 @@ class Anything < Dry::Struct
 end
 
 class Thing < Dry::Struct
-  attribute :thing_optional, Types.Instance(Anything).optional
   attribute :required,       Types.Instance(Anything)
+  attribute :thing_optional, Types.Instance(Anything).optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      thing_optional: d["optional"] ? Anything.from_dynamic!(d["optional"]) : nil,
       required:       Anything.from_dynamic!(d.fetch("required")),
+      thing_optional: d["optional"] ? Anything.from_dynamic!(d["optional"]) : nil,
     )
   end
 
@@ -106,8 +106,8 @@ class Thing < Dry::Struct
 
   def to_dynamic
     {
-      "optional" => thing_optional&.to_dynamic,
       "required" => required.to_dynamic,
+      "optional" => thing_optional&.to_dynamic,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/enum.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/enum.schema/default/TopLevel.rb
index 852b1d4..0be7f0f 100644
--- a/base/schema-ruby/test/inputs/schema/enum.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/enum.schema/default/TopLevel.rb
@@ -73,20 +73,20 @@ module Lvc
 end
 
 class TopLevel < Dry::Struct
-  attribute :arr,           Types.Array(Types.Instance(Arr)).optional
-  attribute :top_level_for, Types::String.optional
-  attribute :gve,           Types::Gve
   attribute :lvc,           Types::Lvc.optional
+  attribute :gve,           Types::Gve
+  attribute :arr,           Types.Array(Types.Instance(Arr)).optional
   attribute :other_arr,     Types.Array(Types::OtherArr).optional
+  attribute :top_level_for, Types::String.optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      arr:           d["arr"]&.map { |x| Arr.from_dynamic!(x) },
-      top_level_for: d["for"],
-      gve:           d.fetch("gve"),
       lvc:           d["lvc"],
+      gve:           d.fetch("gve"),
+      arr:           d["arr"]&.map { |x| Arr.from_dynamic!(x) },
       other_arr:     d["otherArr"],
+      top_level_for: d["for"],
     )
   end
 
@@ -96,11 +96,11 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "arr"      => arr&.map { |x| x.to_dynamic },
-      "for"      => top_level_for,
-      "gve"      => gve,
       "lvc"      => lvc,
+      "gve"      => gve,
+      "arr"      => arr&.map { |x| x.to_dynamic },
       "otherArr" => other_arr,
+      "for"      => top_level_for,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/integer-string.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/integer-string.schema/default/TopLevel.rb
index 0181809..4e835b5 100644
--- a/base/schema-ruby/test/inputs/schema/integer-string.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/integer-string.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.arr_one&.first
+#   puts top_level.arr_nullable&.first.nil?
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -53,22 +53,22 @@ class UnionWithInt < Dry::Struct
 end
 
 class TopLevel < Dry::Struct
-  attribute :arr_nullable,            Types.Array(Types::String.optional).optional
-  attribute :arr_one,                 Types.Array(Types::String).optional
-  attribute :nullable,                Types::String.optional
   attribute :one,                     Types::String
   attribute :top_level_optional,      Types::String.optional
+  attribute :nullable,                Types::String.optional
+  attribute :arr_one,                 Types.Array(Types::String).optional
+  attribute :arr_nullable,            Types.Array(Types::String.optional).optional
   attribute :union_with_int,          Types.Instance(UnionWithInt)
   attribute :union_with_int_and_enum, Types.Instance(UnionWithInt)
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      arr_nullable:            d["arrNullable"],
-      arr_one:                 d["arrOne"],
-      nullable:                d.fetch("nullable"),
       one:                     d.fetch("one"),
       top_level_optional:      d["optional"],
+      nullable:                d.fetch("nullable"),
+      arr_one:                 d["arrOne"],
+      arr_nullable:            d["arrNullable"],
       union_with_int:          UnionWithInt.from_dynamic!(d.fetch("unionWithInt")),
       union_with_int_and_enum: UnionWithInt.from_dynamic!(d.fetch("unionWithIntAndEnum")),
     )
@@ -80,11 +80,11 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "arrNullable"         => arr_nullable,
-      "arrOne"              => arr_one,
-      "nullable"            => nullable,
       "one"                 => one,
       "optional"            => top_level_optional,
+      "nullable"            => nullable,
+      "arrOne"              => arr_one,
+      "arrNullable"         => arr_nullable,
       "unionWithInt"        => union_with_int.to_dynamic,
       "unionWithIntAndEnum" => union_with_int_and_enum.to_dynamic,
     }
diff --git a/base/schema-ruby/test/inputs/schema/integer-type.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/integer-type.schema/default/TopLevel.rb
index 9bee068..7667cc9 100644
--- a/base/schema-ruby/test/inputs/schema/integer-type.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/integer-type.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.above_i32_max.even?
+#   puts top_level.small_positive.even?
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -20,28 +20,28 @@ module Types
 end
 
 class TopLevel < Dry::Struct
+  attribute :small_positive, Types::Integer
+  attribute :small_negative, Types::Integer
+  attribute :i32_range,      Types::Integer
   attribute :above_i32_max,  Types::Integer
   attribute :below_i32_min,  Types::Integer
-  attribute :i32_range,      Types::Integer
-  attribute :large_bounds,   Types::Integer
-  attribute :only_maximum,   Types::Integer
   attribute :only_minimum,   Types::Integer
-  attribute :small_negative, Types::Integer
-  attribute :small_positive, Types::Integer
+  attribute :only_maximum,   Types::Integer
   attribute :unbounded,      Types::Integer
+  attribute :large_bounds,   Types::Integer
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
+      small_positive: d.fetch("small_positive"),
+      small_negative: d.fetch("small_negative"),
+      i32_range:      d.fetch("i32_range"),
       above_i32_max:  d.fetch("above_i32_max"),
       below_i32_min:  d.fetch("below_i32_min"),
-      i32_range:      d.fetch("i32_range"),
-      large_bounds:   d.fetch("large_bounds"),
-      only_maximum:   d.fetch("only_maximum"),
       only_minimum:   d.fetch("only_minimum"),
-      small_negative: d.fetch("small_negative"),
-      small_positive: d.fetch("small_positive"),
+      only_maximum:   d.fetch("only_maximum"),
       unbounded:      d.fetch("unbounded"),
+      large_bounds:   d.fetch("large_bounds"),
     )
   end
 
@@ -51,15 +51,15 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
+      "small_positive" => small_positive,
+      "small_negative" => small_negative,
+      "i32_range"      => i32_range,
       "above_i32_max"  => above_i32_max,
       "below_i32_min"  => below_i32_min,
-      "i32_range"      => i32_range,
-      "large_bounds"   => large_bounds,
-      "only_maximum"   => only_maximum,
       "only_minimum"   => only_minimum,
-      "small_negative" => small_negative,
-      "small_positive" => small_positive,
+      "only_maximum"   => only_maximum,
       "unbounded"      => unbounded,
+      "large_bounds"   => large_bounds,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/keyword-unions.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/keyword-unions.schema/default/TopLevel.rb
index cef692c..5b4b3b2 100644
--- a/base/schema-ruby/test/inputs/schema/keyword-unions.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/keyword-unions.schema/default/TopLevel.rb
@@ -15828,7 +15828,6 @@ class TopLevel < Dry::Struct
   attribute :did_set,                    Types.Instance(UnionDidSet).optional
   attribute :top_level_do,               Types.Instance(UnionDo).optional
   attribute :double,                     Types.Instance(UnionDouble).optional
-  attribute :dummy,                      Types::Double.optional
   attribute :dynamic,                    Types.Instance(UnionDynamic).optional
   attribute :dynamic_cast,               Types.Instance(UnionDynamicCast).optional
   attribute :elif,                       Types.Instance(UnionElif).optional
@@ -15881,8 +15880,8 @@ class TopLevel < Dry::Struct
   attribute :int,                        Types.Instance(UnionInt).optional
   attribute :interface,                  Types.Instance(UnionInterface).optional
   attribute :internal,                   Types.Instance(UnionInternal).optional
-  attribute :is,                         Types.Instance(UnionIs).optional
   attribute :iterable,                   Types.Instance(UnionIterable).optional
+  attribute :is,                         Types.Instance(UnionIs).optional
   attribute :jdec,                       Types.Instance(UnionJdec).optional
   attribute :jenc,                       Types.Instance(UnionJenc).optional
   attribute :jpipe,                      Types.Instance(UnionJpipe).optional
@@ -16029,6 +16028,7 @@ class TopLevel < Dry::Struct
   attribute :xor_eq,                     Types.Instance(UnionXorEq).optional
   attribute :yes,                        Types.Instance(UnionYES).optional
   attribute :top_level_yield,            Types.Instance(UnionYield).optional
+  attribute :dummy,                      Types::Double.optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
@@ -16109,7 +16109,6 @@ class TopLevel < Dry::Struct
       did_set:                    d["didSet"] ? UnionDidSet.from_dynamic!(d["didSet"]) : nil,
       top_level_do:               d["do"] ? UnionDo.from_dynamic!(d["do"]) : nil,
       double:                     d["double"] ? UnionDouble.from_dynamic!(d["double"]) : nil,
-      dummy:                      d["dummy"],
       dynamic:                    d["dynamic"] ? UnionDynamic.from_dynamic!(d["dynamic"]) : nil,
       dynamic_cast:               d["dynamic_cast"] ? UnionDynamicCast.from_dynamic!(d["dynamic_cast"]) : nil,
       elif:                       d["elif"] ? UnionElif.from_dynamic!(d["elif"]) : nil,
@@ -16162,8 +16161,8 @@ class TopLevel < Dry::Struct
       int:                        d["int"] ? UnionInt.from_dynamic!(d["int"]) : nil,
       interface:                  d["interface"] ? UnionInterface.from_dynamic!(d["interface"]) : nil,
       internal:                   d["internal"] ? UnionInternal.from_dynamic!(d["internal"]) : nil,
-      is:                         d["is"] ? UnionIs.from_dynamic!(d["is"]) : nil,
       iterable:                   d["iterable"] ? UnionIterable.from_dynamic!(d["iterable"]) : nil,
+      is:                         d["is"] ? UnionIs.from_dynamic!(d["is"]) : nil,
       jdec:                       d["jdec"] ? UnionJdec.from_dynamic!(d["jdec"]) : nil,
       jenc:                       d["jenc"] ? UnionJenc.from_dynamic!(d["jenc"]) : nil,
       jpipe:                      d["jpipe"] ? UnionJpipe.from_dynamic!(d["jpipe"]) : nil,
@@ -16310,6 +16309,7 @@ class TopLevel < Dry::Struct
       xor_eq:                     d["xor_eq"] ? UnionXorEq.from_dynamic!(d["xor_eq"]) : nil,
       yes:                        d["YES"] ? UnionYES.from_dynamic!(d["YES"]) : nil,
       top_level_yield:            d["yield"] ? UnionYield.from_dynamic!(d["yield"]) : nil,
+      dummy:                      d["dummy"],
     )
   end
 
@@ -16395,7 +16395,6 @@ class TopLevel < Dry::Struct
       "didSet"                     => did_set&.to_dynamic,
       "do"                         => top_level_do&.to_dynamic,
       "double"                     => double&.to_dynamic,
-      "dummy"                      => dummy,
       "dynamic"                    => dynamic&.to_dynamic,
       "dynamic_cast"               => dynamic_cast&.to_dynamic,
       "elif"                       => elif&.to_dynamic,
@@ -16448,8 +16447,8 @@ class TopLevel < Dry::Struct
       "int"                        => int&.to_dynamic,
       "interface"                  => interface&.to_dynamic,
       "internal"                   => internal&.to_dynamic,
-      "is"                         => is&.to_dynamic,
       "iterable"                   => iterable&.to_dynamic,
+      "is"                         => is&.to_dynamic,
       "jdec"                       => jdec&.to_dynamic,
       "jenc"                       => jenc&.to_dynamic,
       "jpipe"                      => jpipe&.to_dynamic,
@@ -16596,6 +16595,7 @@ class TopLevel < Dry::Struct
       "xor_eq"                     => xor_eq&.to_dynamic,
       "YES"                        => yes&.to_dynamic,
       "yield"                      => top_level_yield&.to_dynamic,
+      "dummy"                      => dummy,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/light.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/light.schema/default/TopLevel.rb
index b858a08..66c386c 100644
--- a/base/schema-ruby/test/inputs/schema/light.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/light.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.light_params.app_id
+#   puts top_level.light_params.outlet_id
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -20,15 +20,15 @@ module Types
 end
 
 class LightParams < Dry::Struct
-  attribute :app_id,    Types::String
   attribute :outlet_id, Types::String
+  attribute :app_id,    Types::String
   attribute :rgba,      Types::String
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      app_id:    d.fetch("app_id"),
       outlet_id: d.fetch("outlet_id"),
+      app_id:    d.fetch("app_id"),
       rgba:      d.fetch("rgba"),
     )
   end
@@ -39,8 +39,8 @@ class LightParams < Dry::Struct
 
   def to_dynamic
     {
-      "app_id"    => app_id,
       "outlet_id" => outlet_id,
+      "app_id"    => app_id,
       "rgba"      => rgba,
     }
   end
diff --git a/base/schema-ruby/test/inputs/schema/min-max-items.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/min-max-items.schema/default/TopLevel.rb
index aa14d11..c096f35 100644
--- a/base/schema-ruby/test/inputs/schema/min-max-items.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/min-max-items.schema/default/TopLevel.rb
@@ -53,18 +53,18 @@ class UnionItem < Dry::Struct
 end
 
 class TopLevel < Dry::Struct
+  attribute :min_only,    Types.Array(Types::String)
   attribute :max_only,    Types.Array(Types::Integer)
   attribute :min_and_max, Types.Array(Types::Double)
-  attribute :min_only,    Types.Array(Types::String)
   attribute :plain,       Types.Array(Types::String)
   attribute :union_items, Types.Array(Types.Instance(UnionItem))
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
+      min_only:    d.fetch("minOnly"),
       max_only:    d.fetch("maxOnly"),
       min_and_max: d.fetch("minAndMax"),
-      min_only:    d.fetch("minOnly"),
       plain:       d.fetch("plain"),
       union_items: d.fetch("unionItems").map { |x| UnionItem.from_dynamic!(x) },
     )
@@ -76,9 +76,9 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
+      "minOnly"    => min_only,
       "maxOnly"    => max_only,
       "minAndMax"  => min_and_max,
-      "minOnly"    => min_only,
       "plain"      => plain,
       "unionItems" => union_items.map { |x| x.to_dynamic },
     }
diff --git a/base/schema-ruby/test/inputs/schema/minmax-integer.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/minmax-integer.schema/default/TopLevel.rb
index 495fef0..c844fc7 100644
--- a/base/schema-ruby/test/inputs/schema/minmax-integer.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/minmax-integer.schema/default/TopLevel.rb
@@ -21,25 +21,25 @@ end
 
 class TopLevel < Dry::Struct
   attribute :free,                 Types::Integer
-  attribute :intersection,         Types::Integer
-  attribute :max,                  Types::Integer
   attribute :min,                  Types::Integer
+  attribute :max,                  Types::Integer
   attribute :minmax,               Types::Integer
-  attribute :min_max_intersection, Types::Integer
-  attribute :min_max_union,        Types::Integer
   attribute :union,                Types::Integer
+  attribute :min_max_union,        Types::Integer
+  attribute :intersection,         Types::Integer
+  attribute :min_max_intersection, Types::Integer
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
       free:                 d.fetch("free"),
-      intersection:         d.fetch("intersection"),
-      max:                  d.fetch("max"),
       min:                  d.fetch("min"),
+      max:                  d.fetch("max"),
       minmax:               d.fetch("minmax"),
-      min_max_intersection: d.fetch("minMaxIntersection"),
-      min_max_union:        d.fetch("minMaxUnion"),
       union:                d.fetch("union"),
+      min_max_union:        d.fetch("minMaxUnion"),
+      intersection:         d.fetch("intersection"),
+      min_max_intersection: d.fetch("minMaxIntersection"),
     )
   end
 
@@ -50,13 +50,13 @@ class TopLevel < Dry::Struct
   def to_dynamic
     {
       "free"               => free,
-      "intersection"       => intersection,
-      "max"                => max,
       "min"                => min,
+      "max"                => max,
       "minmax"             => minmax,
-      "minMaxIntersection" => min_max_intersection,
-      "minMaxUnion"        => min_max_union,
       "union"              => union,
+      "minMaxUnion"        => min_max_union,
+      "intersection"       => intersection,
+      "minMaxIntersection" => min_max_intersection,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/minmax.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/minmax.schema/default/TopLevel.rb
index 9b60d37..1f09155 100644
--- a/base/schema-ruby/test/inputs/schema/minmax.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/minmax.schema/default/TopLevel.rb
@@ -21,25 +21,25 @@ end
 
 class TopLevel < Dry::Struct
   attribute :free,                 Types::Double
-  attribute :intersection,         Types::Double
-  attribute :max,                  Types::Double
   attribute :min,                  Types::Double
+  attribute :max,                  Types::Double
   attribute :minmax,               Types::Double
-  attribute :min_max_intersection, Types::Double
-  attribute :min_max_union,        Types::Double
   attribute :union,                Types::Double
+  attribute :min_max_union,        Types::Double
+  attribute :intersection,         Types::Double
+  attribute :min_max_intersection, Types::Double
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
       free:                 d.fetch("free"),
-      intersection:         d.fetch("intersection"),
-      max:                  d.fetch("max"),
       min:                  d.fetch("min"),
+      max:                  d.fetch("max"),
       minmax:               d.fetch("minmax"),
-      min_max_intersection: d.fetch("minMaxIntersection"),
-      min_max_union:        d.fetch("minMaxUnion"),
       union:                d.fetch("union"),
+      min_max_union:        d.fetch("minMaxUnion"),
+      intersection:         d.fetch("intersection"),
+      min_max_intersection: d.fetch("minMaxIntersection"),
     )
   end
 
@@ -50,13 +50,13 @@ class TopLevel < Dry::Struct
   def to_dynamic
     {
       "free"               => free,
-      "intersection"       => intersection,
-      "max"                => max,
       "min"                => min,
+      "max"                => max,
       "minmax"             => minmax,
-      "minMaxIntersection" => min_max_intersection,
-      "minMaxUnion"        => min_max_union,
       "union"              => union,
+      "minMaxUnion"        => min_max_union,
+      "intersection"       => intersection,
+      "minMaxIntersection" => min_max_intersection,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/minmaxlength.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/minmaxlength.schema/default/TopLevel.rb
index ca138e4..7e77cf1 100644
--- a/base/schema-ruby/test/inputs/schema/minmaxlength.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/minmaxlength.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.intersection
+#   puts top_level.minlength
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -52,26 +52,26 @@ class InUnion < Dry::Struct
 end
 
 class TopLevel < Dry::Struct
-  attribute :intersection,         Types::String
-  attribute :in_union,             Types.Instance(InUnion)
-  attribute :maxlength,            Types::String
   attribute :minlength,            Types::String
-  attribute :min_max_intersection, Types::String
+  attribute :maxlength,            Types::String
   attribute :minmaxlength,         Types::String
-  attribute :min_max_union,        Types::String
   attribute :union,                Types::String
+  attribute :in_union,             Types.Instance(InUnion)
+  attribute :min_max_union,        Types::String
+  attribute :intersection,         Types::String
+  attribute :min_max_intersection, Types::String
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      intersection:         d.fetch("intersection"),
-      in_union:             InUnion.from_dynamic!(d.fetch("inUnion")),
-      maxlength:            d.fetch("maxlength"),
       minlength:            d.fetch("minlength"),
-      min_max_intersection: d.fetch("minMaxIntersection"),
+      maxlength:            d.fetch("maxlength"),
       minmaxlength:         d.fetch("minmaxlength"),
-      min_max_union:        d.fetch("minMaxUnion"),
       union:                d.fetch("union"),
+      in_union:             InUnion.from_dynamic!(d.fetch("inUnion")),
+      min_max_union:        d.fetch("minMaxUnion"),
+      intersection:         d.fetch("intersection"),
+      min_max_intersection: d.fetch("minMaxIntersection"),
     )
   end
 
@@ -81,14 +81,14 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "intersection"       => intersection,
-      "inUnion"            => in_union.to_dynamic,
-      "maxlength"          => maxlength,
       "minlength"          => minlength,
-      "minMaxIntersection" => min_max_intersection,
+      "maxlength"          => maxlength,
       "minmaxlength"       => minmaxlength,
-      "minMaxUnion"        => min_max_union,
       "union"              => union,
+      "inUnion"            => in_union.to_dynamic,
+      "minMaxUnion"        => min_max_union,
+      "intersection"       => intersection,
+      "minMaxIntersection" => min_max_intersection,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/non-standard-ref.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/non-standard-ref.schema/default/TopLevel.rb
index e07dc82..7195918 100644
--- a/base/schema-ruby/test/inputs/schema/non-standard-ref.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/non-standard-ref.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.bar.even?
+#   puts top_level.foo.even?
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -21,15 +21,15 @@ module Types
 end
 
 class TopLevel < Dry::Struct
-  attribute :bar,  Types::Integer
   attribute :foo,  Types::Integer
+  attribute :bar,  Types::Integer
   attribute :quux, Types::Bool
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      bar:  d.fetch("bar"),
       foo:  d.fetch("foo"),
+      bar:  d.fetch("bar"),
       quux: d.fetch("quux"),
     )
   end
@@ -40,8 +40,8 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "bar"  => bar,
       "foo"  => foo,
+      "bar"  => bar,
       "quux" => quux,
     }
   end
diff --git a/base/schema-ruby/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.rb
index 65c4ebc..56ca38c 100644
--- a/base/schema-ruby/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.b.nil?
+#   puts top_level.kind == Kind::One
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -27,14 +27,14 @@ module Kind
 end
 
 class TopLevel < Dry::Struct
-  attribute :b,    Types::String.optional.optional
   attribute :kind, Types::Kind
+  attribute :b,    Types::String.optional.optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      b:    d["b"],
       kind: d.fetch("kind"),
+      b:    d["b"],
     )
   end
 
@@ -44,8 +44,8 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "b"    => b,
       "kind" => kind,
+      "b"    => b,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/optional-any.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/optional-any.schema/default/TopLevel.rb
index 22cf69b..24f273a 100644
--- a/base/schema-ruby/test/inputs/schema/optional-any.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/optional-any.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.bar
+#   puts top_level.foo
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -20,14 +20,14 @@ module Types
 end
 
 class TopLevel < Dry::Struct
-  attribute :bar, Types::Bool
   attribute :foo, Types::Any.optional
+  attribute :bar, Types::Bool
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      bar: d.fetch("bar"),
       foo: d["foo"],
+      bar: d.fetch("bar"),
     )
   end
 
@@ -37,8 +37,8 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "bar" => bar,
       "foo" => foo,
+      "bar" => bar,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/optional-const-ref.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/optional-const-ref.schema/default/TopLevel.rb
index ee15103..58214df 100644
--- a/base/schema-ruby/test/inputs/schema/optional-const-ref.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/optional-const-ref.schema/default/TopLevel.rb
@@ -51,23 +51,23 @@ end
 
 class TopLevel < Dry::Struct
   attribute :coordinates,          Types.Array(Coordinate).optional
-  attribute :count,                Types::Integer.optional
-  attribute :label,                Types::String.optional
   attribute :required_coordinates, Types.Array(Coordinate)
+  attribute :count,                Types::Integer.optional
   attribute :required_count,       Types::Integer
-  attribute :required_label,       Types::String
   attribute :weight,               Types::Double.optional
+  attribute :label,                Types::String.optional
+  attribute :required_label,       Types::String
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
       coordinates:          d["coordinates"]&.map { |x| Coordinate.from_dynamic!(x) },
-      count:                d["count"],
-      label:                d["label"],
       required_coordinates: d.fetch("requiredCoordinates").map { |x| Coordinate.from_dynamic!(x) },
+      count:                d["count"],
       required_count:       d.fetch("requiredCount"),
-      required_label:       d.fetch("requiredLabel"),
       weight:               d["weight"],
+      label:                d["label"],
+      required_label:       d.fetch("requiredLabel"),
     )
   end
 
@@ -78,12 +78,12 @@ class TopLevel < Dry::Struct
   def to_dynamic
     {
       "coordinates"         => coordinates&.map { |x| x.to_dynamic },
-      "count"               => count,
-      "label"               => label,
       "requiredCoordinates" => required_coordinates.map { |x| x.to_dynamic },
+      "count"               => count,
       "requiredCount"       => required_count,
-      "requiredLabel"       => required_label,
       "weight"              => weight,
+      "label"               => label,
+      "requiredLabel"       => required_label,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/optional-constraints.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/optional-constraints.schema/default/TopLevel.rb
index 4debbb4..fc3ab3c 100644
--- a/base/schema-ruby/test/inputs/schema/optional-constraints.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/optional-constraints.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.opt_double
+#   puts top_level.req_zero_min.even?
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -22,20 +22,20 @@ module Types
 end
 
 class TopLevel < Dry::Struct
-  attribute :opt_double,   Types::Double.optional
+  attribute :req_zero_min, Types::Integer
   attribute :opt_int,      Types::Integer.optional
-  attribute :opt_pattern,  Types::String.optional
+  attribute :opt_double,   Types::Double.optional
   attribute :opt_string,   Types::String.optional
-  attribute :req_zero_min, Types::Integer
+  attribute :opt_pattern,  Types::String.optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      opt_double:   d["optDouble"],
+      req_zero_min: d.fetch("reqZeroMin"),
       opt_int:      d["optInt"],
-      opt_pattern:  d["optPattern"],
+      opt_double:   d["optDouble"],
       opt_string:   d["optString"],
-      req_zero_min: d.fetch("reqZeroMin"),
+      opt_pattern:  d["optPattern"],
     )
   end
 
@@ -45,11 +45,11 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "optDouble"  => opt_double,
+      "reqZeroMin" => req_zero_min,
       "optInt"     => opt_int,
-      "optPattern" => opt_pattern,
+      "optDouble"  => opt_double,
       "optString"  => opt_string,
-      "reqZeroMin" => req_zero_min,
+      "optPattern" => opt_pattern,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/optional-date-time.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/optional-date-time.schema/default/TopLevel.rb
index 33aafca..ba9a16e 100644
--- a/base/schema-ruby/test/inputs/schema/optional-date-time.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/optional-date-time.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.optional_date
+#   puts top_level.required_date
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -20,22 +20,22 @@ module Types
 end
 
 class TopLevel < Dry::Struct
-  attribute :optional_date,      Types::String.optional
-  attribute :optional_date_time, Types::String.optional
-  attribute :optional_time,      Types::String.optional
   attribute :required_date,      Types::String
-  attribute :required_date_time, Types::String
   attribute :required_time,      Types::String
+  attribute :required_date_time, Types::String
+  attribute :optional_date,      Types::String.optional
+  attribute :optional_time,      Types::String.optional
+  attribute :optional_date_time, Types::String.optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      optional_date:      d["optional-date"],
-      optional_date_time: d["optional-date-time"],
-      optional_time:      d["optional-time"],
       required_date:      d.fetch("required-date"),
-      required_date_time: d.fetch("required-date-time"),
       required_time:      d.fetch("required-time"),
+      required_date_time: d.fetch("required-date-time"),
+      optional_date:      d["optional-date"],
+      optional_time:      d["optional-time"],
+      optional_date_time: d["optional-date-time"],
     )
   end
 
@@ -45,12 +45,12 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "optional-date"      => optional_date,
-      "optional-date-time" => optional_date_time,
-      "optional-time"      => optional_time,
       "required-date"      => required_date,
-      "required-date-time" => required_date_time,
       "required-time"      => required_time,
+      "required-date-time" => required_date_time,
+      "optional-date"      => optional_date,
+      "optional-time"      => optional_time,
+      "optional-date-time" => optional_date_time,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/prefix-items.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/prefix-items.schema/default/TopLevel.rb
index e7032c4..09d9d2e 100644
--- a/base/schema-ruby/test/inputs/schema/prefix-items.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/prefix-items.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.tuple.first
+#   puts top_level.top_level_open.first
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -52,14 +52,14 @@ class Open < Dry::Struct
 end
 
 class TopLevel < Dry::Struct
-  attribute :top_level_open, Types.Array(Types.Instance(Open))
   attribute :tuple,          Types.Array(Types.Instance(Open))
+  attribute :top_level_open, Types.Array(Types.Instance(Open))
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      top_level_open: d.fetch("open").map { |x| Open.from_dynamic!(x) },
       tuple:          d.fetch("tuple").map { |x| Open.from_dynamic!(x) },
+      top_level_open: d.fetch("open").map { |x| Open.from_dynamic!(x) },
     )
   end
 
@@ -69,8 +69,8 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "open"  => top_level_open.map { |x| x.to_dynamic },
       "tuple" => tuple.map { |x| x.to_dynamic },
+      "open"  => top_level_open.map { |x| x.to_dynamic },
     }
   end
 
diff --git a/head/schema-ruby/test/inputs/schema/property-order.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/property-order.schema/default/TopLevel.rb
new file mode 100644
index 0000000..5d43642
--- /dev/null
+++ b/head/schema-ruby/test/inputs/schema/property-order.schema/default/TopLevel.rb
@@ -0,0 +1,94 @@
+# This code may look unusually verbose for Ruby (and it is), but
+# it performs some subtle and complex validation of JSON data.
+#
+# To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
+#
+#   top_level = TopLevel.from_json! "{…}"
+#   puts top_level.ordered.mango
+#
+# If from_json! succeeds, the value returned matches the schema.
+
+require 'json'
+require 'dry-types'
+require 'dry-struct'
+
+module Types
+  include Dry.Types(default: :nominal)
+
+  Integer = Strict::Integer
+  Bool    = Strict::Bool
+  Hash    = Strict::Hash
+  String  = Strict::String
+  Double  = Strict::Float | Strict::Integer
+end
+
+class Ordered < Dry::Struct
+  attribute :mango, Types::Double
+  attribute :zebra, Types::String
+  attribute :apple, Types::Bool
+
+  def self.from_dynamic!(d)
+    d = Types::Hash[d]
+    new(
+      mango: d.fetch("mango"),
+      zebra: d.fetch("zebra"),
+      apple: d.fetch("apple"),
+    )
+  end
+
+  def self.from_json!(json)
+    from_dynamic!(JSON.parse(json))
+  end
+
+  def to_dynamic
+    {
+      "mango" => mango,
+      "zebra" => zebra,
+      "apple" => apple,
+    }
+  end
+
+  def to_json(options = nil)
+    JSON.generate(to_dynamic, options)
+  end
+end
+
+class TopLevel < Dry::Struct
+  attribute :zebra,   Types::String
+  attribute :mango,   Types::Double
+  attribute :apple,   Types::Bool
+  attribute :delta,   Types::String
+  attribute :banana,  Types::Integer
+  attribute :ordered, Ordered
+
+  def self.from_dynamic!(d)
+    d = Types::Hash[d]
+    new(
+      zebra:   d.fetch("zebra"),
+      mango:   d.fetch("mango"),
+      apple:   d.fetch("apple"),
+      delta:   d.fetch("delta"),
+      banana:  d.fetch("banana"),
+      ordered: Ordered.from_dynamic!(d.fetch("ordered")),
+    )
+  end
+
+  def self.from_json!(json)
+    from_dynamic!(JSON.parse(json))
+  end
+
+  def to_dynamic
+    {
+      "zebra"   => zebra,
+      "mango"   => mango,
+      "apple"   => apple,
+      "delta"   => delta,
+      "banana"  => banana,
+      "ordered" => ordered.to_dynamic,
+    }
+  end
+
+  def to_json(options = nil)
+    JSON.generate(to_dynamic, options)
+  end
+end
diff --git a/base/schema-ruby/test/inputs/schema/renaming-bug.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/renaming-bug.schema/default/TopLevel.rb
index e557b88..11ca1ab 100644
--- a/base/schema-ruby/test/inputs/schema/renaming-bug.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/renaming-bug.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.vehicles&.first.vehicle_type&.vehicle_type_name == Name::Truck
+#   puts top_level.vehicles&.first.speed&.velocity&.minimum
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -74,16 +74,16 @@ class CircularShape < Dry::Struct
 end
 
 class Part < Dry::Struct
-  attribute :depth,  Types::String.optional
   attribute :length, Types::String.optional
   attribute :width,  Types::String.optional
+  attribute :depth,  Types::String.optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      depth:  d["depth"],
       length: d["length"],
       width:  d["width"],
+      depth:  d["depth"],
     )
   end
 
@@ -93,9 +93,9 @@ class Part < Dry::Struct
 
   def to_dynamic
     {
-      "depth"  => depth,
       "length" => length,
       "width"  => width,
+      "depth"  => depth,
     }
   end
 
@@ -183,14 +183,14 @@ class History < Dry::Struct
 end
 
 class Shape < Dry::Struct
-  attribute :geometry, Geometry.optional
   attribute :history,  History.optional
+  attribute :geometry, Geometry.optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      geometry: d["geometry"] ? Geometry.from_dynamic!(d["geometry"]) : nil,
       history:  d["history"] ? History.from_dynamic!(d["history"]) : nil,
+      geometry: d["geometry"] ? Geometry.from_dynamic!(d["geometry"]) : nil,
     )
   end
 
@@ -200,8 +200,8 @@ class Shape < Dry::Struct
 
   def to_dynamic
     {
-      "geometry" => geometry&.to_dynamic,
       "history"  => history&.to_dynamic,
+      "geometry" => geometry&.to_dynamic,
     }
   end
 
@@ -211,15 +211,15 @@ class Shape < Dry::Struct
 end
 
 class Berry < Dry::Struct
-  attribute :color,      Color.optional
   attribute :berry_name, Types::String.optional
+  attribute :color,      Color.optional
   attribute :shapes,     Types.Array(Shape).optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      color:      d["color"] ? Color.from_dynamic!(d["color"]) : nil,
       berry_name: d["name"],
+      color:      d["color"] ? Color.from_dynamic!(d["color"]) : nil,
       shapes:     d["shapes"]&.map { |x| Shape.from_dynamic!(x) },
     )
   end
@@ -230,8 +230,8 @@ class Berry < Dry::Struct
 
   def to_dynamic
     {
-      "color"  => color&.to_dynamic,
       "name"   => berry_name,
+      "color"  => color&.to_dynamic,
       "shapes" => shapes&.map { |x| x.to_dynamic },
     }
   end
@@ -243,15 +243,15 @@ end
 
 class Fruit < Dry::Struct
   attribute :apple,   Types::Bool.optional
-  attribute :berries, Types.Array(Berry).optional
   attribute :orange,  Types::Bool.optional
+  attribute :berries, Types.Array(Berry).optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
       apple:   d["apple"],
-      berries: d["berries"]&.map { |x| Berry.from_dynamic!(x) },
       orange:  d["orange"],
+      berries: d["berries"]&.map { |x| Berry.from_dynamic!(x) },
     )
   end
 
@@ -262,8 +262,8 @@ class Fruit < Dry::Struct
   def to_dynamic
     {
       "apple"   => apple,
-      "berries" => berries&.map { |x| x.to_dynamic },
       "orange"  => orange,
+      "berries" => berries&.map { |x| x.to_dynamic },
     }
   end
 
@@ -273,14 +273,14 @@ class Fruit < Dry::Struct
 end
 
 class Limit < Dry::Struct
-  attribute :maximum, Types::Double.optional
   attribute :minimum, Types::Double.optional
+  attribute :maximum, Types::Double.optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      maximum: d["maximum"],
       minimum: d["minimum"],
+      maximum: d["maximum"],
     )
   end
 
@@ -290,8 +290,8 @@ class Limit < Dry::Struct
 
   def to_dynamic
     {
-      "maximum" => maximum,
       "minimum" => minimum,
+      "maximum" => maximum,
     }
   end
 
@@ -378,22 +378,22 @@ class VehicleType < Dry::Struct
 end
 
 class Vehicle < Dry::Struct
-  attribute :brand,        Types::String.optional
   attribute :id,           Types::String.optional
-  attribute :speed,        Speed.optional
-  attribute :sub_module,   Types::Bool.optional
   attribute :vehicle_type, VehicleType.optional
+  attribute :speed,        Speed.optional
   attribute :year,         Types::String.optional
+  attribute :brand,        Types::String.optional
+  attribute :sub_module,   Types::Bool.optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      brand:        d["brand"],
       id:           d["id"],
-      speed:        d["speed"] ? Speed.from_dynamic!(d["speed"]) : nil,
-      sub_module:   d["subModule"],
       vehicle_type: d["type"] ? VehicleType.from_dynamic!(d["type"]) : nil,
+      speed:        d["speed"] ? Speed.from_dynamic!(d["speed"]) : nil,
       year:         d["year"],
+      brand:        d["brand"],
+      sub_module:   d["subModule"],
     )
   end
 
@@ -403,12 +403,12 @@ class Vehicle < Dry::Struct
 
   def to_dynamic
     {
-      "brand"     => brand,
       "id"        => id,
-      "speed"     => speed&.to_dynamic,
-      "subModule" => sub_module,
       "type"      => vehicle_type&.to_dynamic,
+      "speed"     => speed&.to_dynamic,
       "year"      => year,
+      "brand"     => brand,
+      "subModule" => sub_module,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.rb
index ecda6b8..f229d86 100644
--- a/base/schema-ruby/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.top_level_next
+#   puts top_level.value
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -65,14 +65,14 @@ class Next < Dry::Struct
 end
 
 class Node < Dry::Struct
-  attribute :node_next, Types.Instance(Next).optional
   attribute :value,     Types::String
+  attribute :node_next, Types.Instance(Next).optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      node_next: d["next"] ? Next.from_dynamic!(d["next"]) : nil,
       value:     d.fetch("value"),
+      node_next: d["next"] ? Next.from_dynamic!(d["next"]) : nil,
     )
   end
 
@@ -82,8 +82,8 @@ class Node < Dry::Struct
 
   def to_dynamic
     {
-      "next"  => node_next&.to_dynamic,
       "value" => value,
+      "next"  => node_next&.to_dynamic,
     }
   end
 
@@ -93,14 +93,14 @@ class Node < Dry::Struct
 end
 
 class TopLevel < Dry::Struct
-  attribute :top_level_next, Types.Instance(Next).optional
   attribute :value,          Types::String
+  attribute :top_level_next, Types.Instance(Next).optional
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      top_level_next: d["next"] ? Next.from_dynamic!(d["next"]) : nil,
       value:          d.fetch("value"),
+      top_level_next: d["next"] ? Next.from_dynamic!(d["next"]) : nil,
     )
   end
 
@@ -110,8 +110,8 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "next"  => top_level_next&.to_dynamic,
       "value" => value,
+      "next"  => top_level_next&.to_dynamic,
     }
   end
 
diff --git a/base/schema-ruby/test/inputs/schema/uuid.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/uuid.schema/default/TopLevel.rb
index 03e8f24..7ece97b 100644
--- a/base/schema-ruby/test/inputs/schema/uuid.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/uuid.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.arr_one&.first
+#   puts top_level.arr_nullable&.first.nil?
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -21,21 +21,21 @@ module Types
 end
 
 class TopLevel < Dry::Struct
-  attribute :arr_nullable,       Types.Array(Types::String.optional).optional
-  attribute :arr_one,            Types.Array(Types::String).optional
-  attribute :nullable,           Types::String.optional
   attribute :one,                Types::String
   attribute :top_level_optional, Types::String.optional
+  attribute :nullable,           Types::String.optional
+  attribute :arr_one,            Types.Array(Types::String).optional
+  attribute :arr_nullable,       Types.Array(Types::String.optional).optional
   attribute :union_with_enum,    Types::String
 
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
-      arr_nullable:       d["arrNullable"],
-      arr_one:            d["arrOne"],
-      nullable:           d.fetch("nullable"),
       one:                d.fetch("one"),
       top_level_optional: d["optional"],
+      nullable:           d.fetch("nullable"),
+      arr_one:            d["arrOne"],
+      arr_nullable:       d["arrNullable"],
       union_with_enum:    d.fetch("unionWithEnum"),
     )
   end
@@ -46,11 +46,11 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
-      "arrNullable"   => arr_nullable,
-      "arrOne"        => arr_one,
-      "nullable"      => nullable,
       "one"           => one,
       "optional"      => top_level_optional,
+      "nullable"      => nullable,
+      "arrOne"        => arr_one,
+      "arrNullable"   => arr_nullable,
       "unionWithEnum" => union_with_enum,
     }
   end
diff --git a/base/schema-ruby/test/inputs/schema/vega-lite.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/vega-lite.schema/default/TopLevel.rb
index 04321e6..7e78e64 100644
--- a/base/schema-ruby/test/inputs/schema/vega-lite.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/vega-lite.schema/default/TopLevel.rb
@@ -386,6 +386,11 @@ class MarkConfig < Dry::Struct
   # __Default value:__ (None)
   attribute :fill, Types::String.optional
 
+  # The fill opacity (value between [0,1]).
+  #
+  # __Default value:__ `1`
+  attribute :fill_opacity, Types::Double.optional
+
   # Whether the mark's color should be used as fill color instead of stroke color.
   #
   # __Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -395,11 +400,6 @@ class MarkConfig < Dry::Struct
   # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
   attribute :filled, Types::Bool.optional
 
-  # The fill opacity (value between [0,1]).
-  #
-  # __Default value:__ `1`
-  attribute :fill_opacity, Types::Double.optional
-
   # The typeface to set the text in (e.g., `"Helvetica Neue"`).
   attribute :font, Types::String.optional
 
@@ -515,8 +515,8 @@ class MarkConfig < Dry::Struct
       dx:                 d["dx"],
       dy:                 d["dy"],
       fill:               d["fill"],
-      filled:             d["filled"],
       fill_opacity:       d["fillOpacity"],
+      filled:             d["filled"],
       font:               d["font"],
       font_size:          d["fontSize"],
       font_style:         d["fontStyle"],
@@ -554,8 +554,8 @@ class MarkConfig < Dry::Struct
       "dx"               => dx,
       "dy"               => dy,
       "fill"             => fill,
-      "filled"           => filled,
       "fillOpacity"      => fill_opacity,
+      "filled"           => filled,
       "font"             => font,
       "fontSize"         => font_size,
       "fontStyle"        => font_style,
@@ -826,15 +826,15 @@ class AxisConfig < Dry::Struct
   # Boolean flag indicating if pixel position values should be rounded to the nearest integer.
   attribute :tick_round, Types::Bool.optional
 
-  # Boolean value that determines whether the axis should include ticks.
-  attribute :ticks, Types::Bool.optional
-
   # The size in pixels of axis ticks.
   attribute :tick_size, Types::Double.optional
 
   # The width, in pixels, of ticks.
   attribute :tick_width, Types::Double.optional
 
+  # Boolean value that determines whether the axis should include ticks.
+  attribute :ticks, Types::Bool.optional
+
   # Horizontal text alignment of axis titles.
   attribute :title_align, Types::String.optional
 
@@ -899,9 +899,9 @@ class AxisConfig < Dry::Struct
       short_time_labels: d["shortTimeLabels"],
       tick_color:        d["tickColor"],
       tick_round:        d["tickRound"],
-      ticks:             d["ticks"],
       tick_size:         d["tickSize"],
       tick_width:        d["tickWidth"],
+      ticks:             d["ticks"],
       title_align:       d["titleAlign"],
       title_angle:       d["titleAngle"],
       title_baseline:    d["titleBaseline"],
@@ -947,9 +947,9 @@ class AxisConfig < Dry::Struct
       "shortTimeLabels" => short_time_labels,
       "tickColor"       => tick_color,
       "tickRound"       => tick_round,
-      "ticks"           => ticks,
       "tickSize"        => tick_size,
       "tickWidth"       => tick_width,
+      "ticks"           => ticks,
       "titleAlign"      => title_align,
       "titleAngle"      => title_angle,
       "titleBaseline"   => title_baseline,
@@ -1099,15 +1099,15 @@ class VGAxisConfig < Dry::Struct
   # Boolean flag indicating if pixel position values should be rounded to the nearest integer.
   attribute :tick_round, Types::Bool.optional
 
-  # Boolean value that determines whether the axis should include ticks.
-  attribute :ticks, Types::Bool.optional
-
   # The size in pixels of axis ticks.
   attribute :tick_size, Types::Double.optional
 
   # The width, in pixels, of ticks.
   attribute :tick_width, Types::Double.optional
 
+  # Boolean value that determines whether the axis should include ticks.
+  attribute :ticks, Types::Bool.optional
+
   # Horizontal text alignment of axis titles.
   attribute :title_align, Types::String.optional
 
@@ -1171,9 +1171,9 @@ class VGAxisConfig < Dry::Struct
       min_extent:        d["minExtent"],
       tick_color:        d["tickColor"],
       tick_round:        d["tickRound"],
-      ticks:             d["ticks"],
       tick_size:         d["tickSize"],
       tick_width:        d["tickWidth"],
+      ticks:             d["ticks"],
       title_align:       d["titleAlign"],
       title_angle:       d["titleAngle"],
       title_baseline:    d["titleBaseline"],
@@ -1218,9 +1218,9 @@ class VGAxisConfig < Dry::Struct
       "minExtent"       => min_extent,
       "tickColor"       => tick_color,
       "tickRound"       => tick_round,
-      "ticks"           => ticks,
       "tickSize"        => tick_size,
       "tickWidth"       => tick_width,
+      "ticks"           => ticks,
       "titleAlign"      => title_align,
       "titleAngle"      => title_angle,
       "titleBaseline"   => title_baseline,
@@ -1295,6 +1295,11 @@ class BarConfig < Dry::Struct
   # __Default value:__ (None)
   attribute :fill, Types::String.optional
 
+  # The fill opacity (value between [0,1]).
+  #
+  # __Default value:__ `1`
+  attribute :fill_opacity, Types::Double.optional
+
   # Whether the mark's color should be used as fill color instead of stroke color.
   #
   # __Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -1304,11 +1309,6 @@ class BarConfig < Dry::Struct
   # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
   attribute :filled, Types::Bool.optional
 
-  # The fill opacity (value between [0,1]).
-  #
-  # __Default value:__ `1`
-  attribute :fill_opacity, Types::Double.optional
-
   # The typeface to set the text in (e.g., `"Helvetica Neue"`).
   attribute :font, Types::String.optional
 
@@ -1427,8 +1427,8 @@ class BarConfig < Dry::Struct
       dx:                   d["dx"],
       dy:                   d["dy"],
       fill:                 d["fill"],
-      filled:               d["filled"],
       fill_opacity:         d["fillOpacity"],
+      filled:               d["filled"],
       font:                 d["font"],
       font_size:            d["fontSize"],
       font_style:           d["fontStyle"],
@@ -1469,8 +1469,8 @@ class BarConfig < Dry::Struct
       "dx"                 => dx,
       "dy"                 => dy,
       "fill"               => fill,
-      "filled"             => filled,
       "fillOpacity"        => fill_opacity,
+      "filled"             => filled,
       "font"               => font,
       "fontSize"           => font_size,
       "fontStyle"          => font_style,
@@ -2973,6 +2973,11 @@ class TextConfig < Dry::Struct
   # __Default value:__ (None)
   attribute :fill, Types::String.optional
 
+  # The fill opacity (value between [0,1]).
+  #
+  # __Default value:__ `1`
+  attribute :fill_opacity, Types::Double.optional
+
   # Whether the mark's color should be used as fill color instead of stroke color.
   #
   # __Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -2982,11 +2987,6 @@ class TextConfig < Dry::Struct
   # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
   attribute :filled, Types::Bool.optional
 
-  # The fill opacity (value between [0,1]).
-  #
-  # __Default value:__ `1`
-  attribute :fill_opacity, Types::Double.optional
-
   # The typeface to set the text in (e.g., `"Helvetica Neue"`).
   attribute :font, Types::String.optional
 
@@ -3105,8 +3105,8 @@ class TextConfig < Dry::Struct
       dx:                 d["dx"],
       dy:                 d["dy"],
       fill:               d["fill"],
-      filled:             d["filled"],
       fill_opacity:       d["fillOpacity"],
+      filled:             d["filled"],
       font:               d["font"],
       font_size:          d["fontSize"],
       font_style:         d["fontStyle"],
@@ -3145,8 +3145,8 @@ class TextConfig < Dry::Struct
       "dx"               => dx,
       "dy"               => dy,
       "fill"             => fill,
-      "filled"           => filled,
       "fillOpacity"      => fill_opacity,
+      "filled"           => filled,
       "font"             => font,
       "fontSize"         => font_size,
       "fontStyle"        => font_style,
@@ -3220,6 +3220,11 @@ class TickConfig < Dry::Struct
   # __Default value:__ (None)
   attribute :fill, Types::String.optional
 
+  # The fill opacity (value between [0,1]).
+  #
+  # __Default value:__ `1`
+  attribute :fill_opacity, Types::Double.optional
+
   # Whether the mark's color should be used as fill color instead of stroke color.
   #
   # __Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -3229,11 +3234,6 @@ class TickConfig < Dry::Struct
   # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
   attribute :filled, Types::Bool.optional
 
-  # The fill opacity (value between [0,1]).
-  #
-  # __Default value:__ `1`
-  attribute :fill_opacity, Types::Double.optional
-
   # The typeface to set the text in (e.g., `"Helvetica Neue"`).
   attribute :font, Types::String.optional
 
@@ -3355,8 +3355,8 @@ class TickConfig < Dry::Struct
       dx:                 d["dx"],
       dy:                 d["dy"],
       fill:               d["fill"],
-      filled:             d["filled"],
       fill_opacity:       d["fillOpacity"],
+      filled:             d["filled"],
       font:               d["font"],
       font_size:          d["fontSize"],
       font_style:         d["fontStyle"],
@@ -3396,8 +3396,8 @@ class TickConfig < Dry::Struct
       "dx"               => dx,
       "dy"               => dy,
       "fill"             => fill,
-      "filled"           => filled,
       "fillOpacity"      => fill_opacity,
+      "filled"           => filled,
       "font"             => font,
       "fontSize"         => font_size,
       "fontStyle"        => font_style,
@@ -7184,12 +7184,12 @@ class Axis < Dry::Struct
   # underlying scale's range.
   attribute :tick_count, Types::Double.optional
 
-  # Boolean value that determines whether the axis should include ticks.
-  attribute :ticks, Types::Bool.optional
-
   # The size in pixels of axis ticks.
   attribute :tick_size, Types::Double.optional
 
+  # Boolean value that determines whether the axis should include ticks.
+  attribute :ticks, Types::Bool.optional
+
   # A title for the field. If `null`, the title will be removed.
   #
   # __Default value:__  derived from the field's name and transformation function
@@ -7240,8 +7240,8 @@ class Axis < Dry::Struct
       orient:           d["orient"],
       position:         d["position"],
       tick_count:       d["tickCount"],
-      ticks:            d["ticks"],
       tick_size:        d["tickSize"],
+      ticks:            d["ticks"],
       title:            d["title"],
       title_max_length: d["titleMaxLength"],
       title_padding:    d["titlePadding"],
@@ -7271,8 +7271,8 @@ class Axis < Dry::Struct
       "orient"         => orient,
       "position"       => position,
       "tickCount"      => tick_count,
-      "ticks"          => ticks,
       "tickSize"       => tick_size,
+      "ticks"          => ticks,
       "title"          => title,
       "titleMaxLength" => title_max_length,
       "titlePadding"   => title_padding,
@@ -7877,6 +7877,11 @@ class MarkDef < Dry::Struct
   # __Default value:__ (None)
   attribute :fill, Types::String.optional
 
+  # The fill opacity (value between [0,1]).
+  #
+  # __Default value:__ `1`
+  attribute :fill_opacity, Types::Double.optional
+
   # Whether the mark's color should be used as fill color instead of stroke color.
   #
   # __Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -7886,11 +7891,6 @@ class MarkDef < Dry::Struct
   # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
   attribute :filled, Types::Bool.optional
 
-  # The fill opacity (value between [0,1]).
-  #
-  # __Default value:__ `1`
-  attribute :fill_opacity, Types::Double.optional
-
   # The typeface to set the text in (e.g., `"Helvetica Neue"`).
   attribute :font, Types::String.optional
 
@@ -8025,8 +8025,8 @@ class MarkDef < Dry::Struct
       dx:                 d["dx"],
       dy:                 d["dy"],
       fill:               d["fill"],
-      filled:             d["filled"],
       fill_opacity:       d["fillOpacity"],
+      filled:             d["filled"],
       font:               d["font"],
       font_size:          d["fontSize"],
       font_style:         d["fontStyle"],
@@ -8067,8 +8067,8 @@ class MarkDef < Dry::Struct
       "dx"               => dx,
       "dy"               => dy,
       "fill"             => fill,
-      "filled"           => filled,
       "fillOpacity"      => fill_opacity,
+      "filled"           => filled,
       "font"             => font,
       "fontSize"         => font_size,
       "fontStyle"        => font_style,
diff --git a/base/schema-rust/test/inputs/schema/accessors.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/accessors.schema/default/module_under_test.rs
index e691219..f7cfd3a 100644
--- a/base/schema-rust/test/inputs/schema/accessors.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/accessors.schema/default/module_under_test.rs
@@ -15,16 +15,16 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
-    #[serde(rename = "bar")]
-    pub barre: String,
+    #[serde(rename = "union")]
+    pub unionization: Union,
 
     #[serde(rename = "enum")]
     pub enumerification: Enum,
 
     pub foo: String,
 
-    #[serde(rename = "union")]
-    pub unionization: Union,
+    #[serde(rename = "bar")]
+    pub barre: String,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/all-of-additional-properties-false.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/all-of-additional-properties-false.schema/default/module_under_test.rs
index 91581d4..412444a 100644
--- a/base/schema-rust/test/inputs/schema/all-of-additional-properties-false.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/all-of-additional-properties-false.schema/default/module_under_test.rs
@@ -19,10 +19,10 @@ pub struct TopLevel {
 
     pub frequency: Frequency,
 
-    pub description: Option<String>,
-
     #[serde(rename = "type")]
     pub top_level_type: Type,
+
+    pub description: Option<String>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/bool-string.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/bool-string.schema/default/module_under_test.rs
index b9d5600..42d4790 100644
--- a/base/schema-rust/test/inputs/schema/bool-string.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/bool-string.schema/default/module_under_test.rs
@@ -16,15 +16,15 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct TopLevel {
-    pub arr_nullable: Option<Vec<Option<String>>>,
+    pub one: String,
 
-    pub arr_one: Option<Vec<String>>,
+    pub optional: Option<String>,
 
     pub nullable: Option<String>,
 
-    pub one: String,
+    pub arr_one: Option<Vec<String>>,
 
-    pub optional: Option<String>,
+    pub arr_nullable: Option<Vec<Option<String>>>,
 
     pub union_with_bool: UnionWithBool,
 
diff --git a/base/schema-rust/test/inputs/schema/boolean-subschema.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/boolean-subschema.schema/default/module_under_test.rs
index 6ad5b6a..0db3bb9 100644
--- a/base/schema-rust/test/inputs/schema/boolean-subschema.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/boolean-subschema.schema/default/module_under_test.rs
@@ -15,11 +15,11 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
+    pub foo: String,
+
     pub disallowed: Option<serde_json::Value>,
 
     pub empty: Vec<Option<serde_json::Value>>,
 
-    pub foo: String,
-
     pub impossible: Option<serde_json::Value>,
 }
diff --git a/base/schema-rust/test/inputs/schema/comment-injection.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/comment-injection.schema/default/module_under_test.rs
index e05e893..3c6f129 100644
--- a/base/schema-rust/test/inputs/schema/comment-injection.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/comment-injection.schema/default/module_under_test.rs
@@ -28,15 +28,6 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct TopLevel {
-    /// Ends with a backslash \
-    pub trailing_backslash: Option<String>,
-
-    /// Ends with a quote "
-    pub trailing_quote: Option<String>,
-
-    /// Ends with a triple quote """
-    pub trailing_triple_quote: Option<String>,
-
     /// Property delimiters:
     /// */
     /// /*
@@ -50,4 +41,13 @@ pub struct TopLevel {
     /// }
     /// }
     pub value: String,
+
+    /// Ends with a backslash \
+    pub trailing_backslash: Option<String>,
+
+    /// Ends with a quote "
+    pub trailing_quote: Option<String>,
+
+    /// Ends with a triple quote """
+    pub trailing_triple_quote: Option<String>,
 }
diff --git a/base/schema-rust/test/inputs/schema/const-non-string.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/const-non-string.schema/default/module_under_test.rs
index b7f41a1..4ec14ee 100644
--- a/base/schema-rust/test/inputs/schema/const-non-string.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/const-non-string.schema/default/module_under_test.rs
@@ -15,15 +15,15 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
+    pub version: f64,
+
     pub amount: i64,
 
+    pub ratio: f64,
+
     pub enabled: bool,
 
     pub kind: Kind,
-
-    pub ratio: f64,
-
-    pub version: f64,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/date-time-or-string.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/date-time-or-string.schema/default/module_under_test.rs
index 49a0c3d..c86ae59 100644
--- a/base/schema-rust/test/inputs/schema/date-time-or-string.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/date-time-or-string.schema/default/module_under_test.rs
@@ -15,7 +15,7 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
-    pub bar: String,
-
     pub foo: String,
+
+    pub bar: String,
 }
diff --git a/base/schema-rust/test/inputs/schema/date-time.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/date-time.schema/default/module_under_test.rs
index 4654b68..18a6eed 100644
--- a/base/schema-rust/test/inputs/schema/date-time.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/date-time.schema/default/module_under_test.rs
@@ -16,15 +16,15 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "kebab-case")]
 pub struct TopLevel {
-    pub complex_union_array: Vec<ComplexUnionArray>,
-
     pub date: String,
 
-    pub date_time: String,
-
     pub time: String,
 
+    pub date_time: String,
+
     pub union_array: Vec<String>,
+
+    pub complex_union_array: Vec<ComplexUnionArray>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/description.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/description.schema/default/module_under_test.rs
index 9ee5b91..abbbaa1 100644
--- a/base/schema-rust/test/inputs/schema/description.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/description.schema/default/module_under_test.rs
@@ -18,8 +18,9 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "kebab-case")]
 pub struct TopLevel {
-    /// A pretty boolean
-    pub bar: Option<bool>,
+    /// Either a number or a string
+    #[serde(rename = "union")]
+    pub top_level_union: Union,
 
     /// An enumeration
     #[serde(rename = "enum")]
@@ -27,11 +28,10 @@ pub struct TopLevel {
 
     pub foo: Option<f64>,
 
-    pub object_or_string: ObjectOrStringUnion,
+    /// A pretty boolean
+    pub bar: Option<bool>,
 
-    /// Either a number or a string
-    #[serde(rename = "union")]
-    pub top_level_union: Union,
+    pub object_or_string: ObjectOrStringUnion,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/direct-union.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/direct-union.schema/default/module_under_test.rs
index 5103ae3..729063f 100644
--- a/base/schema-rust/test/inputs/schema/direct-union.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/direct-union.schema/default/module_under_test.rs
@@ -21,9 +21,9 @@ pub struct TopLevel {
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct Thing {
-    pub optional: Option<Anything>,
-
     pub required: Option<Anything>,
+
+    pub optional: Option<Anything>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/enum.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/enum.schema/default/module_under_test.rs
index e13fcbf..22fb470 100644
--- a/base/schema-rust/test/inputs/schema/enum.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/enum.schema/default/module_under_test.rs
@@ -16,16 +16,16 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct TopLevel {
-    pub arr: Option<Vec<Arr>>,
-
-    #[serde(rename = "for")]
-    pub top_level_for: Option<String>,
+    pub lvc: Option<Lvc>,
 
     pub gve: Gve,
 
-    pub lvc: Option<Lvc>,
+    pub arr: Option<Vec<Arr>>,
 
     pub other_arr: Option<Vec<OtherArr>>,
+
+    #[serde(rename = "for")]
+    pub top_level_for: Option<String>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/integer-string.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/integer-string.schema/default/module_under_test.rs
index 7338728..2404fcf 100644
--- a/base/schema-rust/test/inputs/schema/integer-string.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/integer-string.schema/default/module_under_test.rs
@@ -16,15 +16,15 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct TopLevel {
-    pub arr_nullable: Option<Vec<Option<String>>>,
+    pub one: String,
 
-    pub arr_one: Option<Vec<String>>,
+    pub optional: Option<String>,
 
     pub nullable: Option<String>,
 
-    pub one: String,
+    pub arr_one: Option<Vec<String>>,
 
-    pub optional: Option<String>,
+    pub arr_nullable: Option<Vec<Option<String>>>,
 
     pub union_with_int: UnionWithInt,
 
diff --git a/base/schema-rust/test/inputs/schema/integer-type.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/integer-type.schema/default/module_under_test.rs
index 88c948b..f439316 100644
--- a/base/schema-rust/test/inputs/schema/integer-type.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/integer-type.schema/default/module_under_test.rs
@@ -15,21 +15,21 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
-    pub above_i32_max: i64,
+    pub small_positive: i32,
 
-    pub below_i32_min: i64,
+    pub small_negative: i32,
 
     pub i32_range: i32,
 
-    pub large_bounds: i64,
+    pub above_i32_max: i64,
 
-    pub only_maximum: i64,
+    pub below_i32_min: i64,
 
     pub only_minimum: i64,
 
-    pub small_negative: i32,
-
-    pub small_positive: i32,
+    pub only_maximum: i64,
 
     pub unbounded: i64,
+
+    pub large_bounds: i64,
 }
diff --git a/base/schema-rust/test/inputs/schema/integer-type.schema/integer-type-conservative--3a501d5af5e7/module_under_test.rs b/head/schema-rust/test/inputs/schema/integer-type.schema/integer-type-conservative--3a501d5af5e7/module_under_test.rs
index 88c948b..f439316 100644
--- a/base/schema-rust/test/inputs/schema/integer-type.schema/integer-type-conservative--3a501d5af5e7/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/integer-type.schema/integer-type-conservative--3a501d5af5e7/module_under_test.rs
@@ -15,21 +15,21 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
-    pub above_i32_max: i64,
+    pub small_positive: i32,
 
-    pub below_i32_min: i64,
+    pub small_negative: i32,
 
     pub i32_range: i32,
 
-    pub large_bounds: i64,
+    pub above_i32_max: i64,
 
-    pub only_maximum: i64,
+    pub below_i32_min: i64,
 
     pub only_minimum: i64,
 
-    pub small_negative: i32,
-
-    pub small_positive: i32,
+    pub only_maximum: i64,
 
     pub unbounded: i64,
+
+    pub large_bounds: i64,
 }
diff --git a/base/schema-rust/test/inputs/schema/integer-type.schema/integer-type-force-i64--9c2eded45bf2/module_under_test.rs b/head/schema-rust/test/inputs/schema/integer-type.schema/integer-type-force-i64--9c2eded45bf2/module_under_test.rs
index 83c96dc..fca253c 100644
--- a/base/schema-rust/test/inputs/schema/integer-type.schema/integer-type-force-i64--9c2eded45bf2/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/integer-type.schema/integer-type-force-i64--9c2eded45bf2/module_under_test.rs
@@ -15,21 +15,21 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
-    pub above_i32_max: i64,
+    pub small_positive: i64,
 
-    pub below_i32_min: i64,
+    pub small_negative: i64,
 
     pub i32_range: i64,
 
-    pub large_bounds: i64,
+    pub above_i32_max: i64,
 
-    pub only_maximum: i64,
+    pub below_i32_min: i64,
 
     pub only_minimum: i64,
 
-    pub small_negative: i64,
-
-    pub small_positive: i64,
+    pub only_maximum: i64,
 
     pub unbounded: i64,
+
+    pub large_bounds: i64,
 }
diff --git a/base/schema-rust/test/inputs/schema/keyword-unions.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/keyword-unions.schema/default/module_under_test.rs
index 131d3af..3ddb67e 100644
--- a/base/schema-rust/test/inputs/schema/keyword-unions.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/keyword-unions.schema/default/module_under_test.rs
@@ -188,8 +188,6 @@ pub struct TopLevel {
 
     pub double: Option<UnionDouble>,
 
-    pub dummy: Option<f64>,
-
     pub dynamic: Option<UnionDynamic>,
 
     pub dynamic_cast: Option<UnionDynamicCast>,
@@ -305,10 +303,10 @@ pub struct TopLevel {
 
     pub internal: Option<UnionInternal>,
 
-    pub is: Option<UnionIs>,
-
     pub iterable: Option<UnionIterable>,
 
+    pub is: Option<UnionIs>,
+
     pub jdec: Option<UnionJdec>,
 
     pub jenc: Option<UnionJenc>,
@@ -632,6 +630,8 @@ pub struct TopLevel {
 
     #[serde(rename = "yield")]
     pub top_level_yield: Option<UnionYield>,
+
+    pub dummy: Option<f64>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/light.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/light.schema/default/module_under_test.rs
index 6177b13..8c667c1 100644
--- a/base/schema-rust/test/inputs/schema/light.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/light.schema/default/module_under_test.rs
@@ -21,9 +21,9 @@ pub struct TopLevel {
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct LightParams {
-    pub app_id: String,
-
     pub outlet_id: String,
 
+    pub app_id: String,
+
     pub rgba: String,
 }
diff --git a/base/schema-rust/test/inputs/schema/min-max-items.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/min-max-items.schema/default/module_under_test.rs
index 2510d92..e71bc0d 100644
--- a/base/schema-rust/test/inputs/schema/min-max-items.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/min-max-items.schema/default/module_under_test.rs
@@ -16,12 +16,12 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct TopLevel {
+    pub min_only: Vec<String>,
+
     pub max_only: Vec<i64>,
 
     pub min_and_max: Vec<f64>,
 
-    pub min_only: Vec<String>,
-
     pub plain: Vec<String>,
 
     pub union_items: Vec<UnionItem>,
diff --git a/base/schema-rust/test/inputs/schema/minmax-integer.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/minmax-integer.schema/default/module_under_test.rs
index 9e2d324..453418a 100644
--- a/base/schema-rust/test/inputs/schema/minmax-integer.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/minmax-integer.schema/default/module_under_test.rs
@@ -18,18 +18,18 @@ use serde::{Serialize, Deserialize};
 pub struct TopLevel {
     pub free: i64,
 
-    pub intersection: i32,
+    pub min: i64,
 
     pub max: i64,
 
-    pub min: i64,
-
     pub minmax: i32,
 
-    pub min_max_intersection: i32,
+    #[serde(rename = "union")]
+    pub top_level_union: i32,
 
     pub min_max_union: i64,
 
-    #[serde(rename = "union")]
-    pub top_level_union: i32,
+    pub intersection: i32,
+
+    pub min_max_intersection: i32,
 }
diff --git a/base/schema-rust/test/inputs/schema/minmax-integer.schema/integer-type-force-i32--513c6f621a11/module_under_test.rs b/head/schema-rust/test/inputs/schema/minmax-integer.schema/integer-type-force-i32--513c6f621a11/module_under_test.rs
index 9b77e87..7d8cef7 100644
--- a/base/schema-rust/test/inputs/schema/minmax-integer.schema/integer-type-force-i32--513c6f621a11/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/minmax-integer.schema/integer-type-force-i32--513c6f621a11/module_under_test.rs
@@ -18,18 +18,18 @@ use serde::{Serialize, Deserialize};
 pub struct TopLevel {
     pub free: i32,
 
-    pub intersection: i32,
+    pub min: i32,
 
     pub max: i32,
 
-    pub min: i32,
-
     pub minmax: i32,
 
-    pub min_max_intersection: i32,
+    #[serde(rename = "union")]
+    pub top_level_union: i32,
 
     pub min_max_union: i32,
 
-    #[serde(rename = "union")]
-    pub top_level_union: i32,
+    pub intersection: i32,
+
+    pub min_max_intersection: i32,
 }
diff --git a/base/schema-rust/test/inputs/schema/minmax.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/minmax.schema/default/module_under_test.rs
index c468bc9..6f87b46 100644
--- a/base/schema-rust/test/inputs/schema/minmax.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/minmax.schema/default/module_under_test.rs
@@ -18,18 +18,18 @@ use serde::{Serialize, Deserialize};
 pub struct TopLevel {
     pub free: f64,
 
-    pub intersection: f64,
+    pub min: f64,
 
     pub max: f64,
 
-    pub min: f64,
-
     pub minmax: f64,
 
-    pub min_max_intersection: f64,
+    #[serde(rename = "union")]
+    pub top_level_union: f64,
 
     pub min_max_union: f64,
 
-    #[serde(rename = "union")]
-    pub top_level_union: f64,
+    pub intersection: f64,
+
+    pub min_max_intersection: f64,
 }
diff --git a/base/schema-rust/test/inputs/schema/minmaxlength.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/minmaxlength.schema/default/module_under_test.rs
index 3fc1e6d..8ffe604 100644
--- a/base/schema-rust/test/inputs/schema/minmaxlength.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/minmaxlength.schema/default/module_under_test.rs
@@ -16,22 +16,22 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct TopLevel {
-    pub intersection: String,
-
-    pub in_union: InUnion,
+    pub minlength: String,
 
     pub maxlength: String,
 
-    pub minlength: String,
+    pub minmaxlength: String,
 
-    pub min_max_intersection: String,
+    #[serde(rename = "union")]
+    pub top_level_union: String,
 
-    pub minmaxlength: String,
+    pub in_union: InUnion,
 
     pub min_max_union: String,
 
-    #[serde(rename = "union")]
-    pub top_level_union: String,
+    pub intersection: String,
+
+    pub min_max_intersection: String,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/non-standard-ref.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/non-standard-ref.schema/default/module_under_test.rs
index d4740a6..74cfcbd 100644
--- a/base/schema-rust/test/inputs/schema/non-standard-ref.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/non-standard-ref.schema/default/module_under_test.rs
@@ -15,9 +15,9 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
-    pub bar: i64,
-
     pub foo: i64,
 
+    pub bar: i64,
+
     pub quux: bool,
 }
diff --git a/base/schema-rust/test/inputs/schema/nullable-optional-one-of.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/nullable-optional-one-of.schema/default/module_under_test.rs
index 6bb8ab8..10805f7 100644
--- a/base/schema-rust/test/inputs/schema/nullable-optional-one-of.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/nullable-optional-one-of.schema/default/module_under_test.rs
@@ -15,9 +15,9 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
-    pub b: Option<String>,
-
     pub kind: Kind,
+
+    pub b: Option<String>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/optional-any.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/optional-any.schema/default/module_under_test.rs
index dba3fda..a2c8d63 100644
--- a/base/schema-rust/test/inputs/schema/optional-any.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/optional-any.schema/default/module_under_test.rs
@@ -15,7 +15,7 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
-    pub bar: bool,
-
     pub foo: Option<serde_json::Value>,
+
+    pub bar: bool,
 }
diff --git a/base/schema-rust/test/inputs/schema/optional-const-ref.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/optional-const-ref.schema/default/module_under_test.rs
index eaf0e45..0a5601d 100644
--- a/base/schema-rust/test/inputs/schema/optional-const-ref.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/optional-const-ref.schema/default/module_under_test.rs
@@ -18,17 +18,17 @@ use serde::{Serialize, Deserialize};
 pub struct TopLevel {
     pub coordinates: Option<Vec<Coordinate>>,
 
+    pub required_coordinates: Vec<Coordinate>,
+
     pub count: Option<i32>,
 
-    pub label: Option<String>,
+    pub required_count: i32,
 
-    pub required_coordinates: Vec<Coordinate>,
+    pub weight: Option<f64>,
 
-    pub required_count: i32,
+    pub label: Option<String>,
 
     pub required_label: String,
-
-    pub weight: Option<f64>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/optional-constraints.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/optional-constraints.schema/default/module_under_test.rs
index 1f030df..7ea4b01 100644
--- a/base/schema-rust/test/inputs/schema/optional-constraints.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/optional-constraints.schema/default/module_under_test.rs
@@ -16,13 +16,13 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct TopLevel {
-    pub opt_double: Option<f64>,
+    pub req_zero_min: i32,
 
     pub opt_int: Option<i32>,
 
-    pub opt_pattern: Option<String>,
+    pub opt_double: Option<f64>,
 
     pub opt_string: Option<String>,
 
-    pub req_zero_min: i32,
+    pub opt_pattern: Option<String>,
 }
diff --git a/base/schema-rust/test/inputs/schema/optional-date-time.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/optional-date-time.schema/default/module_under_test.rs
index c137652..326938e 100644
--- a/base/schema-rust/test/inputs/schema/optional-date-time.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/optional-date-time.schema/default/module_under_test.rs
@@ -16,15 +16,15 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "kebab-case")]
 pub struct TopLevel {
-    pub optional_date: Option<String>,
+    pub required_date: String,
 
-    pub optional_date_time: Option<String>,
+    pub required_time: String,
 
-    pub optional_time: Option<String>,
+    pub required_date_time: String,
 
-    pub required_date: String,
+    pub optional_date: Option<String>,
 
-    pub required_date_time: String,
+    pub optional_time: Option<String>,
 
-    pub required_time: String,
+    pub optional_date_time: Option<String>,
 }
diff --git a/base/schema-rust/test/inputs/schema/prefix-items.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/prefix-items.schema/default/module_under_test.rs
index 70c2ca8..1abbc12 100644
--- a/base/schema-rust/test/inputs/schema/prefix-items.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/prefix-items.schema/default/module_under_test.rs
@@ -15,9 +15,9 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
-    pub open: Vec<Open>,
-
     pub tuple: Vec<Open>,
+
+    pub open: Vec<Open>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/head/schema-rust/test/inputs/schema/property-order.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/property-order.schema/default/module_under_test.rs
new file mode 100644
index 0000000..0c9757d
--- /dev/null
+++ b/head/schema-rust/test/inputs/schema/property-order.schema/default/module_under_test.rs
@@ -0,0 +1,38 @@
+// Example code that deserializes and serializes the model.
+// extern crate serde;
+// #[macro_use]
+// extern crate serde_derive;
+// extern crate serde_json;
+//
+// use generated_module::TopLevel;
+//
+// fn main() {
+//     let json = r#"{"answer": 42}"#;
+//     let model: TopLevel = serde_json::from_str(&json).unwrap();
+// }
+
+use serde::{Serialize, Deserialize};
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct TopLevel {
+    pub zebra: String,
+
+    pub mango: f64,
+
+    pub apple: bool,
+
+    pub delta: String,
+
+    pub banana: i64,
+
+    pub ordered: Ordered,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Ordered {
+    pub mango: f64,
+
+    pub zebra: String,
+
+    pub apple: bool,
+}
diff --git a/base/schema-rust/test/inputs/schema/renaming-bug.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/renaming-bug.schema/default/module_under_test.rs
index a899e0e..7cc3ebd 100644
--- a/base/schema-rust/test/inputs/schema/renaming-bug.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/renaming-bug.schema/default/module_under_test.rs
@@ -26,17 +26,17 @@ pub struct TopLevel {
 pub struct Fruit {
     pub apple: Option<bool>,
 
-    pub berries: Option<Vec<Berry>>,
-
     pub orange: Option<bool>,
+
+    pub berries: Option<Vec<Berry>>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct Berry {
-    pub color: Option<Color>,
-
     pub name: Option<String>,
 
+    pub color: Option<Color>,
+
     pub shapes: Option<Vec<Shape>>,
 }
 
@@ -47,9 +47,9 @@ pub struct Color {
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct Shape {
-    pub geometry: Option<Geometry>,
-
     pub history: Option<History>,
+
+    pub geometry: Option<Geometry>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
@@ -73,11 +73,11 @@ pub struct RectShape {
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct Part {
-    pub depth: Option<String>,
-
     pub length: Option<String>,
 
     pub width: Option<String>,
+
+    pub depth: Option<String>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
@@ -88,18 +88,18 @@ pub struct History {
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct Vehicle {
-    pub brand: Option<String>,
-
     pub id: Option<String>,
 
-    pub speed: Option<Speed>,
-
-    pub sub_module: Option<bool>,
-
     #[serde(rename = "type")]
     pub vehicle_type: Option<VehicleType>,
 
+    pub speed: Option<Speed>,
+
     pub year: Option<String>,
+
+    pub brand: Option<String>,
+
+    pub sub_module: Option<bool>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
@@ -109,9 +109,9 @@ pub struct Speed {
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct Limit {
-    pub maximum: Option<f64>,
-
     pub minimum: Option<f64>,
+
+    pub maximum: Option<f64>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/rust-cycle-breaker-union.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/rust-cycle-breaker-union.schema/default/module_under_test.rs
index 3722e3b..2893330 100644
--- a/base/schema-rust/test/inputs/schema/rust-cycle-breaker-union.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/rust-cycle-breaker-union.schema/default/module_under_test.rs
@@ -15,16 +15,16 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
-    pub next: Option<Box<Next>>,
-
     pub value: String,
+
+    pub next: Option<Box<Next>>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct Node {
-    pub next: Option<Box<Next>>,
-
     pub value: String,
+
+    pub next: Option<Box<Next>>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/base/schema-rust/test/inputs/schema/uuid.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/uuid.schema/default/module_under_test.rs
index af1027e..7ed4b76 100644
--- a/base/schema-rust/test/inputs/schema/uuid.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/uuid.schema/default/module_under_test.rs
@@ -16,15 +16,15 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct TopLevel {
-    pub arr_nullable: Option<Vec<Option<String>>>,
+    pub one: String,
 
-    pub arr_one: Option<Vec<String>>,
+    pub optional: Option<String>,
 
     pub nullable: Option<String>,
 
-    pub one: String,
+    pub arr_one: Option<Vec<String>>,
 
-    pub optional: Option<String>,
+    pub arr_nullable: Option<Vec<Option<String>>>,
 
     pub union_with_enum: String,
 }
diff --git a/base/schema-rust/test/inputs/schema/vega-lite.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/vega-lite.schema/default/module_under_test.rs
index d192286..0df99c1 100644
--- a/base/schema-rust/test/inputs/schema/vega-lite.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/vega-lite.schema/default/module_under_test.rs
@@ -448,6 +448,11 @@ pub struct MarkConfig {
     /// __Default value:__ (None)
     pub fill: Option<String>,
 
+    /// The fill opacity (value between [0,1]).
+    ///
+    /// __Default value:__ `1`
+    pub fill_opacity: Option<f64>,
+
     /// Whether the mark's color should be used as fill color instead of stroke color.
     ///
     /// __Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -457,11 +462,6 @@ pub struct MarkConfig {
     /// __Note:__ This property cannot be used in a [style config](mark.html#style-config).
     pub filled: Option<bool>,
 
-    /// The fill opacity (value between [0,1]).
-    ///
-    /// __Default value:__ `1`
-    pub fill_opacity: Option<f64>,
-
     /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
     pub font: Option<String>,
 
@@ -918,15 +918,15 @@ pub struct AxisConfig {
     /// Boolean flag indicating if pixel position values should be rounded to the nearest integer.
     pub tick_round: Option<bool>,
 
-    /// Boolean value that determines whether the axis should include ticks.
-    pub ticks: Option<bool>,
-
     /// The size in pixels of axis ticks.
     pub tick_size: Option<f64>,
 
     /// The width, in pixels, of ticks.
     pub tick_width: Option<f64>,
 
+    /// Boolean value that determines whether the axis should include ticks.
+    pub ticks: Option<bool>,
+
     /// Horizontal text alignment of axis titles.
     pub title_align: Option<String>,
 
@@ -1147,15 +1147,15 @@ pub struct VgAxisConfig {
     /// Boolean flag indicating if pixel position values should be rounded to the nearest integer.
     pub tick_round: Option<bool>,
 
-    /// Boolean value that determines whether the axis should include ticks.
-    pub ticks: Option<bool>,
-
     /// The size in pixels of axis ticks.
     pub tick_size: Option<f64>,
 
     /// The width, in pixels, of ticks.
     pub tick_width: Option<f64>,
 
+    /// Boolean value that determines whether the axis should include ticks.
+    pub ticks: Option<bool>,
+
     /// Horizontal text alignment of axis titles.
     pub title_align: Option<String>,
 
@@ -1249,6 +1249,11 @@ pub struct BarConfig {
     /// __Default value:__ (None)
     pub fill: Option<String>,
 
+    /// The fill opacity (value between [0,1]).
+    ///
+    /// __Default value:__ `1`
+    pub fill_opacity: Option<f64>,
+
     /// Whether the mark's color should be used as fill color instead of stroke color.
     ///
     /// __Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -1258,11 +1263,6 @@ pub struct BarConfig {
     /// __Note:__ This property cannot be used in a [style config](mark.html#style-config).
     pub filled: Option<bool>,
 
-    /// The fill opacity (value between [0,1]).
-    ///
-    /// __Default value:__ `1`
-    pub fill_opacity: Option<f64>,
-
     /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
     pub font: Option<String>,
 
@@ -2349,6 +2349,11 @@ pub struct TextConfig {
     /// __Default value:__ (None)
     pub fill: Option<String>,
 
+    /// The fill opacity (value between [0,1]).
+    ///
+    /// __Default value:__ `1`
+    pub fill_opacity: Option<f64>,
+
     /// Whether the mark's color should be used as fill color instead of stroke color.
     ///
     /// __Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -2358,11 +2363,6 @@ pub struct TextConfig {
     /// __Note:__ This property cannot be used in a [style config](mark.html#style-config).
     pub filled: Option<bool>,
 
-    /// The fill opacity (value between [0,1]).
-    ///
-    /// __Default value:__ `1`
-    pub fill_opacity: Option<f64>,
-
     /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
     pub font: Option<String>,
 
@@ -2516,6 +2516,11 @@ pub struct TickConfig {
     /// __Default value:__ (None)
     pub fill: Option<String>,
 
+    /// The fill opacity (value between [0,1]).
+    ///
+    /// __Default value:__ `1`
+    pub fill_opacity: Option<f64>,
+
     /// Whether the mark's color should be used as fill color instead of stroke color.
     ///
     /// __Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -2525,11 +2530,6 @@ pub struct TickConfig {
     /// __Note:__ This property cannot be used in a [style config](mark.html#style-config).
     pub filled: Option<bool>,
 
-    /// The fill opacity (value between [0,1]).
-    ///
-    /// __Default value:__ `1`
-    pub fill_opacity: Option<f64>,
-
     /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
     pub font: Option<String>,
 
@@ -4929,12 +4929,12 @@ pub struct Axis {
     /// underlying scale's range.
     pub tick_count: Option<f64>,
 
-    /// Boolean value that determines whether the axis should include ticks.
-    pub ticks: Option<bool>,
-
     /// The size in pixels of axis ticks.
     pub tick_size: Option<f64>,
 
+    /// Boolean value that determines whether the axis should include ticks.
+    pub ticks: Option<bool>,
+
     /// A title for the field. If `null`, the title will be removed.
     ///
     /// __Default value:__  derived from the field's name and transformation function
@@ -5362,6 +5362,11 @@ pub struct MarkDef {
     /// __Default value:__ (None)
     pub fill: Option<String>,
 
+    /// The fill opacity (value between [0,1]).
+    ///
+    /// __Default value:__ `1`
+    pub fill_opacity: Option<f64>,
+
     /// Whether the mark's color should be used as fill color instead of stroke color.
     ///
     /// __Default value:__ `true` for all marks except `point` and `false` for `point`.
@@ -5371,11 +5376,6 @@ pub struct MarkDef {
     /// __Note:__ This property cannot be used in a [style config](mark.html#style-config).
     pub filled: Option<bool>,
 
-    /// The fill opacity (value between [0,1]).
-    ///
-    /// __Default value:__ `1`
-    pub fill_opacity: Option<f64>,
-
     /// The typeface to set the text in (e.g., `"Helvetica Neue"`).
     pub font: Option<String>,
 
diff --git a/base/schema-scala3/test/inputs/schema/accessors.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/accessors.schema/default/TopLevel.scala
index a95c403..453166a 100644
--- a/base/schema-scala3/test/inputs/schema/accessors.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/accessors.schema/default/TopLevel.scala
@@ -8,10 +8,10 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val bar : String,
+    val union : Union,
     val `enum` : EnumEnum,
     val foo : String,
-    val union : Union
+    val bar : String
 ) derives Encoder.AsObject, Decoder
 
 enum EnumEnum : 
diff --git a/base/schema-scala3/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.scala
index 574c031..c495716 100644
--- a/base/schema-scala3/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.scala
@@ -10,8 +10,8 @@ type NullValue = None.type
 case class TopLevel (
     val amount : Double,
     val frequency : Frequency,
-    val description : Option[String] = None,
-    val `type` : Type
+    val `type` : Type,
+    val description : Option[String] = None
 ) derives Encoder.AsObject, Decoder
 
 enum Frequency : 
diff --git a/base/schema-scala3/test/inputs/schema/bool-string.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/bool-string.schema/default/TopLevel.scala
index 1584697..59c5d7c 100644
--- a/base/schema-scala3/test/inputs/schema/bool-string.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/bool-string.schema/default/TopLevel.scala
@@ -8,11 +8,11 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val arrNullable : Option[Seq[Option[String]]] = None,
-    val arrOne : Option[Seq[String]] = None,
-    val nullable : Option[String] = None,
     val one : String,
     val optional : Option[String] = None,
+    val nullable : Option[String] = None,
+    val arrOne : Option[Seq[String]] = None,
+    val arrNullable : Option[Seq[Option[String]]] = None,
     val unionWithBool : UnionWithBool,
     val unionWithBoolAndEnum : UnionWithBool
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/boolean-subschema.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/boolean-subschema.schema/default/TopLevel.scala
index b333e21..da1e5df 100644
--- a/base/schema-scala3/test/inputs/schema/boolean-subschema.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/boolean-subschema.schema/default/TopLevel.scala
@@ -8,8 +8,8 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
+    val foo : String,
     val disallowed : Option[Json] = None,
     val empty : Seq[Option[Json]],
-    val foo : String,
     val impossible : Option[Json] = None
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/comment-injection.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/comment-injection.schema/default/TopLevel.scala
index 7071e1c..0bf1133 100644
--- a/base/schema-scala3/test/inputs/schema/comment-injection.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/comment-injection.schema/default/TopLevel.scala
@@ -22,21 +22,6 @@ type NullValue = None.type
  * }
  */
 case class TopLevel (
-    /**
-     * Ends with a backslash \
-     */
-    val trailingBackslash : Option[String] = None,
-
-    /**
-     * Ends with a quote "
-     */
-    val trailingQuote : Option[String] = None,
-
-    /**
-     * Ends with a triple quote """
-     */
-    val trailingTripleQuote : Option[String] = None,
-
     /**
      * Property delimiters:
      * * /
@@ -51,5 +36,20 @@ case class TopLevel (
      * }
      * }
      */
-    val value : String
+    val value : String,
+
+    /**
+     * Ends with a backslash \
+     */
+    val trailingBackslash : Option[String] = None,
+
+    /**
+     * Ends with a quote "
+     */
+    val trailingQuote : Option[String] = None,
+
+    /**
+     * Ends with a triple quote """
+     */
+    val trailingTripleQuote : Option[String] = None
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/const-non-string.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/const-non-string.schema/default/TopLevel.scala
index b810944..1595e00 100644
--- a/base/schema-scala3/test/inputs/schema/const-non-string.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/const-non-string.schema/default/TopLevel.scala
@@ -8,11 +8,11 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
+    val version : Double,
     val amount : Long,
-    val enabled : Boolean,
-    val kind : Kind,
     val ratio : Double,
-    val version : Double
+    val enabled : Boolean,
+    val kind : Kind
 ) derives Encoder.AsObject, Decoder
 
 enum Kind : 
diff --git a/base/schema-scala3/test/inputs/schema/date-time-or-string.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/date-time-or-string.schema/default/TopLevel.scala
index 9d05f12..7395213 100644
--- a/base/schema-scala3/test/inputs/schema/date-time-or-string.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/date-time-or-string.schema/default/TopLevel.scala
@@ -8,6 +8,6 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val bar : String,
-    val foo : String
+    val foo : String,
+    val bar : String
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/date-time.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/date-time.schema/default/TopLevel.scala
index aea0d4f..aa9eac9 100644
--- a/base/schema-scala3/test/inputs/schema/date-time.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/date-time.schema/default/TopLevel.scala
@@ -8,11 +8,11 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val `complex-union-array` : Seq[ComplexUnionArray],
     val date : String,
-    val `date-time` : String,
     val time : String,
-    val `union-array` : Seq[String]
+    val `date-time` : String,
+    val `union-array` : Seq[String],
+    val `complex-union-array` : Seq[ComplexUnionArray]
 ) derives Encoder.AsObject, Decoder
 
 type ComplexUnionArray = Long | String
diff --git a/base/schema-scala3/test/inputs/schema/description.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/description.schema/default/TopLevel.scala
index 5102629..14f9a5f 100644
--- a/base/schema-scala3/test/inputs/schema/description.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/description.schema/default/TopLevel.scala
@@ -13,9 +13,9 @@ type NullValue = None.type
  */
 case class TopLevel (
     /**
-     * A pretty boolean
+     * Either a number or a string
      */
-    val bar : Option[Boolean] = None,
+    val union : Union,
 
     /**
      * An enumeration
@@ -23,12 +23,13 @@ case class TopLevel (
     val `enum` : EnumEnum,
 
     val foo : Option[Double] = None,
-    val `object-or-string` : ObjectOrStringUnion,
 
     /**
-     * Either a number or a string
+     * A pretty boolean
      */
-    val union : Union
+    val bar : Option[Boolean] = None,
+
+    val `object-or-string` : ObjectOrStringUnion
 ) derives Encoder.AsObject, Decoder
 
 type ObjectOrStringUnion = ObjectOrStringClass | String
diff --git a/base/schema-scala3/test/inputs/schema/direct-union.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/direct-union.schema/default/TopLevel.scala
index 86786cb..65a4547 100644
--- a/base/schema-scala3/test/inputs/schema/direct-union.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/direct-union.schema/default/TopLevel.scala
@@ -12,8 +12,8 @@ case class TopLevel (
 ) derives Encoder.AsObject, Decoder
 
 case class Thing (
-    val optional : Option[Anything] = None,
-    val required : Anything
+    val required : Anything,
+    val optional : Option[Anything] = None
 ) derives Encoder.AsObject, Decoder
 
 type Anything = Seq[Option[Json]] | Map[String, Option[Json]] | Boolean | Double | Long | String | NullValue
diff --git a/base/schema-scala3/test/inputs/schema/enum.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/enum.schema/default/TopLevel.scala
index 307db6c..e5a583b 100644
--- a/base/schema-scala3/test/inputs/schema/enum.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/enum.schema/default/TopLevel.scala
@@ -8,11 +8,11 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val arr : Option[Seq[Arr]] = None,
-    val `for` : Option[String] = None,
-    val gve : Gve,
     val lvc : Option[Lvc] = None,
-    val otherArr : Option[Seq[OtherArr]] = None
+    val gve : Gve,
+    val arr : Option[Seq[Arr]] = None,
+    val otherArr : Option[Seq[OtherArr]] = None,
+    val `for` : Option[String] = None
 ) derives Encoder.AsObject, Decoder
 
 type Arr = OtherArr | Long
diff --git a/base/schema-scala3/test/inputs/schema/integer-string.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/integer-string.schema/default/TopLevel.scala
index c678748..8585ede 100644
--- a/base/schema-scala3/test/inputs/schema/integer-string.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/integer-string.schema/default/TopLevel.scala
@@ -8,11 +8,11 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val arrNullable : Option[Seq[Option[String]]] = None,
-    val arrOne : Option[Seq[String]] = None,
-    val nullable : Option[String] = None,
     val one : String,
     val optional : Option[String] = None,
+    val nullable : Option[String] = None,
+    val arrOne : Option[Seq[String]] = None,
+    val arrNullable : Option[Seq[Option[String]]] = None,
     val unionWithInt : UnionWithInt,
     val unionWithIntAndEnum : UnionWithInt
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/integer-type.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/integer-type.schema/default/TopLevel.scala
index b658789..12a2a39 100644
--- a/base/schema-scala3/test/inputs/schema/integer-type.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/integer-type.schema/default/TopLevel.scala
@@ -8,13 +8,13 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
+    val small_positive : Long,
+    val small_negative : Long,
+    val i32_range : Long,
     val above_i32_max : Long,
     val below_i32_min : Long,
-    val i32_range : Long,
-    val large_bounds : Long,
-    val only_maximum : Long,
     val only_minimum : Long,
-    val small_negative : Long,
-    val small_positive : Long,
-    val unbounded : Long
+    val only_maximum : Long,
+    val unbounded : Long,
+    val large_bounds : Long
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/light.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/light.schema/default/TopLevel.scala
index 4539859..891041f 100644
--- a/base/schema-scala3/test/inputs/schema/light.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/light.schema/default/TopLevel.scala
@@ -12,7 +12,7 @@ case class TopLevel (
 ) derives Encoder.AsObject, Decoder
 
 case class LightParams (
-    val app_id : String,
     val outlet_id : String,
+    val app_id : String,
     val rgba : String
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/min-max-items.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/min-max-items.schema/default/TopLevel.scala
index adfd99b..b2b7c75 100644
--- a/base/schema-scala3/test/inputs/schema/min-max-items.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/min-max-items.schema/default/TopLevel.scala
@@ -8,9 +8,9 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
+    val minOnly : Seq[String],
     val maxOnly : Seq[Long],
     val minAndMax : Seq[Double],
-    val minOnly : Seq[String],
     val plain : Seq[String],
     val unionItems : Seq[UnionItem]
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/minmax-integer.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/minmax-integer.schema/default/TopLevel.scala
index 3386ae3..219b9c9 100644
--- a/base/schema-scala3/test/inputs/schema/minmax-integer.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/minmax-integer.schema/default/TopLevel.scala
@@ -9,11 +9,11 @@ type NullValue = None.type
 
 case class TopLevel (
     val free : Long,
-    val intersection : Long,
-    val max : Long,
     val min : Long,
+    val max : Long,
     val minmax : Long,
-    val minMaxIntersection : Long,
+    val union : Long,
     val minMaxUnion : Long,
-    val union : Long
+    val intersection : Long,
+    val minMaxIntersection : Long
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/minmax.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/minmax.schema/default/TopLevel.scala
index df650cf..8530ead 100644
--- a/base/schema-scala3/test/inputs/schema/minmax.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/minmax.schema/default/TopLevel.scala
@@ -9,11 +9,11 @@ type NullValue = None.type
 
 case class TopLevel (
     val free : Double,
-    val intersection : Double,
-    val max : Double,
     val min : Double,
+    val max : Double,
     val minmax : Double,
-    val minMaxIntersection : Double,
+    val union : Double,
     val minMaxUnion : Double,
-    val union : Double
+    val intersection : Double,
+    val minMaxIntersection : Double
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
index 3178124..dac9806 100644
--- a/base/schema-scala3/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
@@ -8,14 +8,14 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val intersection : String,
-    val inUnion : InUnion,
-    val maxlength : String,
     val minlength : String,
-    val minMaxIntersection : String,
+    val maxlength : String,
     val minmaxlength : String,
+    val union : String,
+    val inUnion : InUnion,
     val minMaxUnion : String,
-    val union : String
+    val intersection : String,
+    val minMaxIntersection : String
 ) derives Encoder.AsObject, Decoder
 
 type InUnion = Double | String
diff --git a/base/schema-scala3/test/inputs/schema/non-standard-ref.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/non-standard-ref.schema/default/TopLevel.scala
index 7475709..214237c 100644
--- a/base/schema-scala3/test/inputs/schema/non-standard-ref.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/non-standard-ref.schema/default/TopLevel.scala
@@ -8,7 +8,7 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val bar : Long,
     val foo : Long,
+    val bar : Long,
     val quux : Boolean
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.scala
index 12dd0f5..774083b 100644
--- a/base/schema-scala3/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.scala
@@ -8,8 +8,8 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val b : Option[String] = None,
-    val kind : Kind
+    val kind : Kind,
+    val b : Option[String] = None
 ) derives Encoder.AsObject, Decoder
 
 enum Kind : 
diff --git a/base/schema-scala3/test/inputs/schema/optional-any.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/optional-any.schema/default/TopLevel.scala
index 82484bf..346b18f 100644
--- a/base/schema-scala3/test/inputs/schema/optional-any.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/optional-any.schema/default/TopLevel.scala
@@ -8,6 +8,6 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val bar : Boolean,
-    val foo : Option[Json] = None
+    val foo : Option[Json] = None,
+    val bar : Boolean
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/optional-const-ref.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/optional-const-ref.schema/default/TopLevel.scala
index f7fca72..7502d06 100644
--- a/base/schema-scala3/test/inputs/schema/optional-const-ref.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/optional-const-ref.schema/default/TopLevel.scala
@@ -9,12 +9,12 @@ type NullValue = None.type
 
 case class TopLevel (
     val coordinates : Option[Seq[Coordinate]] = None,
-    val count : Option[Long] = None,
-    val label : Option[String] = None,
     val requiredCoordinates : Seq[Coordinate],
+    val count : Option[Long] = None,
     val requiredCount : Long,
-    val requiredLabel : String,
-    val weight : Option[Double] = None
+    val weight : Option[Double] = None,
+    val label : Option[String] = None,
+    val requiredLabel : String
 ) derives Encoder.AsObject, Decoder
 
 case class Coordinate (
diff --git a/base/schema-scala3/test/inputs/schema/optional-constraints.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/optional-constraints.schema/default/TopLevel.scala
index 281a48c..6fcbd6c 100644
--- a/base/schema-scala3/test/inputs/schema/optional-constraints.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/optional-constraints.schema/default/TopLevel.scala
@@ -8,9 +8,9 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val optDouble : Option[Double] = None,
+    val reqZeroMin : Long,
     val optInt : Option[Long] = None,
-    val optPattern : Option[String] = None,
+    val optDouble : Option[Double] = None,
     val optString : Option[String] = None,
-    val reqZeroMin : Long
+    val optPattern : Option[String] = None
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/optional-date-time.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/optional-date-time.schema/default/TopLevel.scala
index 34d1cc3..716c7f1 100644
--- a/base/schema-scala3/test/inputs/schema/optional-date-time.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/optional-date-time.schema/default/TopLevel.scala
@@ -8,10 +8,10 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val `optional-date` : Option[String] = None,
-    val `optional-date-time` : Option[String] = None,
-    val `optional-time` : Option[String] = None,
     val `required-date` : String,
+    val `required-time` : String,
     val `required-date-time` : String,
-    val `required-time` : String
+    val `optional-date` : Option[String] = None,
+    val `optional-time` : Option[String] = None,
+    val `optional-date-time` : Option[String] = None
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/prefix-items.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/prefix-items.schema/default/TopLevel.scala
index 4cd1048..df170c5 100644
--- a/base/schema-scala3/test/inputs/schema/prefix-items.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/prefix-items.schema/default/TopLevel.scala
@@ -8,8 +8,8 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val open : Seq[Open],
-    val tuple : Seq[Open]
+    val tuple : Seq[Open],
+    val open : Seq[Open]
 ) derives Encoder.AsObject, Decoder
 
 type Open = Boolean | Long
diff --git a/head/schema-scala3/test/inputs/schema/property-order.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/property-order.schema/default/TopLevel.scala
new file mode 100644
index 0000000..de10fcb
--- /dev/null
+++ b/head/schema-scala3/test/inputs/schema/property-order.schema/default/TopLevel.scala
@@ -0,0 +1,23 @@
+package quicktype
+
+import io.circe.syntax._
+import io.circe._
+import cats.syntax.functor._
+
+// If a union has a null in, then we'll need this too... 
+type NullValue = None.type
+
+case class TopLevel (
+    val zebra : String,
+    val mango : Double,
+    val apple : Boolean,
+    val delta : String,
+    val banana : Long,
+    val ordered : Ordered
+) derives Encoder.AsObject, Decoder
+
+case class Ordered (
+    val mango : Double,
+    val zebra : String,
+    val apple : Boolean
+) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/renaming-bug.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/renaming-bug.schema/default/TopLevel.scala
index a2da474..d83173c 100644
--- a/base/schema-scala3/test/inputs/schema/renaming-bug.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/renaming-bug.schema/default/TopLevel.scala
@@ -15,13 +15,13 @@ case class TopLevel (
 
 case class Fruit (
     val apple : Option[Boolean] = None,
-    val berries : Option[Seq[Berry]] = None,
-    val orange : Option[Boolean] = None
+    val orange : Option[Boolean] = None,
+    val berries : Option[Seq[Berry]] = None
 ) derives Encoder.AsObject, Decoder
 
 case class Berry (
-    val color : Option[Color] = None,
     val name : Option[String] = None,
+    val color : Option[Color] = None,
     val shapes : Option[Seq[Shape]] = None
 ) derives Encoder.AsObject, Decoder
 
@@ -30,8 +30,8 @@ case class Color (
 ) derives Encoder.AsObject, Decoder
 
 case class Shape (
-    val geometry : Option[Geometry] = None,
-    val history : Option[History] = None
+    val history : Option[History] = None,
+    val geometry : Option[Geometry] = None
 ) derives Encoder.AsObject, Decoder
 
 case class Geometry (
@@ -48,9 +48,9 @@ case class RectShape (
 ) derives Encoder.AsObject, Decoder
 
 case class Part (
-    val depth : Option[String] = None,
     val length : Option[String] = None,
-    val width : Option[String] = None
+    val width : Option[String] = None,
+    val depth : Option[String] = None
 ) derives Encoder.AsObject, Decoder
 
 case class History (
@@ -58,12 +58,12 @@ case class History (
 ) derives Encoder.AsObject, Decoder
 
 case class Vehicle (
-    val brand : Option[String] = None,
     val id : Option[String] = None,
-    val speed : Option[Speed] = None,
-    val subModule : Option[Boolean] = None,
     val `type` : Option[VehicleType] = None,
-    val year : Option[String] = None
+    val speed : Option[Speed] = None,
+    val year : Option[String] = None,
+    val brand : Option[String] = None,
+    val subModule : Option[Boolean] = None
 ) derives Encoder.AsObject, Decoder
 
 case class Speed (
@@ -71,8 +71,8 @@ case class Speed (
 ) derives Encoder.AsObject, Decoder
 
 case class Limit (
-    val maximum : Option[Double] = None,
-    val minimum : Option[Double] = None
+    val minimum : Option[Double] = None,
+    val maximum : Option[Double] = None
 ) derives Encoder.AsObject, Decoder
 
 case class VehicleType (
diff --git a/base/schema-scala3/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.scala
index 74867fc..8d2e170 100644
--- a/base/schema-scala3/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.scala
@@ -8,13 +8,13 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val next : Option[Next] = None,
-    val value : String
+    val value : String,
+    val next : Option[Next] = None
 ) derives Encoder.AsObject, Decoder
 
 case class Node (
-    val next : Option[Next] = None,
-    val value : String
+    val value : String,
+    val next : Option[Next] = None
 ) derives Encoder.AsObject, Decoder
 
 type Next = Node | String | NullValue
diff --git a/base/schema-scala3/test/inputs/schema/uuid.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/uuid.schema/default/TopLevel.scala
index 0b1d8f6..038194a 100644
--- a/base/schema-scala3/test/inputs/schema/uuid.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/uuid.schema/default/TopLevel.scala
@@ -8,10 +8,10 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
-    val arrNullable : Option[Seq[Option[String]]] = None,
-    val arrOne : Option[Seq[String]] = None,
-    val nullable : Option[String] = None,
     val one : String,
     val optional : Option[String] = None,
+    val nullable : Option[String] = None,
+    val arrOne : Option[Seq[String]] = None,
+    val arrNullable : Option[Seq[Option[String]]] = None,
     val unionWithEnum : String
 ) derives Encoder.AsObject, Decoder
diff --git a/base/schema-scala3/test/inputs/schema/vega-lite.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/vega-lite.schema/default/TopLevel.scala
index 0eed549..f14cc00 100644
--- a/base/schema-scala3/test/inputs/schema/vega-lite.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/vega-lite.schema/default/TopLevel.scala
@@ -604,6 +604,13 @@ case class MarkConfig (
      */
     val fill : Option[String] = None,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity : Option[Double] = None,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -615,13 +622,6 @@ case class MarkConfig (
      */
     val filled : Option[Boolean] = None,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity : Option[Double] = None,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -1251,11 +1251,6 @@ case class AxisConfig (
      */
     val tickRound : Option[Boolean] = None,
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    val ticks : Option[Boolean] = None,
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -1266,6 +1261,11 @@ case class AxisConfig (
      */
     val tickWidth : Option[Double] = None,
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    val ticks : Option[Boolean] = None,
+
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1581,11 +1581,6 @@ case class VGAxisConfig (
      */
     val tickRound : Option[Boolean] = None,
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    val ticks : Option[Boolean] = None,
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -1596,6 +1591,11 @@ case class VGAxisConfig (
      */
     val tickWidth : Option[Double] = None,
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    val ticks : Option[Boolean] = None,
+
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1735,6 +1735,13 @@ case class BarConfig (
      */
     val fill : Option[String] = None,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity : Option[Double] = None,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -1746,13 +1753,6 @@ case class BarConfig (
      */
     val filled : Option[Boolean] = None,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity : Option[Double] = None,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -3221,6 +3221,13 @@ case class TextConfig (
      */
     val fill : Option[String] = None,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity : Option[Double] = None,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -3232,13 +3239,6 @@ case class TextConfig (
      */
     val filled : Option[Boolean] = None,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity : Option[Double] = None,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -3452,6 +3452,13 @@ case class TickConfig (
      */
     val fill : Option[String] = None,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity : Option[Double] = None,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -3463,13 +3470,6 @@ case class TickConfig (
      */
     val filled : Option[Boolean] = None,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity : Option[Double] = None,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -6536,14 +6536,14 @@ case class Axis (
     val tickCount : Option[Double] = None,
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      */
-    val ticks : Option[Boolean] = None,
+    val tickSize : Option[Double] = None,
 
     /**
-     * The size in pixels of axis ticks.
+     * Boolean value that determines whether the axis should include ticks.
      */
-    val tickSize : Option[Double] = None,
+    val ticks : Option[Boolean] = None,
 
     /**
      * A title for the field. If `null`, the title will be removed.
@@ -7117,6 +7117,13 @@ case class MarkDef (
      */
     val fill : Option[String] = None,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity : Option[Double] = None,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -7128,13 +7135,6 @@ case class MarkDef (
      */
     val filled : Option[Boolean] = None,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity : Option[Double] = None,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-scala3-upickle/test/inputs/schema/accessors.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/accessors.schema/default/TopLevel.scala
index 0d21132..2ff0c32 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/accessors.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/accessors.schema/default/TopLevel.scala
@@ -66,10 +66,10 @@ end JsonExt
 
 
 case class TopLevel (
-    val bar : String,
+    val union : Union,
     val `enum` : EnumEnum,
     val foo : String,
-    val union : Union
+    val bar : String
 ) derives OptionPickler.ReadWriter
 
 enum EnumEnum : 
diff --git a/base/schema-scala3-upickle/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.scala
index 75d2612..7727953 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.scala
@@ -68,8 +68,8 @@ end JsonExt
 case class TopLevel (
     val amount : Double,
     val frequency : Frequency,
-    val description : Option[String] = None,
-    val `type` : Type
+    val `type` : Type,
+    val description : Option[String] = None
 ) derives OptionPickler.ReadWriter
 
 enum Frequency : 
diff --git a/base/schema-scala3-upickle/test/inputs/schema/bool-string.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/bool-string.schema/default/TopLevel.scala
index 18adbc4..e988651 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/bool-string.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/bool-string.schema/default/TopLevel.scala
@@ -66,11 +66,11 @@ end JsonExt
 
 
 case class TopLevel (
-    val arrNullable : Option[Seq[Option[String]]] = None,
-    val arrOne : Option[Seq[String]] = None,
-    val nullable : Option[String] = None,
     val one : String,
     val optional : Option[String] = None,
+    val nullable : Option[String] = None,
+    val arrOne : Option[Seq[String]] = None,
+    val arrNullable : Option[Seq[Option[String]]] = None,
     val unionWithBool : UnionWithBool,
     val unionWithBoolAndEnum : UnionWithBool
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/boolean-subschema.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/boolean-subschema.schema/default/TopLevel.scala
index 96d6337..d911e42 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/boolean-subschema.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/boolean-subschema.schema/default/TopLevel.scala
@@ -66,8 +66,8 @@ end JsonExt
 
 
 case class TopLevel (
+    val foo : String,
     val disallowed : Option[ujson.Value] = None,
     val empty : Seq[Option[ujson.Value]],
-    val foo : String,
     val impossible : Option[ujson.Value] = None
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/comment-injection.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/comment-injection.schema/default/TopLevel.scala
index d37ea9c..3af61e5 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/comment-injection.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/comment-injection.schema/default/TopLevel.scala
@@ -80,21 +80,6 @@ end JsonExt
  * }
  */
 case class TopLevel (
-    /**
-     * Ends with a backslash \
-     */
-    val trailingBackslash : Option[String] = None,
-
-    /**
-     * Ends with a quote "
-     */
-    val trailingQuote : Option[String] = None,
-
-    /**
-     * Ends with a triple quote """
-     */
-    val trailingTripleQuote : Option[String] = None,
-
     /**
      * Property delimiters:
      * * /
@@ -109,5 +94,20 @@ case class TopLevel (
      * }
      * }
      */
-    val value : String
+    val value : String,
+
+    /**
+     * Ends with a backslash \
+     */
+    val trailingBackslash : Option[String] = None,
+
+    /**
+     * Ends with a quote "
+     */
+    val trailingQuote : Option[String] = None,
+
+    /**
+     * Ends with a triple quote """
+     */
+    val trailingTripleQuote : Option[String] = None
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/const-non-string.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/const-non-string.schema/default/TopLevel.scala
index 7662e8d..760289f 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/const-non-string.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/const-non-string.schema/default/TopLevel.scala
@@ -66,11 +66,11 @@ end JsonExt
 
 
 case class TopLevel (
+    val version : Double,
     val amount : Long,
-    val enabled : Boolean,
-    val kind : Kind,
     val ratio : Double,
-    val version : Double
+    val enabled : Boolean,
+    val kind : Kind
 ) derives OptionPickler.ReadWriter
 
 enum Kind : 
diff --git a/base/schema-scala3-upickle/test/inputs/schema/date-time-or-string.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/date-time-or-string.schema/default/TopLevel.scala
index d94cadf..65e8152 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/date-time-or-string.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/date-time-or-string.schema/default/TopLevel.scala
@@ -66,6 +66,6 @@ end JsonExt
 
 
 case class TopLevel (
-    val bar : String,
-    val foo : String
+    val foo : String,
+    val bar : String
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/date-time.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/date-time.schema/default/TopLevel.scala
index ecd994b..27157ac 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/date-time.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/date-time.schema/default/TopLevel.scala
@@ -66,11 +66,11 @@ end JsonExt
 
 
 case class TopLevel (
-    val `complex-union-array` : Seq[ComplexUnionArray],
     val date : String,
-    val `date-time` : String,
     val time : String,
-    val `union-array` : Seq[String]
+    val `date-time` : String,
+    val `union-array` : Seq[String],
+    val `complex-union-array` : Seq[ComplexUnionArray]
 ) derives OptionPickler.ReadWriter
 
 type ComplexUnionArray = Long | String
diff --git a/base/schema-scala3-upickle/test/inputs/schema/description.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/description.schema/default/TopLevel.scala
index 3da8c4d..a1f227b 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/description.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/description.schema/default/TopLevel.scala
@@ -71,9 +71,9 @@ end JsonExt
  */
 case class TopLevel (
     /**
-     * A pretty boolean
+     * Either a number or a string
      */
-    val bar : Option[Boolean] = None,
+    val union : Union,
 
     /**
      * An enumeration
@@ -81,12 +81,13 @@ case class TopLevel (
     val `enum` : EnumEnum,
 
     val foo : Option[Double] = None,
-    val `object-or-string` : ObjectOrStringUnion,
 
     /**
-     * Either a number or a string
+     * A pretty boolean
      */
-    val union : Union
+    val bar : Option[Boolean] = None,
+
+    val `object-or-string` : ObjectOrStringUnion
 ) derives OptionPickler.ReadWriter
 
 type ObjectOrStringUnion = ObjectOrStringClass | String
diff --git a/base/schema-scala3-upickle/test/inputs/schema/direct-union.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/direct-union.schema/default/TopLevel.scala
index 5a79988..f3c470c 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/direct-union.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/direct-union.schema/default/TopLevel.scala
@@ -70,8 +70,8 @@ case class TopLevel (
 ) derives OptionPickler.ReadWriter
 
 case class Thing (
-    val optional : Option[Anything] = None,
-    val required : Anything
+    val required : Anything,
+    val optional : Option[Anything] = None
 ) derives OptionPickler.ReadWriter
 
 type Anything = Seq[Option[ujson.Value]] | Map[String, Option[ujson.Value]] | Boolean | Double | Long | String | NullValue
diff --git a/base/schema-scala3-upickle/test/inputs/schema/enum.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/enum.schema/default/TopLevel.scala
index 2cf5dda..63bc38a 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/enum.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/enum.schema/default/TopLevel.scala
@@ -66,11 +66,11 @@ end JsonExt
 
 
 case class TopLevel (
-    val arr : Option[Seq[Arr]] = None,
-    val `for` : Option[String] = None,
-    val gve : Gve,
     val lvc : Option[Lvc] = None,
-    val otherArr : Option[Seq[OtherArr]] = None
+    val gve : Gve,
+    val arr : Option[Seq[Arr]] = None,
+    val otherArr : Option[Seq[OtherArr]] = None,
+    val `for` : Option[String] = None
 ) derives OptionPickler.ReadWriter
 
 type Arr = OtherArr | Long
diff --git a/base/schema-scala3-upickle/test/inputs/schema/integer-string.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/integer-string.schema/default/TopLevel.scala
index 9fc4c02..0bd0215 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/integer-string.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/integer-string.schema/default/TopLevel.scala
@@ -66,11 +66,11 @@ end JsonExt
 
 
 case class TopLevel (
-    val arrNullable : Option[Seq[Option[String]]] = None,
-    val arrOne : Option[Seq[String]] = None,
-    val nullable : Option[String] = None,
     val one : String,
     val optional : Option[String] = None,
+    val nullable : Option[String] = None,
+    val arrOne : Option[Seq[String]] = None,
+    val arrNullable : Option[Seq[Option[String]]] = None,
     val unionWithInt : UnionWithInt,
     val unionWithIntAndEnum : UnionWithInt
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/integer-type.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/integer-type.schema/default/TopLevel.scala
index abd4792..7f8b29c 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/integer-type.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/integer-type.schema/default/TopLevel.scala
@@ -66,13 +66,13 @@ end JsonExt
 
 
 case class TopLevel (
+    val small_positive : Long,
+    val small_negative : Long,
+    val i32_range : Long,
     val above_i32_max : Long,
     val below_i32_min : Long,
-    val i32_range : Long,
-    val large_bounds : Long,
-    val only_maximum : Long,
     val only_minimum : Long,
-    val small_negative : Long,
-    val small_positive : Long,
-    val unbounded : Long
+    val only_maximum : Long,
+    val unbounded : Long,
+    val large_bounds : Long
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/light.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/light.schema/default/TopLevel.scala
index c8b5dc0..be5d3cc 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/light.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/light.schema/default/TopLevel.scala
@@ -70,7 +70,7 @@ case class TopLevel (
 ) derives OptionPickler.ReadWriter
 
 case class LightParams (
-    val app_id : String,
     val outlet_id : String,
+    val app_id : String,
     val rgba : String
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/min-max-items.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/min-max-items.schema/default/TopLevel.scala
index 4f56eb9..32cacbe 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/min-max-items.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/min-max-items.schema/default/TopLevel.scala
@@ -66,9 +66,9 @@ end JsonExt
 
 
 case class TopLevel (
+    val minOnly : Seq[String],
     val maxOnly : Seq[Long],
     val minAndMax : Seq[Double],
-    val minOnly : Seq[String],
     val plain : Seq[String],
     val unionItems : Seq[UnionItem]
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/minmax-integer.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/minmax-integer.schema/default/TopLevel.scala
index 24da064..b08eb1b 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/minmax-integer.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/minmax-integer.schema/default/TopLevel.scala
@@ -67,11 +67,11 @@ end JsonExt
 
 case class TopLevel (
     val free : Long,
-    val intersection : Long,
-    val max : Long,
     val min : Long,
+    val max : Long,
     val minmax : Long,
-    val minMaxIntersection : Long,
+    val union : Long,
     val minMaxUnion : Long,
-    val union : Long
+    val intersection : Long,
+    val minMaxIntersection : Long
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/minmax.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/minmax.schema/default/TopLevel.scala
index e5cb937..4ed7572 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/minmax.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/minmax.schema/default/TopLevel.scala
@@ -67,11 +67,11 @@ end JsonExt
 
 case class TopLevel (
     val free : Double,
-    val intersection : Double,
-    val max : Double,
     val min : Double,
+    val max : Double,
     val minmax : Double,
-    val minMaxIntersection : Double,
+    val union : Double,
     val minMaxUnion : Double,
-    val union : Double
+    val intersection : Double,
+    val minMaxIntersection : Double
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
index 419af7f..cd5b4d5 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
@@ -66,14 +66,14 @@ end JsonExt
 
 
 case class TopLevel (
-    val intersection : String,
-    val inUnion : InUnion,
-    val maxlength : String,
     val minlength : String,
-    val minMaxIntersection : String,
+    val maxlength : String,
     val minmaxlength : String,
+    val union : String,
+    val inUnion : InUnion,
     val minMaxUnion : String,
-    val union : String
+    val intersection : String,
+    val minMaxIntersection : String
 ) derives OptionPickler.ReadWriter
 
 type InUnion = Double | String
diff --git a/base/schema-scala3-upickle/test/inputs/schema/non-standard-ref.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/non-standard-ref.schema/default/TopLevel.scala
index e5e8956..a3384fc 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/non-standard-ref.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/non-standard-ref.schema/default/TopLevel.scala
@@ -66,7 +66,7 @@ end JsonExt
 
 
 case class TopLevel (
-    val bar : Long,
     val foo : Long,
+    val bar : Long,
     val quux : Boolean
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.scala
index 17711db..b206da4 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.scala
@@ -66,8 +66,8 @@ end JsonExt
 
 
 case class TopLevel (
-    val b : Option[String] = None,
-    val kind : Kind
+    val kind : Kind,
+    val b : Option[String] = None
 ) derives OptionPickler.ReadWriter
 
 enum Kind : 
diff --git a/base/schema-scala3-upickle/test/inputs/schema/optional-any.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/optional-any.schema/default/TopLevel.scala
index eadf4d9..fcb13a1 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/optional-any.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/optional-any.schema/default/TopLevel.scala
@@ -66,6 +66,6 @@ end JsonExt
 
 
 case class TopLevel (
-    val bar : Boolean,
-    val foo : Option[ujson.Value] = None
+    val foo : Option[ujson.Value] = None,
+    val bar : Boolean
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/optional-const-ref.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/optional-const-ref.schema/default/TopLevel.scala
index e48c1dc..ef8e20a 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/optional-const-ref.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/optional-const-ref.schema/default/TopLevel.scala
@@ -67,12 +67,12 @@ end JsonExt
 
 case class TopLevel (
     val coordinates : Option[Seq[Coordinate]] = None,
-    val count : Option[Long] = None,
-    val label : Option[String] = None,
     val requiredCoordinates : Seq[Coordinate],
+    val count : Option[Long] = None,
     val requiredCount : Long,
-    val requiredLabel : String,
-    val weight : Option[Double] = None
+    val weight : Option[Double] = None,
+    val label : Option[String] = None,
+    val requiredLabel : String
 ) derives OptionPickler.ReadWriter
 
 case class Coordinate (
diff --git a/base/schema-scala3-upickle/test/inputs/schema/optional-constraints.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/optional-constraints.schema/default/TopLevel.scala
index 102a725..329ce33 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/optional-constraints.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/optional-constraints.schema/default/TopLevel.scala
@@ -66,9 +66,9 @@ end JsonExt
 
 
 case class TopLevel (
-    val optDouble : Option[Double] = None,
+    val reqZeroMin : Long,
     val optInt : Option[Long] = None,
-    val optPattern : Option[String] = None,
+    val optDouble : Option[Double] = None,
     val optString : Option[String] = None,
-    val reqZeroMin : Long
+    val optPattern : Option[String] = None
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/optional-date-time.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/optional-date-time.schema/default/TopLevel.scala
index 004fe42..ffc72d9 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/optional-date-time.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/optional-date-time.schema/default/TopLevel.scala
@@ -66,10 +66,10 @@ end JsonExt
 
 
 case class TopLevel (
-    val `optional-date` : Option[String] = None,
-    val `optional-date-time` : Option[String] = None,
-    val `optional-time` : Option[String] = None,
     val `required-date` : String,
+    val `required-time` : String,
     val `required-date-time` : String,
-    val `required-time` : String
+    val `optional-date` : Option[String] = None,
+    val `optional-time` : Option[String] = None,
+    val `optional-date-time` : Option[String] = None
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/prefix-items.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/prefix-items.schema/default/TopLevel.scala
index 506d26c..664bc35 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/prefix-items.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/prefix-items.schema/default/TopLevel.scala
@@ -66,8 +66,8 @@ end JsonExt
 
 
 case class TopLevel (
-    val open : Seq[Open],
-    val tuple : Seq[Open]
+    val tuple : Seq[Open],
+    val open : Seq[Open]
 ) derives OptionPickler.ReadWriter
 
 type Open = Boolean | Long
diff --git a/head/schema-scala3-upickle/test/inputs/schema/property-order.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/property-order.schema/default/TopLevel.scala
new file mode 100644
index 0000000..af0580c
--- /dev/null
+++ b/head/schema-scala3-upickle/test/inputs/schema/property-order.schema/default/TopLevel.scala
@@ -0,0 +1,81 @@
+package quicktype
+
+// Custom pickler so that missing keys and JSON nulls both read as None,
+// and None is left out when writing (upickle's default for Option is a
+// JSON array).
+object OptionPickler extends upickle.AttributeTagged:
+    import upickle.default.Writer
+    import upickle.default.Reader
+    override implicit def OptionWriter[T: Writer]: Writer[Option[T]] =
+        implicitly[Writer[T]].comap[Option[T]] {
+            case None => null.asInstanceOf[T]
+            case Some(x) => x
+        }
+
+    override implicit def OptionReader[T: Reader]: Reader[Option[T]] = {
+        new Reader.Delegate[Any, Option[T]](implicitly[Reader[T]].map(Some(_))){
+        override def visitNull(index: Int) = None
+        }
+    }
+end OptionPickler
+
+// If a union has a null in, then we'll need this too...
+type NullValue = None.type
+given OptionPickler.ReadWriter[NullValue] = OptionPickler.readwriter[ujson.Value].bimap[NullValue](
+    _ => ujson.Null,
+    json => if json.isNull then None else throw new upickle.core.Abort("not null")
+)
+
+object JsonExt:
+    val valueReader = OptionPickler.readwriter[ujson.Value]
+
+    // upickle's built-in primitive readers are lenient -- the numeric and
+    // boolean readers accept strings, and the string reader accepts
+    // numbers and booleans -- so untagged unions need strict readers to
+    // pick the right member.
+    val strictString: OptionPickler.Reader[String] = valueReader.map {
+        case ujson.Str(s) => s
+        case json => throw new upickle.core.Abort("expected string, got " + json)
+    }
+    val strictLong: OptionPickler.Reader[Long] = valueReader.map {
+        case ujson.Num(n) if n.isWhole => n.toLong
+        case json => throw new upickle.core.Abort("expected integer, got " + json)
+    }
+    val strictDouble: OptionPickler.Reader[Double] = valueReader.map {
+        case ujson.Num(n) => n
+        case json => throw new upickle.core.Abort("expected number, got " + json)
+    }
+    val strictBoolean: OptionPickler.Reader[Boolean] = valueReader.map {
+        case ujson.Bool(b) => b
+        case json => throw new upickle.core.Abort("expected boolean, got " + json)
+    }
+
+    def badMerge[T](r1: => OptionPickler.Reader[?], rest: OptionPickler.Reader[?]*): OptionPickler.Reader[T] = valueReader.map { json =>
+        var t: T | Null = null
+        val stack       = Vector.newBuilder[Throwable]
+        (r1 +: rest).foreach { reader =>
+            if t == null then
+            try
+                t = OptionPickler.read[T](json, trace = true)(using reader.asInstanceOf[OptionPickler.Reader[T]])
+            catch
+                case exc => stack += exc
+        }
+        if t != null then t.nn else throw new Exception(json.toString(), stack.result().headOption.getOrElse(null))
+    }
+end JsonExt
+
+
+case class TopLevel (
+    val zebra : String,
+    val mango : Double,
+    val apple : Boolean,
+    val delta : String,
+    val banana : Long,
+    val ordered : Ordered
+) derives OptionPickler.ReadWriter
+
+case class Ordered (
+    val mango : Double,
+    val zebra : String,
+    val apple : Boolean
+) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/renaming-bug.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/renaming-bug.schema/default/TopLevel.scala
index 8ccd906..f3c21d8 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/renaming-bug.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/renaming-bug.schema/default/TopLevel.scala
@@ -73,13 +73,13 @@ case class TopLevel (
 
 case class Fruit (
     val apple : Option[Boolean] = None,
-    val berries : Option[Seq[Berry]] = None,
-    val orange : Option[Boolean] = None
+    val orange : Option[Boolean] = None,
+    val berries : Option[Seq[Berry]] = None
 ) derives OptionPickler.ReadWriter
 
 case class Berry (
-    val color : Option[Color] = None,
     val name : Option[String] = None,
+    val color : Option[Color] = None,
     val shapes : Option[Seq[Shape]] = None
 ) derives OptionPickler.ReadWriter
 
@@ -88,8 +88,8 @@ case class Color (
 ) derives OptionPickler.ReadWriter
 
 case class Shape (
-    val geometry : Option[Geometry] = None,
-    val history : Option[History] = None
+    val history : Option[History] = None,
+    val geometry : Option[Geometry] = None
 ) derives OptionPickler.ReadWriter
 
 case class Geometry (
@@ -106,9 +106,9 @@ case class RectShape (
 ) derives OptionPickler.ReadWriter
 
 case class Part (
-    val depth : Option[String] = None,
     val length : Option[String] = None,
-    val width : Option[String] = None
+    val width : Option[String] = None,
+    val depth : Option[String] = None
 ) derives OptionPickler.ReadWriter
 
 case class History (
@@ -116,12 +116,12 @@ case class History (
 ) derives OptionPickler.ReadWriter
 
 case class Vehicle (
-    val brand : Option[String] = None,
     val id : Option[String] = None,
-    val speed : Option[Speed] = None,
-    val subModule : Option[Boolean] = None,
     val `type` : Option[VehicleType] = None,
-    val year : Option[String] = None
+    val speed : Option[Speed] = None,
+    val year : Option[String] = None,
+    val brand : Option[String] = None,
+    val subModule : Option[Boolean] = None
 ) derives OptionPickler.ReadWriter
 
 case class Speed (
@@ -129,8 +129,8 @@ case class Speed (
 ) derives OptionPickler.ReadWriter
 
 case class Limit (
-    val maximum : Option[Double] = None,
-    val minimum : Option[Double] = None
+    val minimum : Option[Double] = None,
+    val maximum : Option[Double] = None
 ) derives OptionPickler.ReadWriter
 
 case class VehicleType (
diff --git a/base/schema-scala3-upickle/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.scala
index e17ea78..2b0a966 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.scala
@@ -66,13 +66,13 @@ end JsonExt
 
 
 case class TopLevel (
-    val next : Option[Next] = None,
-    val value : String
+    val value : String,
+    val next : Option[Next] = None
 ) derives OptionPickler.ReadWriter
 
 case class Node (
-    val next : Option[Next] = None,
-    val value : String
+    val value : String,
+    val next : Option[Next] = None
 ) derives OptionPickler.ReadWriter
 
 type Next = Node | String | NullValue
diff --git a/base/schema-scala3-upickle/test/inputs/schema/uuid.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/uuid.schema/default/TopLevel.scala
index d1ef9f9..1964fcf 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/uuid.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/uuid.schema/default/TopLevel.scala
@@ -66,10 +66,10 @@ end JsonExt
 
 
 case class TopLevel (
-    val arrNullable : Option[Seq[Option[String]]] = None,
-    val arrOne : Option[Seq[String]] = None,
-    val nullable : Option[String] = None,
     val one : String,
     val optional : Option[String] = None,
+    val nullable : Option[String] = None,
+    val arrOne : Option[Seq[String]] = None,
+    val arrNullable : Option[Seq[Option[String]]] = None,
     val unionWithEnum : String
 ) derives OptionPickler.ReadWriter
diff --git a/base/schema-scala3-upickle/test/inputs/schema/vega-lite.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/vega-lite.schema/default/TopLevel.scala
index 834ad3b..2b6f5c2 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/vega-lite.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/vega-lite.schema/default/TopLevel.scala
@@ -665,6 +665,13 @@ case class MarkConfig (
      */
     val fill : Option[String] = None,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity : Option[Double] = None,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -676,13 +683,6 @@ case class MarkConfig (
      */
     val filled : Option[Boolean] = None,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity : Option[Double] = None,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -1325,11 +1325,6 @@ case class AxisConfig (
      */
     val tickRound : Option[Boolean] = None,
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    val ticks : Option[Boolean] = None,
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -1340,6 +1335,11 @@ case class AxisConfig (
      */
     val tickWidth : Option[Double] = None,
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    val ticks : Option[Boolean] = None,
+
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1654,11 +1654,6 @@ case class VGAxisConfig (
      */
     val tickRound : Option[Boolean] = None,
 
-    /**
-     * Boolean value that determines whether the axis should include ticks.
-     */
-    val ticks : Option[Boolean] = None,
-
     /**
      * The size in pixels of axis ticks.
      */
@@ -1669,6 +1664,11 @@ case class VGAxisConfig (
      */
     val tickWidth : Option[Double] = None,
 
+    /**
+     * Boolean value that determines whether the axis should include ticks.
+     */
+    val ticks : Option[Boolean] = None,
+
     /**
      * Horizontal text alignment of axis titles.
      */
@@ -1808,6 +1808,13 @@ case class BarConfig (
      */
     val fill : Option[String] = None,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity : Option[Double] = None,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -1819,13 +1826,6 @@ case class BarConfig (
      */
     val filled : Option[Boolean] = None,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity : Option[Double] = None,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -3309,6 +3309,13 @@ case class TextConfig (
      */
     val fill : Option[String] = None,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity : Option[Double] = None,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -3320,13 +3327,6 @@ case class TextConfig (
      */
     val filled : Option[Boolean] = None,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity : Option[Double] = None,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -3540,6 +3540,13 @@ case class TickConfig (
      */
     val fill : Option[String] = None,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity : Option[Double] = None,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -3551,13 +3558,6 @@ case class TickConfig (
      */
     val filled : Option[Boolean] = None,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity : Option[Double] = None,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
@@ -6630,14 +6630,14 @@ case class Axis (
     val tickCount : Option[Double] = None,
 
     /**
-     * Boolean value that determines whether the axis should include ticks.
+     * The size in pixels of axis ticks.
      */
-    val ticks : Option[Boolean] = None,
+    val tickSize : Option[Double] = None,
 
     /**
-     * The size in pixels of axis ticks.
+     * Boolean value that determines whether the axis should include ticks.
      */
-    val tickSize : Option[Double] = None,
+    val ticks : Option[Boolean] = None,
 
     /**
      * A title for the field. If `null`, the title will be removed.
@@ -7209,6 +7209,13 @@ case class MarkDef (
      */
     val fill : Option[String] = None,
 
+    /**
+     * The fill opacity (value between [0,1]).
+     *
+     * __Default value:__ `1`
+     */
+    val fillOpacity : Option[Double] = None,
+
     /**
      * Whether the mark's color should be used as fill color instead of stroke color.
      *
@@ -7220,13 +7227,6 @@ case class MarkDef (
      */
     val filled : Option[Boolean] = None,
 
-    /**
-     * The fill opacity (value between [0,1]).
-     *
-     * __Default value:__ `1`
-     */
-    val fillOpacity : Option[Double] = None,
-
     /**
      * The typeface to set the text in (e.g., `"Helvetica Neue"`).
      */
diff --git a/base/schema-schema/test/inputs/schema/accessors.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/accessors.schema/default/TopLevel.schema
index 2ca2c30..7daad53 100644
--- a/base/schema-schema/test/inputs/schema/accessors.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/accessors.schema/default/TopLevel.schema
@@ -6,8 +6,8 @@
             "type": "object",
             "additionalProperties": false,
             "properties": {
-                "bar": {
-                    "type": "string"
+                "union": {
+                    "$ref": "#/definitions/Union"
                 },
                 "enum": {
                     "$ref": "#/definitions/Enum"
@@ -15,8 +15,8 @@
                 "foo": {
                     "type": "string"
                 },
-                "union": {
-                    "$ref": "#/definitions/Union"
+                "bar": {
+                    "type": "string"
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.schema
index 9cfd317..94b0bae 100644
--- a/base/schema-schema/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.schema
@@ -12,11 +12,11 @@
                 "frequency": {
                     "$ref": "#/definitions/Frequency"
                 },
-                "description": {
-                    "type": "string"
-                },
                 "type": {
                     "$ref": "#/definitions/Type"
+                },
+                "description": {
+                    "type": "string"
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/bool-string.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/bool-string.schema/default/TopLevel.schema
index 98347b9..75f223e 100644
--- a/base/schema-schema/test/inputs/schema/bool-string.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/bool-string.schema/default/TopLevel.schema
@@ -6,26 +6,13 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "arrNullable": {
-                    "type": "array",
-                    "items": {
-                        "anyOf": [
-                            {
-                                "type": "string",
-                                "format": "boolean"
-                            },
-                            {
-                                "type": "null"
-                            }
-                        ]
-                    }
+                "one": {
+                    "type": "string",
+                    "format": "boolean"
                 },
-                "arrOne": {
-                    "type": "array",
-                    "items": {
-                        "type": "string",
-                        "format": "boolean"
-                    }
+                "optional": {
+                    "type": "string",
+                    "format": "boolean"
                 },
                 "nullable": {
                     "anyOf": [
@@ -38,13 +25,26 @@
                         }
                     ]
                 },
-                "one": {
-                    "type": "string",
-                    "format": "boolean"
+                "arrOne": {
+                    "type": "array",
+                    "items": {
+                        "type": "string",
+                        "format": "boolean"
+                    }
                 },
-                "optional": {
-                    "type": "string",
-                    "format": "boolean"
+                "arrNullable": {
+                    "type": "array",
+                    "items": {
+                        "anyOf": [
+                            {
+                                "type": "string",
+                                "format": "boolean"
+                            },
+                            {
+                                "type": "null"
+                            }
+                        ]
+                    }
                 },
                 "unionWithBool": {
                     "$ref": "#/definitions/UnionWithBool"
diff --git a/base/schema-schema/test/inputs/schema/boolean-subschema.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/boolean-subschema.schema/default/TopLevel.schema
index 0697112..a1779aa 100644
--- a/base/schema-schema/test/inputs/schema/boolean-subschema.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/boolean-subschema.schema/default/TopLevel.schema
@@ -6,14 +6,14 @@
             "type": "object",
             "additionalProperties": false,
             "properties": {
+                "foo": {
+                    "type": "string"
+                },
                 "disallowed": {},
                 "empty": {
                     "type": "array",
                     "items": {}
                 },
-                "foo": {
-                    "type": "string"
-                },
                 "impossible": {}
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/comment-injection.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/comment-injection.schema/default/TopLevel.schema
index 423a004..b2a0ea9 100644
--- a/base/schema-schema/test/inputs/schema/comment-injection.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/comment-injection.schema/default/TopLevel.schema
@@ -6,6 +6,10 @@
             "type": "object",
             "additionalProperties": false,
             "properties": {
+                "value": {
+                    "type": "string",
+                    "description": "Property delimiters:\n*/\n/*\n{-\n-}\n\"\"\"\n</summary> & <br>\n}\n}\n}\n}\n}"
+                },
                 "trailingBackslash": {
                     "type": "string",
                     "description": "Ends with a backslash \\"
@@ -17,10 +21,6 @@
                 "trailingTripleQuote": {
                     "type": "string",
                     "description": "Ends with a triple quote \"\"\""
-                },
-                "value": {
-                    "type": "string",
-                    "description": "Property delimiters:\n*/\n/*\n{-\n-}\n\"\"\"\n</summary> & <br>\n}\n}\n}\n}\n}"
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/const-non-string.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/const-non-string.schema/default/TopLevel.schema
index 1b7d0b9..0f3c4fa 100644
--- a/base/schema-schema/test/inputs/schema/const-non-string.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/const-non-string.schema/default/TopLevel.schema
@@ -6,20 +6,20 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
+                "version": {
+                    "type": "number"
+                },
                 "amount": {
                     "type": "integer"
                 },
+                "ratio": {
+                    "type": "number"
+                },
                 "enabled": {
                     "type": "boolean"
                 },
                 "kind": {
                     "$ref": "#/definitions/Kind"
-                },
-                "ratio": {
-                    "type": "number"
-                },
-                "version": {
-                    "type": "number"
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/date-time-or-string.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/date-time-or-string.schema/default/TopLevel.schema
index b841671..aa014bf 100644
--- a/base/schema-schema/test/inputs/schema/date-time-or-string.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/date-time-or-string.schema/default/TopLevel.schema
@@ -6,11 +6,11 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "bar": {
-                    "$ref": "#/definitions/BarUnion"
-                },
                 "foo": {
                     "type": "string"
+                },
+                "bar": {
+                    "$ref": "#/definitions/BarUnion"
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/date-time.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/date-time.schema/default/TopLevel.schema
index ac88afa..ff331f4 100644
--- a/base/schema-schema/test/inputs/schema/date-time.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/date-time.schema/default/TopLevel.schema
@@ -6,29 +6,29 @@
             "type": "object",
             "additionalProperties": false,
             "properties": {
-                "complex-union-array": {
-                    "type": "array",
-                    "items": {
-                        "$ref": "#/definitions/ComplexUnionArrayElement"
-                    }
-                },
                 "date": {
                     "type": "string",
                     "format": "date"
                 },
-                "date-time": {
-                    "type": "string",
-                    "format": "date-time"
-                },
                 "time": {
                     "type": "string",
                     "format": "time"
                 },
+                "date-time": {
+                    "type": "string",
+                    "format": "date-time"
+                },
                 "union-array": {
                     "type": "array",
                     "items": {
                         "$ref": "#/definitions/UnionArray"
                     }
+                },
+                "complex-union-array": {
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/ComplexUnionArrayElement"
+                    }
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/description.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/description.schema/default/TopLevel.schema
index 7ceba97..1f76849 100644
--- a/base/schema-schema/test/inputs/schema/description.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/description.schema/default/TopLevel.schema
@@ -6,9 +6,9 @@
             "type": "object",
             "additionalProperties": false,
             "properties": {
-                "bar": {
-                    "type": "boolean",
-                    "description": "A pretty boolean"
+                "union": {
+                    "$ref": "#/definitions/Union",
+                    "description": "Either a number or a string"
                 },
                 "enum": {
                     "$ref": "#/definitions/Enum",
@@ -17,12 +17,12 @@
                 "foo": {
                     "type": "number"
                 },
+                "bar": {
+                    "type": "boolean",
+                    "description": "A pretty boolean"
+                },
                 "object-or-string": {
                     "$ref": "#/definitions/ObjectOrStringUnion"
-                },
-                "union": {
-                    "$ref": "#/definitions/Union",
-                    "description": "Either a number or a string"
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/direct-union.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/direct-union.schema/default/TopLevel.schema
index 4e9f88a..a7cd600 100644
--- a/base/schema-schema/test/inputs/schema/direct-union.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/direct-union.schema/default/TopLevel.schema
@@ -22,10 +22,10 @@
             "type": "object",
             "additionalProperties": false,
             "properties": {
-                "optional": {
+                "required": {
                     "$ref": "#/definitions/Anything"
                 },
-                "required": {
+                "optional": {
                     "$ref": "#/definitions/Anything"
                 }
             },
diff --git a/base/schema-schema/test/inputs/schema/enum.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/enum.schema/default/TopLevel.schema
index ea92771..218af6b 100644
--- a/base/schema-schema/test/inputs/schema/enum.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/enum.schema/default/TopLevel.schema
@@ -6,26 +6,26 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
+                "lvc": {
+                    "$ref": "#/definitions/Lvc"
+                },
+                "gve": {
+                    "$ref": "#/definitions/Gve"
+                },
                 "arr": {
                     "type": "array",
                     "items": {
                         "$ref": "#/definitions/Arr"
                     }
                 },
-                "for": {
-                    "type": "string"
-                },
-                "gve": {
-                    "$ref": "#/definitions/Gve"
-                },
-                "lvc": {
-                    "$ref": "#/definitions/Lvc"
-                },
                 "otherArr": {
                     "type": "array",
                     "items": {
                         "$ref": "#/definitions/OtherArr"
                     }
+                },
+                "for": {
+                    "type": "string"
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/integer-string.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/integer-string.schema/default/TopLevel.schema
index 587ff6b..0fbf7be 100644
--- a/base/schema-schema/test/inputs/schema/integer-string.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/integer-string.schema/default/TopLevel.schema
@@ -6,26 +6,13 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "arrNullable": {
-                    "type": "array",
-                    "items": {
-                        "anyOf": [
-                            {
-                                "type": "string",
-                                "format": "integer"
-                            },
-                            {
-                                "type": "null"
-                            }
-                        ]
-                    }
+                "one": {
+                    "type": "string",
+                    "format": "integer"
                 },
-                "arrOne": {
-                    "type": "array",
-                    "items": {
-                        "type": "string",
-                        "format": "integer"
-                    }
+                "optional": {
+                    "type": "string",
+                    "format": "integer"
                 },
                 "nullable": {
                     "anyOf": [
@@ -38,13 +25,26 @@
                         }
                     ]
                 },
-                "one": {
-                    "type": "string",
-                    "format": "integer"
+                "arrOne": {
+                    "type": "array",
+                    "items": {
+                        "type": "string",
+                        "format": "integer"
+                    }
                 },
-                "optional": {
-                    "type": "string",
-                    "format": "integer"
+                "arrNullable": {
+                    "type": "array",
+                    "items": {
+                        "anyOf": [
+                            {
+                                "type": "string",
+                                "format": "integer"
+                            },
+                            {
+                                "type": "null"
+                            }
+                        ]
+                    }
                 },
                 "unionWithInt": {
                     "$ref": "#/definitions/UnionWithInt"
diff --git a/base/schema-schema/test/inputs/schema/integer-type.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/integer-type.schema/default/TopLevel.schema
index 0e7926e..84c224f 100644
--- a/base/schema-schema/test/inputs/schema/integer-type.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/integer-type.schema/default/TopLevel.schema
@@ -6,14 +6,14 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "above_i32_max": {
+                "small_positive": {
                     "type": "integer",
                     "minimum": 0,
-                    "maximum": 2147483648
+                    "maximum": 100
                 },
-                "below_i32_min": {
+                "small_negative": {
                     "type": "integer",
-                    "minimum": -2147483649,
+                    "minimum": -100,
                     "maximum": 0
                 },
                 "i32_range": {
@@ -21,31 +21,31 @@
                     "minimum": -2147483648,
                     "maximum": 2147483647
                 },
-                "large_bounds": {
+                "above_i32_max": {
                     "type": "integer",
-                    "minimum": -9007199254740991,
-                    "maximum": 9007199254740991
+                    "minimum": 0,
+                    "maximum": 2147483648
                 },
-                "only_maximum": {
+                "below_i32_min": {
                     "type": "integer",
+                    "minimum": -2147483649,
                     "maximum": 0
                 },
                 "only_minimum": {
                     "type": "integer",
                     "minimum": 0
                 },
-                "small_negative": {
+                "only_maximum": {
                     "type": "integer",
-                    "minimum": -100,
                     "maximum": 0
                 },
-                "small_positive": {
-                    "type": "integer",
-                    "minimum": 0,
-                    "maximum": 100
-                },
                 "unbounded": {
                     "type": "integer"
+                },
+                "large_bounds": {
+                    "type": "integer",
+                    "minimum": -9007199254740991,
+                    "maximum": 9007199254740991
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/keyword-unions.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/keyword-unions.schema/default/TopLevel.schema
index 81438ca..28f878d 100644
--- a/base/schema-schema/test/inputs/schema/keyword-unions.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/keyword-unions.schema/default/TopLevel.schema
@@ -234,9 +234,6 @@
                 "double": {
                     "$ref": "#/definitions/UnionDouble"
                 },
-                "dummy": {
-                    "type": "number"
-                },
                 "dynamic": {
                     "$ref": "#/definitions/UnionDynamic"
                 },
@@ -393,12 +390,12 @@
                 "internal": {
                     "$ref": "#/definitions/UnionInternal"
                 },
-                "is": {
-                    "$ref": "#/definitions/UnionIs"
-                },
                 "iterable": {
                     "$ref": "#/definitions/UnionIterable"
                 },
+                "is": {
+                    "$ref": "#/definitions/UnionIs"
+                },
                 "jdec": {
                     "$ref": "#/definitions/UnionJdec"
                 },
@@ -836,6 +833,9 @@
                 },
                 "yield": {
                     "$ref": "#/definitions/UnionYield"
+                },
+                "dummy": {
+                    "type": "number"
                 }
             },
             "required": [],
diff --git a/base/schema-schema/test/inputs/schema/light.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/light.schema/default/TopLevel.schema
index f7a1cb3..dd6a91e 100644
--- a/base/schema-schema/test/inputs/schema/light.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/light.schema/default/TopLevel.schema
@@ -19,10 +19,10 @@
             "type": "object",
             "additionalProperties": false,
             "properties": {
-                "app_id": {
+                "outlet_id": {
                     "type": "string"
                 },
-                "outlet_id": {
+                "app_id": {
                     "type": "string"
                 },
                 "rgba": {
diff --git a/base/schema-schema/test/inputs/schema/min-max-items.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/min-max-items.schema/default/TopLevel.schema
index 978016d..b4b97b1 100644
--- a/base/schema-schema/test/inputs/schema/min-max-items.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/min-max-items.schema/default/TopLevel.schema
@@ -6,6 +6,13 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
+                "minOnly": {
+                    "type": "array",
+                    "items": {
+                        "type": "string"
+                    },
+                    "minItems": 2
+                },
                 "maxOnly": {
                     "type": "array",
                     "items": {
@@ -21,13 +28,6 @@
                     "minItems": 1,
                     "maxItems": 4
                 },
-                "minOnly": {
-                    "type": "array",
-                    "items": {
-                        "type": "string"
-                    },
-                    "minItems": 2
-                },
                 "plain": {
                     "type": "array",
                     "items": {
diff --git a/base/schema-schema/test/inputs/schema/minmax-integer.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/minmax-integer.schema/default/TopLevel.schema
index cae4b1a..898781e 100644
--- a/base/schema-schema/test/inputs/schema/minmax-integer.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/minmax-integer.schema/default/TopLevel.schema
@@ -9,36 +9,36 @@
                 "free": {
                     "type": "integer"
                 },
-                "intersection": {
+                "min": {
                     "type": "integer",
-                    "minimum": 4,
-                    "maximum": 5
+                    "minimum": 3
                 },
                 "max": {
                     "type": "integer",
                     "maximum": 5
                 },
-                "min": {
-                    "type": "integer",
-                    "minimum": 3
-                },
                 "minmax": {
                     "type": "integer",
                     "minimum": 3,
                     "maximum": 5
                 },
-                "minMaxIntersection": {
+                "union": {
                     "type": "integer",
                     "minimum": 3,
-                    "maximum": 5
+                    "maximum": 6
                 },
                 "minMaxUnion": {
                     "type": "integer"
                 },
-                "union": {
+                "intersection": {
+                    "type": "integer",
+                    "minimum": 4,
+                    "maximum": 5
+                },
+                "minMaxIntersection": {
                     "type": "integer",
                     "minimum": 3,
-                    "maximum": 6
+                    "maximum": 5
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/minmax.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/minmax.schema/default/TopLevel.schema
index bf17d52..3e0d3a7 100644
--- a/base/schema-schema/test/inputs/schema/minmax.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/minmax.schema/default/TopLevel.schema
@@ -9,36 +9,36 @@
                 "free": {
                     "type": "number"
                 },
-                "intersection": {
+                "min": {
                     "type": "number",
-                    "minimum": 4,
-                    "maximum": 5
+                    "minimum": 3
                 },
                 "max": {
                     "type": "number",
                     "maximum": 5
                 },
-                "min": {
-                    "type": "number",
-                    "minimum": 3
-                },
                 "minmax": {
                     "type": "number",
                     "minimum": 3,
                     "maximum": 5
                 },
-                "minMaxIntersection": {
+                "union": {
                     "type": "number",
                     "minimum": 3,
-                    "maximum": 5
+                    "maximum": 6
                 },
                 "minMaxUnion": {
                     "type": "number"
                 },
-                "union": {
+                "intersection": {
+                    "type": "number",
+                    "minimum": 4,
+                    "maximum": 5
+                },
+                "minMaxIntersection": {
                     "type": "number",
                     "minimum": 3,
-                    "maximum": 6
+                    "maximum": 5
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/minmaxlength.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/minmaxlength.schema/default/TopLevel.schema
index a2fbe0e..4d03357 100644
--- a/base/schema-schema/test/inputs/schema/minmaxlength.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/minmaxlength.schema/default/TopLevel.schema
@@ -6,39 +6,39 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "intersection": {
+                "minlength": {
                     "type": "string",
-                    "minLength": 4,
-                    "maxLength": 5
-                },
-                "inUnion": {
-                    "$ref": "#/definitions/InUnion"
+                    "minLength": 3
                 },
                 "maxlength": {
                     "type": "string",
                     "maxLength": 5
                 },
-                "minlength": {
-                    "type": "string",
-                    "minLength": 3
-                },
-                "minMaxIntersection": {
+                "minmaxlength": {
                     "type": "string",
                     "minLength": 3,
                     "maxLength": 5
                 },
-                "minmaxlength": {
+                "union": {
                     "type": "string",
                     "minLength": 3,
-                    "maxLength": 5
+                    "maxLength": 6
+                },
+                "inUnion": {
+                    "$ref": "#/definitions/InUnion"
                 },
                 "minMaxUnion": {
                     "type": "string"
                 },
-                "union": {
+                "intersection": {
+                    "type": "string",
+                    "minLength": 4,
+                    "maxLength": 5
+                },
+                "minMaxIntersection": {
                     "type": "string",
                     "minLength": 3,
-                    "maxLength": 6
+                    "maxLength": 5
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/non-standard-ref.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/non-standard-ref.schema/default/TopLevel.schema
index 42bad4f..0e431b6 100644
--- a/base/schema-schema/test/inputs/schema/non-standard-ref.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/non-standard-ref.schema/default/TopLevel.schema
@@ -6,10 +6,10 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "bar": {
+                "foo": {
                     "type": "integer"
                 },
-                "foo": {
+                "bar": {
                     "type": "integer"
                 },
                 "quux": {
diff --git a/base/schema-schema/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.schema
index 8258c0d..d39c687 100644
--- a/base/schema-schema/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.schema
@@ -6,6 +6,9 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
+                "kind": {
+                    "$ref": "#/definitions/Kind"
+                },
                 "b": {
                     "anyOf": [
                         {
@@ -15,9 +18,6 @@
                             "type": "string"
                         }
                     ]
-                },
-                "kind": {
-                    "$ref": "#/definitions/Kind"
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/optional-any.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/optional-any.schema/default/TopLevel.schema
index cdc0db0..6080338 100644
--- a/base/schema-schema/test/inputs/schema/optional-any.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/optional-any.schema/default/TopLevel.schema
@@ -6,10 +6,10 @@
             "type": "object",
             "additionalProperties": false,
             "properties": {
+                "foo": {},
                 "bar": {
                     "type": "boolean"
-                },
-                "foo": {}
+                }
             },
             "required": [
                 "bar"
diff --git a/base/schema-schema/test/inputs/schema/optional-const-ref.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/optional-const-ref.schema/default/TopLevel.schema
index d1e7515..65b0d3d 100644
--- a/base/schema-schema/test/inputs/schema/optional-const-ref.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/optional-const-ref.schema/default/TopLevel.schema
@@ -12,36 +12,36 @@
                         "$ref": "#/definitions/Coordinate"
                     }
                 },
-                "count": {
-                    "type": "integer",
-                    "minimum": 1,
-                    "maximum": 100
-                },
-                "label": {
-                    "type": "string",
-                    "minLength": 2,
-                    "maxLength": 16
-                },
                 "requiredCoordinates": {
                     "type": "array",
                     "items": {
                         "$ref": "#/definitions/Coordinate"
                     }
                 },
-                "requiredCount": {
+                "count": {
                     "type": "integer",
                     "minimum": 1,
                     "maximum": 100
                 },
-                "requiredLabel": {
-                    "type": "string",
-                    "minLength": 2,
-                    "maxLength": 16
+                "requiredCount": {
+                    "type": "integer",
+                    "minimum": 1,
+                    "maximum": 100
                 },
                 "weight": {
                     "type": "number",
                     "minimum": 0.5,
                     "maximum": 99.5
+                },
+                "label": {
+                    "type": "string",
+                    "minLength": 2,
+                    "maxLength": 16
+                },
+                "requiredLabel": {
+                    "type": "string",
+                    "minLength": 2,
+                    "maxLength": 16
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/optional-constraints.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/optional-constraints.schema/default/TopLevel.schema
index 67a03cd..f0448b2 100644
--- a/base/schema-schema/test/inputs/schema/optional-constraints.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/optional-constraints.schema/default/TopLevel.schema
@@ -6,29 +6,29 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "optDouble": {
-                    "type": "number",
-                    "minimum": 0.5,
-                    "maximum": 99.5
+                "reqZeroMin": {
+                    "type": "integer",
+                    "minimum": 0,
+                    "maximum": 100
                 },
                 "optInt": {
                     "type": "integer",
                     "minimum": 0,
                     "maximum": 100
                 },
-                "optPattern": {
-                    "type": "string",
-                    "pattern": "^[a-z]+$"
+                "optDouble": {
+                    "type": "number",
+                    "minimum": 0.5,
+                    "maximum": 99.5
                 },
                 "optString": {
                     "type": "string",
                     "minLength": 3,
                     "maxLength": 10
                 },
-                "reqZeroMin": {
-                    "type": "integer",
-                    "minimum": 0,
-                    "maximum": 100
+                "optPattern": {
+                    "type": "string",
+                    "pattern": "^[a-z]+$"
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/optional-date-time.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/optional-date-time.schema/default/TopLevel.schema
index 8abb6fe..1aef1b8 100644
--- a/base/schema-schema/test/inputs/schema/optional-date-time.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/optional-date-time.schema/default/TopLevel.schema
@@ -6,29 +6,29 @@
             "type": "object",
             "additionalProperties": false,
             "properties": {
-                "optional-date": {
+                "required-date": {
                     "type": "string",
                     "format": "date"
                 },
-                "optional-date-time": {
+                "required-time": {
                     "type": "string",
-                    "format": "date-time"
+                    "format": "time"
                 },
-                "optional-time": {
+                "required-date-time": {
                     "type": "string",
-                    "format": "time"
+                    "format": "date-time"
                 },
-                "required-date": {
+                "optional-date": {
                     "type": "string",
                     "format": "date"
                 },
-                "required-date-time": {
+                "optional-time": {
                     "type": "string",
-                    "format": "date-time"
+                    "format": "time"
                 },
-                "required-time": {
+                "optional-date-time": {
                     "type": "string",
-                    "format": "time"
+                    "format": "date-time"
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/prefix-items.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/prefix-items.schema/default/TopLevel.schema
index 465f683..39891c3 100644
--- a/base/schema-schema/test/inputs/schema/prefix-items.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/prefix-items.schema/default/TopLevel.schema
@@ -6,13 +6,13 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "open": {
+                "tuple": {
                     "type": "array",
                     "items": {
                         "$ref": "#/definitions/Open"
                     }
                 },
-                "tuple": {
+                "open": {
                     "type": "array",
                     "items": {
                         "$ref": "#/definitions/Open"
diff --git a/head/schema-schema/test/inputs/schema/property-order.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/property-order.schema/default/TopLevel.schema
new file mode 100644
index 0000000..1576685
--- /dev/null
+++ b/head/schema-schema/test/inputs/schema/property-order.schema/default/TopLevel.schema
@@ -0,0 +1,60 @@
+{
+    "$schema": "http://json-schema.org/draft-06/schema#",
+    "$ref": "#/definitions/TopLevel",
+    "definitions": {
+        "TopLevel": {
+            "type": "object",
+            "additionalProperties": false,
+            "properties": {
+                "zebra": {
+                    "type": "string"
+                },
+                "mango": {
+                    "type": "number"
+                },
+                "apple": {
+                    "type": "boolean"
+                },
+                "delta": {
+                    "type": "string"
+                },
+                "banana": {
+                    "type": "integer"
+                },
+                "ordered": {
+                    "$ref": "#/definitions/Ordered"
+                }
+            },
+            "required": [
+                "apple",
+                "banana",
+                "delta",
+                "mango",
+                "ordered",
+                "zebra"
+            ],
+            "title": "TopLevel"
+        },
+        "Ordered": {
+            "type": "object",
+            "additionalProperties": false,
+            "properties": {
+                "mango": {
+                    "type": "number"
+                },
+                "zebra": {
+                    "type": "string"
+                },
+                "apple": {
+                    "type": "boolean"
+                }
+            },
+            "required": [
+                "apple",
+                "mango",
+                "zebra"
+            ],
+            "title": "Ordered"
+        }
+    }
+}
diff --git a/base/schema-schema/test/inputs/schema/renaming-bug.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/renaming-bug.schema/default/TopLevel.schema
index e024755..4a10c74 100644
--- a/base/schema-schema/test/inputs/schema/renaming-bug.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/renaming-bug.schema/default/TopLevel.schema
@@ -33,14 +33,14 @@
                 "apple": {
                     "type": "boolean"
                 },
+                "orange": {
+                    "type": "boolean"
+                },
                 "berries": {
                     "type": "array",
                     "items": {
                         "$ref": "#/definitions/Berry"
                     }
-                },
-                "orange": {
-                    "type": "boolean"
                 }
             },
             "required": [],
@@ -50,13 +50,13 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "color": {
-                    "$ref": "#/definitions/Color"
-                },
                 "name": {
                     "type": "string",
                     "minLength": 1
                 },
+                "color": {
+                    "$ref": "#/definitions/Color"
+                },
                 "shapes": {
                     "type": "array",
                     "items": {
@@ -82,11 +82,11 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "geometry": {
-                    "$ref": "#/definitions/Geometry"
-                },
                 "history": {
                     "$ref": "#/definitions/History"
+                },
+                "geometry": {
+                    "$ref": "#/definitions/Geometry"
                 }
             },
             "required": [],
@@ -138,14 +138,14 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "depth": {
-                    "type": "string"
-                },
                 "length": {
                     "type": "string"
                 },
                 "width": {
                     "type": "string"
+                },
+                "depth": {
+                    "type": "string"
                 }
             },
             "required": [],
@@ -166,24 +166,24 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "brand": {
-                    "type": "string"
-                },
                 "id": {
                     "type": "string",
                     "minLength": 1
                 },
-                "speed": {
-                    "$ref": "#/definitions/Speed"
-                },
-                "subModule": {
-                    "type": "boolean"
-                },
                 "type": {
                     "$ref": "#/definitions/VehicleType"
                 },
+                "speed": {
+                    "$ref": "#/definitions/Speed"
+                },
                 "year": {
                     "type": "string"
+                },
+                "brand": {
+                    "type": "string"
+                },
+                "subModule": {
+                    "type": "boolean"
                 }
             },
             "required": [],
@@ -204,10 +204,10 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "maximum": {
+                "minimum": {
                     "type": "number"
                 },
-                "minimum": {
+                "maximum": {
                     "type": "number"
                 }
             },
diff --git a/base/schema-schema/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.schema
index 8696324..3d547a2 100644
--- a/base/schema-schema/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.schema
@@ -6,11 +6,11 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "next": {
-                    "$ref": "#/definitions/Next"
-                },
                 "value": {
                     "type": "string"
+                },
+                "next": {
+                    "$ref": "#/definitions/Next"
                 }
             },
             "required": [
@@ -22,11 +22,11 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "next": {
-                    "$ref": "#/definitions/Next"
-                },
                 "value": {
                     "type": "string"
+                },
+                "next": {
+                    "$ref": "#/definitions/Next"
                 }
             },
             "required": [
diff --git a/base/schema-schema/test/inputs/schema/uuid.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/uuid.schema/default/TopLevel.schema
index 7c8afac..6557ce2 100644
--- a/base/schema-schema/test/inputs/schema/uuid.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/uuid.schema/default/TopLevel.schema
@@ -6,26 +6,13 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
-                "arrNullable": {
-                    "type": "array",
-                    "items": {
-                        "anyOf": [
-                            {
-                                "type": "null"
-                            },
-                            {
-                                "type": "string",
-                                "format": "uuid"
-                            }
-                        ]
-                    }
+                "one": {
+                    "type": "string",
+                    "format": "uuid"
                 },
-                "arrOne": {
-                    "type": "array",
-                    "items": {
-                        "type": "string",
-                        "format": "uuid"
-                    }
+                "optional": {
+                    "type": "string",
+                    "format": "uuid"
                 },
                 "nullable": {
                     "anyOf": [
@@ -38,13 +25,26 @@
                         }
                     ]
                 },
-                "one": {
-                    "type": "string",
-                    "format": "uuid"
+                "arrOne": {
+                    "type": "array",
+                    "items": {
+                        "type": "string",
+                        "format": "uuid"
+                    }
                 },
-                "optional": {
-                    "type": "string",
-                    "format": "uuid"
+                "arrNullable": {
+                    "type": "array",
+                    "items": {
+                        "anyOf": [
+                            {
+                                "type": "null"
+                            },
+                            {
+                                "type": "string",
+                                "format": "uuid"
+                            }
+                        ]
+                    }
                 },
                 "unionWithEnum": {
                     "$ref": "#/definitions/UnionWithEnumUnion"
diff --git a/base/schema-schema/test/inputs/schema/vega-lite.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/vega-lite.schema/default/TopLevel.schema
index acaeea5..409e4b6 100644
--- a/base/schema-schema/test/inputs/schema/vega-lite.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/vega-lite.schema/default/TopLevel.schema
@@ -335,16 +335,16 @@
                     "type": "string",
                     "description": "Default Fill Color.  This has higher precedence than config.color\n\n__Default value:__ (None)"
                 },
-                "filled": {
-                    "type": "boolean",
-                    "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config)."
-                },
                 "fillOpacity": {
                     "type": "number",
                     "minimum": 0,
                     "maximum": 1,
                     "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`"
                 },
+                "filled": {
+                    "type": "boolean",
+                    "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config)."
+                },
                 "font": {
                     "type": "string",
                     "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`)."
@@ -552,10 +552,6 @@
                     "type": "boolean",
                     "description": "Boolean flag indicating if pixel position values should be rounded to the nearest integer."
                 },
-                "ticks": {
-                    "type": "boolean",
-                    "description": "Boolean value that determines whether the axis should include ticks."
-                },
                 "tickSize": {
                     "type": "number",
                     "minimum": 0,
@@ -566,6 +562,10 @@
                     "minimum": 0,
                     "description": "The width, in pixels, of ticks."
                 },
+                "ticks": {
+                    "type": "boolean",
+                    "description": "Boolean value that determines whether the axis should include ticks."
+                },
                 "titleAlign": {
                     "type": "string",
                     "description": "Horizontal text alignment of axis titles."
@@ -725,10 +725,6 @@
                     "type": "boolean",
                     "description": "Boolean flag indicating if pixel position values should be rounded to the nearest integer."
                 },
-                "ticks": {
-                    "type": "boolean",
-                    "description": "Boolean value that determines whether the axis should include ticks."
-                },
                 "tickSize": {
                     "type": "number",
                     "minimum": 0,
@@ -739,6 +735,10 @@
                     "minimum": 0,
                     "description": "The width, in pixels, of ticks."
                 },
+                "ticks": {
+                    "type": "boolean",
+                    "description": "Boolean value that determines whether the axis should include ticks."
+                },
                 "titleAlign": {
                     "type": "string",
                     "description": "Horizontal text alignment of axis titles."
@@ -846,16 +846,16 @@
                     "type": "string",
                     "description": "Default Fill Color.  This has higher precedence than config.color\n\n__Default value:__ (None)"
                 },
-                "filled": {
-                    "type": "boolean",
-                    "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config)."
-                },
                 "fillOpacity": {
                     "type": "number",
                     "minimum": 0,
                     "maximum": 1,
                     "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`"
                 },
+                "filled": {
+                    "type": "boolean",
+                    "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config)."
+                },
                 "font": {
                     "type": "string",
                     "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`)."
@@ -1795,16 +1795,16 @@
                     "type": "string",
                     "description": "Default Fill Color.  This has higher precedence than config.color\n\n__Default value:__ (None)"
                 },
-                "filled": {
-                    "type": "boolean",
-                    "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config)."
-                },
                 "fillOpacity": {
                     "type": "number",
                     "minimum": 0,
                     "maximum": 1,
                     "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`"
                 },
+                "filled": {
+                    "type": "boolean",
+                    "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config)."
+                },
                 "font": {
                     "type": "string",
                     "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`)."
@@ -1950,16 +1950,16 @@
                     "type": "string",
                     "description": "Default Fill Color.  This has higher precedence than config.color\n\n__Default value:__ (None)"
                 },
-                "filled": {
-                    "type": "boolean",
-                    "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config)."
-                },
                 "fillOpacity": {
                     "type": "number",
                     "minimum": 0,
                     "maximum": 1,
                     "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`"
                 },
+                "filled": {
+                    "type": "boolean",
+                    "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config)."
+                },
                 "font": {
                     "type": "string",
                     "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`)."
@@ -3316,15 +3316,15 @@
                     "type": "number",
                     "description": "A desired number of ticks, for axes visualizing quantitative scales. The resulting number\nmay be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the\nunderlying scale's range."
                 },
-                "ticks": {
-                    "type": "boolean",
-                    "description": "Boolean value that determines whether the axis should include ticks."
-                },
                 "tickSize": {
                     "type": "number",
                     "minimum": 0,
                     "description": "The size in pixels of axis ticks."
                 },
+                "ticks": {
+                    "type": "boolean",
+                    "description": "Boolean value that determines whether the axis should include ticks."
+                },
                 "title": {
                     "anyOf": [
                         {
@@ -3679,16 +3679,16 @@
                     "type": "string",
                     "description": "Default Fill Color.  This has higher precedence than config.color\n\n__Default value:__ (None)"
                 },
-                "filled": {
-                    "type": "boolean",
-                    "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config)."
-                },
                 "fillOpacity": {
                     "type": "number",
                     "minimum": 0,
                     "maximum": 1,
                     "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`"
                 },
+                "filled": {
+                    "type": "boolean",
+                    "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config)."
+                },
                 "font": {
                     "type": "string",
                     "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`)."
diff --git a/base/schema-swift/test/inputs/schema/accessors.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/accessors.schema/default/quicktype.swift
index df42965..7e68004 100644
--- a/base/schema-swift/test/inputs/schema/accessors.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/accessors.schema/default/quicktype.swift
@@ -7,16 +7,16 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let barre: String
+    let unionization: Union
     let enumerification: Enum
     let foo: String
-    let unionization: Union
+    let barre: String
 
     enum CodingKeys: String, CodingKey {
-        case barre = "bar"
+        case unionization = "union"
         case enumerification = "enum"
         case foo = "foo"
-        case unionization = "union"
+        case barre = "bar"
     }
 }
 
@@ -39,16 +39,16 @@ extension TopLevel {
     }
 
     func with(
-        barre: String? = nil,
+        unionization: Union? = nil,
         enumerification: Enum? = nil,
         foo: String? = nil,
-        unionization: Union? = nil
+        barre: String? = nil
     ) -> TopLevel {
         return TopLevel(
-            barre: barre ?? self.barre,
+            unionization: unionization ?? self.unionization,
             enumerification: enumerification ?? self.enumerification,
             foo: foo ?? self.foo,
-            unionization: unionization ?? self.unionization
+            barre: barre ?? self.barre
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/bool-string.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/bool-string.schema/default/quicktype.swift
index fcbf075..cb2c7ae 100644
--- a/base/schema-swift/test/inputs/schema/bool-string.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/bool-string.schema/default/quicktype.swift
@@ -7,20 +7,20 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let arrNullable: [String?]?
-    let arrOne: [String]?
-    let nullable: String?
     let one: String
     let topLevelOptional: String?
+    let nullable: String?
+    let arrOne: [String]?
+    let arrNullable: [String?]?
     let unionWithBool: UnionWithBool
     let unionWithBoolAndEnum: UnionWithBool
 
     enum CodingKeys: String, CodingKey {
-        case arrNullable = "arrNullable"
-        case arrOne = "arrOne"
-        case nullable = "nullable"
         case one = "one"
         case topLevelOptional = "optional"
+        case nullable = "nullable"
+        case arrOne = "arrOne"
+        case arrNullable = "arrNullable"
         case unionWithBool = "unionWithBool"
         case unionWithBoolAndEnum = "unionWithBoolAndEnum"
     }
@@ -45,20 +45,20 @@ extension TopLevel {
     }
 
     func with(
-        arrNullable: [String?]?? = nil,
-        arrOne: [String]?? = nil,
-        nullable: String?? = nil,
         one: String? = nil,
         topLevelOptional: String?? = nil,
+        nullable: String?? = nil,
+        arrOne: [String]?? = nil,
+        arrNullable: [String?]?? = nil,
         unionWithBool: UnionWithBool? = nil,
         unionWithBoolAndEnum: UnionWithBool? = nil
     ) -> TopLevel {
         return TopLevel(
-            arrNullable: arrNullable ?? self.arrNullable,
-            arrOne: arrOne ?? self.arrOne,
-            nullable: nullable ?? self.nullable,
             one: one ?? self.one,
             topLevelOptional: topLevelOptional ?? self.topLevelOptional,
+            nullable: nullable ?? self.nullable,
+            arrOne: arrOne ?? self.arrOne,
+            arrNullable: arrNullable ?? self.arrNullable,
             unionWithBool: unionWithBool ?? self.unionWithBool,
             unionWithBoolAndEnum: unionWithBoolAndEnum ?? self.unionWithBoolAndEnum
         )
diff --git a/base/schema-swift/test/inputs/schema/boolean-subschema.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/boolean-subschema.schema/default/quicktype.swift
index 32a5e60..53315f3 100644
--- a/base/schema-swift/test/inputs/schema/boolean-subschema.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/boolean-subschema.schema/default/quicktype.swift
@@ -7,15 +7,15 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
+    let foo: String
     let disallowed: JSONAny?
     let empty: [JSONAny]
-    let foo: String
     let impossible: JSONAny?
 
     enum CodingKeys: String, CodingKey {
+        case foo = "foo"
         case disallowed = "disallowed"
         case empty = "empty"
-        case foo = "foo"
         case impossible = "impossible"
     }
 }
@@ -39,15 +39,15 @@ extension TopLevel {
     }
 
     func with(
+        foo: String? = nil,
         disallowed: JSONAny?? = nil,
         empty: [JSONAny]? = nil,
-        foo: String? = nil,
         impossible: JSONAny?? = nil
     ) -> TopLevel {
         return TopLevel(
+            foo: foo ?? self.foo,
             disallowed: disallowed ?? self.disallowed,
             empty: empty ?? self.empty,
-            foo: foo ?? self.foo,
             impossible: impossible ?? self.impossible
         )
     }
diff --git a/base/schema-swift/test/inputs/schema/comment-injection.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/comment-injection.schema/default/quicktype.swift
index 69439dd..15615e4 100644
--- a/base/schema-swift/test/inputs/schema/comment-injection.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/comment-injection.schema/default/quicktype.swift
@@ -19,12 +19,6 @@ import Foundation
 /// }
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    /// Ends with a backslash \
-    let trailingBackslash: String?
-    /// Ends with a quote "
-    let trailingQuote: String?
-    /// Ends with a triple quote """
-    let trailingTripleQuote: String?
     /// Property delimiters:
     /// */
     /// /*
@@ -38,12 +32,18 @@ struct TopLevel: Codable {
     /// }
     /// }
     let value: String
+    /// Ends with a backslash \
+    let trailingBackslash: String?
+    /// Ends with a quote "
+    let trailingQuote: String?
+    /// Ends with a triple quote """
+    let trailingTripleQuote: String?
 
     enum CodingKeys: String, CodingKey {
+        case value = "value"
         case trailingBackslash = "trailingBackslash"
         case trailingQuote = "trailingQuote"
         case trailingTripleQuote = "trailingTripleQuote"
-        case value = "value"
     }
 }
 
@@ -66,16 +66,16 @@ extension TopLevel {
     }
 
     func with(
+        value: String? = nil,
         trailingBackslash: String?? = nil,
         trailingQuote: String?? = nil,
-        trailingTripleQuote: String?? = nil,
-        value: String? = nil
+        trailingTripleQuote: String?? = nil
     ) -> TopLevel {
         return TopLevel(
+            value: value ?? self.value,
             trailingBackslash: trailingBackslash ?? self.trailingBackslash,
             trailingQuote: trailingQuote ?? self.trailingQuote,
-            trailingTripleQuote: trailingTripleQuote ?? self.trailingTripleQuote,
-            value: value ?? self.value
+            trailingTripleQuote: trailingTripleQuote ?? self.trailingTripleQuote
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/date-time-or-string.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/date-time-or-string.schema/default/quicktype.swift
index c03b905..b1cc25b 100644
--- a/base/schema-swift/test/inputs/schema/date-time-or-string.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/date-time-or-string.schema/default/quicktype.swift
@@ -7,12 +7,12 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let bar: BarUnion
     let foo: String
+    let bar: BarUnion
 
     enum CodingKeys: String, CodingKey {
-        case bar = "bar"
         case foo = "foo"
+        case bar = "bar"
     }
 }
 
@@ -35,12 +35,12 @@ extension TopLevel {
     }
 
     func with(
-        bar: BarUnion? = nil,
-        foo: String? = nil
+        foo: String? = nil,
+        bar: BarUnion? = nil
     ) -> TopLevel {
         return TopLevel(
-            bar: bar ?? self.bar,
-            foo: foo ?? self.foo
+            foo: foo ?? self.foo,
+            bar: bar ?? self.bar
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/description.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/description.schema/default/quicktype.swift
index c330026..9c4bf53 100644
--- a/base/schema-swift/test/inputs/schema/description.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/description.schema/default/quicktype.swift
@@ -9,21 +9,21 @@ import Foundation
 /// Its description has two lines.
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    /// A pretty boolean
-    let bar: Bool?
+    /// Either a number or a string
+    let union: Union
     /// An enumeration
     let topLevelEnum: Enum
     let foo: Double?
+    /// A pretty boolean
+    let bar: Bool?
     let objectOrString: ObjectOrStringUnion
-    /// Either a number or a string
-    let union: Union
 
     enum CodingKeys: String, CodingKey {
-        case bar = "bar"
+        case union = "union"
         case topLevelEnum = "enum"
         case foo = "foo"
+        case bar = "bar"
         case objectOrString = "object-or-string"
-        case union = "union"
     }
 }
 
@@ -46,18 +46,18 @@ extension TopLevel {
     }
 
     func with(
-        bar: Bool?? = nil,
+        union: Union? = nil,
         topLevelEnum: Enum? = nil,
         foo: Double?? = nil,
-        objectOrString: ObjectOrStringUnion? = nil,
-        union: Union? = nil
+        bar: Bool?? = nil,
+        objectOrString: ObjectOrStringUnion? = nil
     ) -> TopLevel {
         return TopLevel(
-            bar: bar ?? self.bar,
+            union: union ?? self.union,
             topLevelEnum: topLevelEnum ?? self.topLevelEnum,
             foo: foo ?? self.foo,
-            objectOrString: objectOrString ?? self.objectOrString,
-            union: union ?? self.union
+            bar: bar ?? self.bar,
+            objectOrString: objectOrString ?? self.objectOrString
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/direct-union.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/direct-union.schema/default/quicktype.swift
index 8b0d63a..20da9cf 100644
--- a/base/schema-swift/test/inputs/schema/direct-union.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/direct-union.schema/default/quicktype.swift
@@ -51,12 +51,12 @@ extension TopLevel {
 
 // MARK: - Thing
 struct Thing: Codable {
-    let thingOptional: Anything?
     let thingRequired: Anything
+    let thingOptional: Anything?
 
     enum CodingKeys: String, CodingKey {
-        case thingOptional = "optional"
         case thingRequired = "required"
+        case thingOptional = "optional"
     }
 }
 
@@ -79,12 +79,12 @@ extension Thing {
     }
 
     func with(
-        thingOptional: Anything?? = nil,
-        thingRequired: Anything? = nil
+        thingRequired: Anything? = nil,
+        thingOptional: Anything?? = nil
     ) -> Thing {
         return Thing(
-            thingOptional: thingOptional ?? self.thingOptional,
-            thingRequired: thingRequired ?? self.thingRequired
+            thingRequired: thingRequired ?? self.thingRequired,
+            thingOptional: thingOptional ?? self.thingOptional
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/integer-string.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/integer-string.schema/default/quicktype.swift
index 8764b8e..1429325 100644
--- a/base/schema-swift/test/inputs/schema/integer-string.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/integer-string.schema/default/quicktype.swift
@@ -7,20 +7,20 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let arrNullable: [String?]?
-    let arrOne: [String]?
-    let nullable: String?
     let one: String
     let topLevelOptional: String?
+    let nullable: String?
+    let arrOne: [String]?
+    let arrNullable: [String?]?
     let unionWithInt: UnionWithInt
     let unionWithIntAndEnum: UnionWithInt
 
     enum CodingKeys: String, CodingKey {
-        case arrNullable = "arrNullable"
-        case arrOne = "arrOne"
-        case nullable = "nullable"
         case one = "one"
         case topLevelOptional = "optional"
+        case nullable = "nullable"
+        case arrOne = "arrOne"
+        case arrNullable = "arrNullable"
         case unionWithInt = "unionWithInt"
         case unionWithIntAndEnum = "unionWithIntAndEnum"
     }
@@ -45,20 +45,20 @@ extension TopLevel {
     }
 
     func with(
-        arrNullable: [String?]?? = nil,
-        arrOne: [String]?? = nil,
-        nullable: String?? = nil,
         one: String? = nil,
         topLevelOptional: String?? = nil,
+        nullable: String?? = nil,
+        arrOne: [String]?? = nil,
+        arrNullable: [String?]?? = nil,
         unionWithInt: UnionWithInt? = nil,
         unionWithIntAndEnum: UnionWithInt? = nil
     ) -> TopLevel {
         return TopLevel(
-            arrNullable: arrNullable ?? self.arrNullable,
-            arrOne: arrOne ?? self.arrOne,
-            nullable: nullable ?? self.nullable,
             one: one ?? self.one,
             topLevelOptional: topLevelOptional ?? self.topLevelOptional,
+            nullable: nullable ?? self.nullable,
+            arrOne: arrOne ?? self.arrOne,
+            arrNullable: arrNullable ?? self.arrNullable,
             unionWithInt: unionWithInt ?? self.unionWithInt,
             unionWithIntAndEnum: unionWithIntAndEnum ?? self.unionWithIntAndEnum
         )
diff --git a/base/schema-swift/test/inputs/schema/integer-type.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/integer-type.schema/default/quicktype.swift
index 9fe576c..f7bc7d9 100644
--- a/base/schema-swift/test/inputs/schema/integer-type.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/integer-type.schema/default/quicktype.swift
@@ -7,26 +7,26 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
+    let smallPositive: Int
+    let smallNegative: Int
+    let i32Range: Int
     let aboveI32Max: Int
     let belowI32Min: Int
-    let i32Range: Int
-    let largeBounds: Int
-    let onlyMaximum: Int
     let onlyMinimum: Int
-    let smallNegative: Int
-    let smallPositive: Int
+    let onlyMaximum: Int
     let unbounded: Int
+    let largeBounds: Int
 
     enum CodingKeys: String, CodingKey {
+        case smallPositive = "small_positive"
+        case smallNegative = "small_negative"
+        case i32Range = "i32_range"
         case aboveI32Max = "above_i32_max"
         case belowI32Min = "below_i32_min"
-        case i32Range = "i32_range"
-        case largeBounds = "large_bounds"
-        case onlyMaximum = "only_maximum"
         case onlyMinimum = "only_minimum"
-        case smallNegative = "small_negative"
-        case smallPositive = "small_positive"
+        case onlyMaximum = "only_maximum"
         case unbounded = "unbounded"
+        case largeBounds = "large_bounds"
     }
 }
 
@@ -49,26 +49,26 @@ extension TopLevel {
     }
 
     func with(
+        smallPositive: Int? = nil,
+        smallNegative: Int? = nil,
+        i32Range: Int? = nil,
         aboveI32Max: Int? = nil,
         belowI32Min: Int? = nil,
-        i32Range: Int? = nil,
-        largeBounds: Int? = nil,
-        onlyMaximum: Int? = nil,
         onlyMinimum: Int? = nil,
-        smallNegative: Int? = nil,
-        smallPositive: Int? = nil,
-        unbounded: Int? = nil
+        onlyMaximum: Int? = nil,
+        unbounded: Int? = nil,
+        largeBounds: Int? = nil
     ) -> TopLevel {
         return TopLevel(
+            smallPositive: smallPositive ?? self.smallPositive,
+            smallNegative: smallNegative ?? self.smallNegative,
+            i32Range: i32Range ?? self.i32Range,
             aboveI32Max: aboveI32Max ?? self.aboveI32Max,
             belowI32Min: belowI32Min ?? self.belowI32Min,
-            i32Range: i32Range ?? self.i32Range,
-            largeBounds: largeBounds ?? self.largeBounds,
-            onlyMaximum: onlyMaximum ?? self.onlyMaximum,
             onlyMinimum: onlyMinimum ?? self.onlyMinimum,
-            smallNegative: smallNegative ?? self.smallNegative,
-            smallPositive: smallPositive ?? self.smallPositive,
-            unbounded: unbounded ?? self.unbounded
+            onlyMaximum: onlyMaximum ?? self.onlyMaximum,
+            unbounded: unbounded ?? self.unbounded,
+            largeBounds: largeBounds ?? self.largeBounds
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/keyword-unions.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/keyword-unions.schema/default/quicktype.swift
index bf0f8e0..eee1c20 100644
--- a/base/schema-swift/test/inputs/schema/keyword-unions.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/keyword-unions.schema/default/quicktype.swift
@@ -83,7 +83,6 @@ struct TopLevel: Codable {
     let topLevelDidSet: UnionDidSet?
     let topLevelDo: UnionDo?
     let double: UnionDouble?
-    let dummy: Double?
     let topLevelDynamic: UnionDynamic?
     let dynamicCast: UnionDynamicCast?
     let elif: UnionElif?
@@ -136,8 +135,8 @@ struct TopLevel: Codable {
     let int: UnionInt?
     let interface: UnionInterface?
     let topLevelInternal: UnionInternal?
-    let topLevelIs: UnionIs?
     let iterable: UnionIterable?
+    let topLevelIs: UnionIs?
     let jdec: UnionJdec?
     let jenc: UnionJenc?
     let jpipe: UnionJpipe?
@@ -284,6 +283,7 @@ struct TopLevel: Codable {
     let xorEq: UnionXorEq?
     let yes: UnionYES?
     let yield: UnionYield?
+    let dummy: Double?
 
     enum CodingKeys: String, CodingKey {
         case empty = "_"
@@ -362,7 +362,6 @@ struct TopLevel: Codable {
         case topLevelDidSet = "didSet"
         case topLevelDo = "do"
         case double = "double"
-        case dummy = "dummy"
         case topLevelDynamic = "dynamic"
         case dynamicCast = "dynamic_cast"
         case elif = "elif"
@@ -415,8 +414,8 @@ struct TopLevel: Codable {
         case int = "int"
         case interface = "interface"
         case topLevelInternal = "internal"
-        case topLevelIs = "is"
         case iterable = "iterable"
+        case topLevelIs = "is"
         case jdec = "jdec"
         case jenc = "jenc"
         case jpipe = "jpipe"
@@ -563,6 +562,7 @@ struct TopLevel: Codable {
         case xorEq = "xor_eq"
         case yes = "YES"
         case yield = "yield"
+        case dummy = "dummy"
     }
 }
 
@@ -661,7 +661,6 @@ extension TopLevel {
         topLevelDidSet: UnionDidSet?? = nil,
         topLevelDo: UnionDo?? = nil,
         double: UnionDouble?? = nil,
-        dummy: Double?? = nil,
         topLevelDynamic: UnionDynamic?? = nil,
         dynamicCast: UnionDynamicCast?? = nil,
         elif: UnionElif?? = nil,
@@ -714,8 +713,8 @@ extension TopLevel {
         int: UnionInt?? = nil,
         interface: UnionInterface?? = nil,
         topLevelInternal: UnionInternal?? = nil,
-        topLevelIs: UnionIs?? = nil,
         iterable: UnionIterable?? = nil,
+        topLevelIs: UnionIs?? = nil,
         jdec: UnionJdec?? = nil,
         jenc: UnionJenc?? = nil,
         jpipe: UnionJpipe?? = nil,
@@ -861,7 +860,8 @@ extension TopLevel {
         xor: UnionXor?? = nil,
         xorEq: UnionXorEq?? = nil,
         yes: UnionYES?? = nil,
-        yield: UnionYield?? = nil
+        yield: UnionYield?? = nil,
+        dummy: Double?? = nil
     ) -> TopLevel {
         return TopLevel(
             empty: empty ?? self.empty,
@@ -940,7 +940,6 @@ extension TopLevel {
             topLevelDidSet: topLevelDidSet ?? self.topLevelDidSet,
             topLevelDo: topLevelDo ?? self.topLevelDo,
             double: double ?? self.double,
-            dummy: dummy ?? self.dummy,
             topLevelDynamic: topLevelDynamic ?? self.topLevelDynamic,
             dynamicCast: dynamicCast ?? self.dynamicCast,
             elif: elif ?? self.elif,
@@ -993,8 +992,8 @@ extension TopLevel {
             int: int ?? self.int,
             interface: interface ?? self.interface,
             topLevelInternal: topLevelInternal ?? self.topLevelInternal,
-            topLevelIs: topLevelIs ?? self.topLevelIs,
             iterable: iterable ?? self.iterable,
+            topLevelIs: topLevelIs ?? self.topLevelIs,
             jdec: jdec ?? self.jdec,
             jenc: jenc ?? self.jenc,
             jpipe: jpipe ?? self.jpipe,
@@ -1140,7 +1139,8 @@ extension TopLevel {
             xor: xor ?? self.xor,
             xorEq: xorEq ?? self.xorEq,
             yes: yes ?? self.yes,
-            yield: yield ?? self.yield
+            yield: yield ?? self.yield,
+            dummy: dummy ?? self.dummy
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/light.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/light.schema/default/quicktype.swift
index c90e02d..b1af537 100644
--- a/base/schema-swift/test/inputs/schema/light.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/light.schema/default/quicktype.swift
@@ -51,13 +51,13 @@ extension TopLevel {
 
 // MARK: - LightParams
 struct LightParams: Codable {
-    let appID: String
     let outletID: String
+    let appID: String
     let rgba: String
 
     enum CodingKeys: String, CodingKey {
-        case appID = "app_id"
         case outletID = "outlet_id"
+        case appID = "app_id"
         case rgba = "rgba"
     }
 }
@@ -81,13 +81,13 @@ extension LightParams {
     }
 
     func with(
-        appID: String? = nil,
         outletID: String? = nil,
+        appID: String? = nil,
         rgba: String? = nil
     ) -> LightParams {
         return LightParams(
-            appID: appID ?? self.appID,
             outletID: outletID ?? self.outletID,
+            appID: appID ?? self.appID,
             rgba: rgba ?? self.rgba
         )
     }
diff --git a/base/schema-swift/test/inputs/schema/min-max-items.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/min-max-items.schema/default/quicktype.swift
index 9ef78a9..098e80a 100644
--- a/base/schema-swift/test/inputs/schema/min-max-items.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/min-max-items.schema/default/quicktype.swift
@@ -7,16 +7,16 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
+    let minOnly: [String]
     let maxOnly: [Int]
     let minAndMax: [Double]
-    let minOnly: [String]
     let plain: [String]
     let unionItems: [UnionItem]
 
     enum CodingKeys: String, CodingKey {
+        case minOnly = "minOnly"
         case maxOnly = "maxOnly"
         case minAndMax = "minAndMax"
-        case minOnly = "minOnly"
         case plain = "plain"
         case unionItems = "unionItems"
     }
@@ -41,16 +41,16 @@ extension TopLevel {
     }
 
     func with(
+        minOnly: [String]? = nil,
         maxOnly: [Int]? = nil,
         minAndMax: [Double]? = nil,
-        minOnly: [String]? = nil,
         plain: [String]? = nil,
         unionItems: [UnionItem]? = nil
     ) -> TopLevel {
         return TopLevel(
+            minOnly: minOnly ?? self.minOnly,
             maxOnly: maxOnly ?? self.maxOnly,
             minAndMax: minAndMax ?? self.minAndMax,
-            minOnly: minOnly ?? self.minOnly,
             plain: plain ?? self.plain,
             unionItems: unionItems ?? self.unionItems
         )
diff --git a/base/schema-swift/test/inputs/schema/minmax-integer.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/minmax-integer.schema/default/quicktype.swift
index baecce4..dc6ea94 100644
--- a/base/schema-swift/test/inputs/schema/minmax-integer.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/minmax-integer.schema/default/quicktype.swift
@@ -8,23 +8,23 @@ import Foundation
 // MARK: - TopLevel
 struct TopLevel: Codable {
     let free: Int
-    let intersection: Int
-    let max: Int
     let min: Int
+    let max: Int
     let minmax: Int
-    let minMaxIntersection: Int
-    let minMaxUnion: Int
     let union: Int
+    let minMaxUnion: Int
+    let intersection: Int
+    let minMaxIntersection: Int
 
     enum CodingKeys: String, CodingKey {
         case free = "free"
-        case intersection = "intersection"
-        case max = "max"
         case min = "min"
+        case max = "max"
         case minmax = "minmax"
-        case minMaxIntersection = "minMaxIntersection"
-        case minMaxUnion = "minMaxUnion"
         case union = "union"
+        case minMaxUnion = "minMaxUnion"
+        case intersection = "intersection"
+        case minMaxIntersection = "minMaxIntersection"
     }
 }
 
@@ -48,23 +48,23 @@ extension TopLevel {
 
     func with(
         free: Int? = nil,
-        intersection: Int? = nil,
-        max: Int? = nil,
         min: Int? = nil,
+        max: Int? = nil,
         minmax: Int? = nil,
-        minMaxIntersection: Int? = nil,
+        union: Int? = nil,
         minMaxUnion: Int? = nil,
-        union: Int? = nil
+        intersection: Int? = nil,
+        minMaxIntersection: Int? = nil
     ) -> TopLevel {
         return TopLevel(
             free: free ?? self.free,
-            intersection: intersection ?? self.intersection,
-            max: max ?? self.max,
             min: min ?? self.min,
+            max: max ?? self.max,
             minmax: minmax ?? self.minmax,
-            minMaxIntersection: minMaxIntersection ?? self.minMaxIntersection,
+            union: union ?? self.union,
             minMaxUnion: minMaxUnion ?? self.minMaxUnion,
-            union: union ?? self.union
+            intersection: intersection ?? self.intersection,
+            minMaxIntersection: minMaxIntersection ?? self.minMaxIntersection
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/minmax.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/minmax.schema/default/quicktype.swift
index d08b96c..8f9e8e2 100644
--- a/base/schema-swift/test/inputs/schema/minmax.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/minmax.schema/default/quicktype.swift
@@ -8,23 +8,23 @@ import Foundation
 // MARK: - TopLevel
 struct TopLevel: Codable {
     let free: Double
-    let intersection: Double
-    let max: Double
     let min: Double
+    let max: Double
     let minmax: Double
-    let minMaxIntersection: Double
-    let minMaxUnion: Double
     let union: Double
+    let minMaxUnion: Double
+    let intersection: Double
+    let minMaxIntersection: Double
 
     enum CodingKeys: String, CodingKey {
         case free = "free"
-        case intersection = "intersection"
-        case max = "max"
         case min = "min"
+        case max = "max"
         case minmax = "minmax"
-        case minMaxIntersection = "minMaxIntersection"
-        case minMaxUnion = "minMaxUnion"
         case union = "union"
+        case minMaxUnion = "minMaxUnion"
+        case intersection = "intersection"
+        case minMaxIntersection = "minMaxIntersection"
     }
 }
 
@@ -48,23 +48,23 @@ extension TopLevel {
 
     func with(
         free: Double? = nil,
-        intersection: Double? = nil,
-        max: Double? = nil,
         min: Double? = nil,
+        max: Double? = nil,
         minmax: Double? = nil,
-        minMaxIntersection: Double? = nil,
+        union: Double? = nil,
         minMaxUnion: Double? = nil,
-        union: Double? = nil
+        intersection: Double? = nil,
+        minMaxIntersection: Double? = nil
     ) -> TopLevel {
         return TopLevel(
             free: free ?? self.free,
-            intersection: intersection ?? self.intersection,
-            max: max ?? self.max,
             min: min ?? self.min,
+            max: max ?? self.max,
             minmax: minmax ?? self.minmax,
-            minMaxIntersection: minMaxIntersection ?? self.minMaxIntersection,
+            union: union ?? self.union,
             minMaxUnion: minMaxUnion ?? self.minMaxUnion,
-            union: union ?? self.union
+            intersection: intersection ?? self.intersection,
+            minMaxIntersection: minMaxIntersection ?? self.minMaxIntersection
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/minmaxlength.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/minmaxlength.schema/default/quicktype.swift
index b146fbe..6a7b47c 100644
--- a/base/schema-swift/test/inputs/schema/minmaxlength.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/minmaxlength.schema/default/quicktype.swift
@@ -7,24 +7,24 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let intersection: String
-    let inUnion: InUnion
-    let maxlength: String
     let minlength: String
-    let minMaxIntersection: String
+    let maxlength: String
     let minmaxlength: String
-    let minMaxUnion: String
     let union: String
+    let inUnion: InUnion
+    let minMaxUnion: String
+    let intersection: String
+    let minMaxIntersection: String
 
     enum CodingKeys: String, CodingKey {
-        case intersection = "intersection"
-        case inUnion = "inUnion"
-        case maxlength = "maxlength"
         case minlength = "minlength"
-        case minMaxIntersection = "minMaxIntersection"
+        case maxlength = "maxlength"
         case minmaxlength = "minmaxlength"
-        case minMaxUnion = "minMaxUnion"
         case union = "union"
+        case inUnion = "inUnion"
+        case minMaxUnion = "minMaxUnion"
+        case intersection = "intersection"
+        case minMaxIntersection = "minMaxIntersection"
     }
 }
 
@@ -47,24 +47,24 @@ extension TopLevel {
     }
 
     func with(
-        intersection: String? = nil,
-        inUnion: InUnion? = nil,
-        maxlength: String? = nil,
         minlength: String? = nil,
-        minMaxIntersection: String? = nil,
+        maxlength: String? = nil,
         minmaxlength: String? = nil,
+        union: String? = nil,
+        inUnion: InUnion? = nil,
         minMaxUnion: String? = nil,
-        union: String? = nil
+        intersection: String? = nil,
+        minMaxIntersection: String? = nil
     ) -> TopLevel {
         return TopLevel(
-            intersection: intersection ?? self.intersection,
-            inUnion: inUnion ?? self.inUnion,
-            maxlength: maxlength ?? self.maxlength,
             minlength: minlength ?? self.minlength,
-            minMaxIntersection: minMaxIntersection ?? self.minMaxIntersection,
+            maxlength: maxlength ?? self.maxlength,
             minmaxlength: minmaxlength ?? self.minmaxlength,
+            union: union ?? self.union,
+            inUnion: inUnion ?? self.inUnion,
             minMaxUnion: minMaxUnion ?? self.minMaxUnion,
-            union: union ?? self.union
+            intersection: intersection ?? self.intersection,
+            minMaxIntersection: minMaxIntersection ?? self.minMaxIntersection
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/non-standard-ref.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/non-standard-ref.schema/default/quicktype.swift
index f12fd26..9279c11 100644
--- a/base/schema-swift/test/inputs/schema/non-standard-ref.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/non-standard-ref.schema/default/quicktype.swift
@@ -7,13 +7,13 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let bar: Int
     let foo: Int
+    let bar: Int
     let quux: Bool
 
     enum CodingKeys: String, CodingKey {
-        case bar = "bar"
         case foo = "foo"
+        case bar = "bar"
         case quux = "quux"
     }
 }
@@ -37,13 +37,13 @@ extension TopLevel {
     }
 
     func with(
-        bar: Int? = nil,
         foo: Int? = nil,
+        bar: Int? = nil,
         quux: Bool? = nil
     ) -> TopLevel {
         return TopLevel(
-            bar: bar ?? self.bar,
             foo: foo ?? self.foo,
+            bar: bar ?? self.bar,
             quux: quux ?? self.quux
         )
     }
diff --git a/base/schema-swift/test/inputs/schema/optional-any.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/optional-any.schema/default/quicktype.swift
index e2b0c18..0374348 100644
--- a/base/schema-swift/test/inputs/schema/optional-any.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/optional-any.schema/default/quicktype.swift
@@ -7,12 +7,12 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let bar: Bool
     let foo: JSONAny?
+    let bar: Bool
 
     enum CodingKeys: String, CodingKey {
-        case bar = "bar"
         case foo = "foo"
+        case bar = "bar"
     }
 }
 
@@ -35,12 +35,12 @@ extension TopLevel {
     }
 
     func with(
-        bar: Bool? = nil,
-        foo: JSONAny?? = nil
+        foo: JSONAny?? = nil,
+        bar: Bool? = nil
     ) -> TopLevel {
         return TopLevel(
-            bar: bar ?? self.bar,
-            foo: foo ?? self.foo
+            foo: foo ?? self.foo,
+            bar: bar ?? self.bar
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/optional-const-ref.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/optional-const-ref.schema/default/quicktype.swift
index 3bc5b3a..09a9f83 100644
--- a/base/schema-swift/test/inputs/schema/optional-const-ref.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/optional-const-ref.schema/default/quicktype.swift
@@ -8,21 +8,21 @@ import Foundation
 // MARK: - TopLevel
 struct TopLevel: Codable {
     let coordinates: [Coordinate]?
-    let count: Int?
-    let label: String?
     let requiredCoordinates: [Coordinate]
+    let count: Int?
     let requiredCount: Int
-    let requiredLabel: String
     let weight: Double?
+    let label: String?
+    let requiredLabel: String
 
     enum CodingKeys: String, CodingKey {
         case coordinates = "coordinates"
-        case count = "count"
-        case label = "label"
         case requiredCoordinates = "requiredCoordinates"
+        case count = "count"
         case requiredCount = "requiredCount"
-        case requiredLabel = "requiredLabel"
         case weight = "weight"
+        case label = "label"
+        case requiredLabel = "requiredLabel"
     }
 }
 
@@ -46,21 +46,21 @@ extension TopLevel {
 
     func with(
         coordinates: [Coordinate]?? = nil,
-        count: Int?? = nil,
-        label: String?? = nil,
         requiredCoordinates: [Coordinate]? = nil,
+        count: Int?? = nil,
         requiredCount: Int? = nil,
-        requiredLabel: String? = nil,
-        weight: Double?? = nil
+        weight: Double?? = nil,
+        label: String?? = nil,
+        requiredLabel: String? = nil
     ) -> TopLevel {
         return TopLevel(
             coordinates: coordinates ?? self.coordinates,
-            count: count ?? self.count,
-            label: label ?? self.label,
             requiredCoordinates: requiredCoordinates ?? self.requiredCoordinates,
+            count: count ?? self.count,
             requiredCount: requiredCount ?? self.requiredCount,
-            requiredLabel: requiredLabel ?? self.requiredLabel,
-            weight: weight ?? self.weight
+            weight: weight ?? self.weight,
+            label: label ?? self.label,
+            requiredLabel: requiredLabel ?? self.requiredLabel
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/optional-constraints.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/optional-constraints.schema/default/quicktype.swift
index a881924..1ee89fc 100644
--- a/base/schema-swift/test/inputs/schema/optional-constraints.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/optional-constraints.schema/default/quicktype.swift
@@ -7,18 +7,18 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let optDouble: Double?
+    let reqZeroMin: Int
     let optInt: Int?
-    let optPattern: String?
+    let optDouble: Double?
     let optString: String?
-    let reqZeroMin: Int
+    let optPattern: String?
 
     enum CodingKeys: String, CodingKey {
-        case optDouble = "optDouble"
+        case reqZeroMin = "reqZeroMin"
         case optInt = "optInt"
-        case optPattern = "optPattern"
+        case optDouble = "optDouble"
         case optString = "optString"
-        case reqZeroMin = "reqZeroMin"
+        case optPattern = "optPattern"
     }
 }
 
@@ -41,18 +41,18 @@ extension TopLevel {
     }
 
     func with(
-        optDouble: Double?? = nil,
+        reqZeroMin: Int? = nil,
         optInt: Int?? = nil,
-        optPattern: String?? = nil,
+        optDouble: Double?? = nil,
         optString: String?? = nil,
-        reqZeroMin: Int? = nil
+        optPattern: String?? = nil
     ) -> TopLevel {
         return TopLevel(
-            optDouble: optDouble ?? self.optDouble,
+            reqZeroMin: reqZeroMin ?? self.reqZeroMin,
             optInt: optInt ?? self.optInt,
-            optPattern: optPattern ?? self.optPattern,
+            optDouble: optDouble ?? self.optDouble,
             optString: optString ?? self.optString,
-            reqZeroMin: reqZeroMin ?? self.reqZeroMin
+            optPattern: optPattern ?? self.optPattern
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/optional-date-time.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/optional-date-time.schema/default/quicktype.swift
index 7eba3f2..fbae5d6 100644
--- a/base/schema-swift/test/inputs/schema/optional-date-time.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/optional-date-time.schema/default/quicktype.swift
@@ -7,20 +7,20 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let optionalDate: String?
-    let optionalDateTime: Date?
-    let optionalTime: String?
     let requiredDate: String
-    let requiredDateTime: Date
     let requiredTime: String
+    let requiredDateTime: Date
+    let optionalDate: String?
+    let optionalTime: String?
+    let optionalDateTime: Date?
 
     enum CodingKeys: String, CodingKey {
-        case optionalDate = "optional-date"
-        case optionalDateTime = "optional-date-time"
-        case optionalTime = "optional-time"
         case requiredDate = "required-date"
-        case requiredDateTime = "required-date-time"
         case requiredTime = "required-time"
+        case requiredDateTime = "required-date-time"
+        case optionalDate = "optional-date"
+        case optionalTime = "optional-time"
+        case optionalDateTime = "optional-date-time"
     }
 }
 
@@ -43,20 +43,20 @@ extension TopLevel {
     }
 
     func with(
-        optionalDate: String?? = nil,
-        optionalDateTime: Date?? = nil,
-        optionalTime: String?? = nil,
         requiredDate: String? = nil,
+        requiredTime: String? = nil,
         requiredDateTime: Date? = nil,
-        requiredTime: String? = nil
+        optionalDate: String?? = nil,
+        optionalTime: String?? = nil,
+        optionalDateTime: Date?? = nil
     ) -> TopLevel {
         return TopLevel(
-            optionalDate: optionalDate ?? self.optionalDate,
-            optionalDateTime: optionalDateTime ?? self.optionalDateTime,
-            optionalTime: optionalTime ?? self.optionalTime,
             requiredDate: requiredDate ?? self.requiredDate,
+            requiredTime: requiredTime ?? self.requiredTime,
             requiredDateTime: requiredDateTime ?? self.requiredDateTime,
-            requiredTime: requiredTime ?? self.requiredTime
+            optionalDate: optionalDate ?? self.optionalDate,
+            optionalTime: optionalTime ?? self.optionalTime,
+            optionalDateTime: optionalDateTime ?? self.optionalDateTime
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/prefix-items.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/prefix-items.schema/default/quicktype.swift
index b2e2814..28db1e6 100644
--- a/base/schema-swift/test/inputs/schema/prefix-items.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/prefix-items.schema/default/quicktype.swift
@@ -7,12 +7,12 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let topLevelOpen: [Open]
     let tuple: [Open]
+    let topLevelOpen: [Open]
 
     enum CodingKeys: String, CodingKey {
-        case topLevelOpen = "open"
         case tuple = "tuple"
+        case topLevelOpen = "open"
     }
 }
 
@@ -35,12 +35,12 @@ extension TopLevel {
     }
 
     func with(
-        topLevelOpen: [Open]? = nil,
-        tuple: [Open]? = nil
+        tuple: [Open]? = nil,
+        topLevelOpen: [Open]? = nil
     ) -> TopLevel {
         return TopLevel(
-            topLevelOpen: topLevelOpen ?? self.topLevelOpen,
-            tuple: tuple ?? self.tuple
+            tuple: tuple ?? self.tuple,
+            topLevelOpen: topLevelOpen ?? self.topLevelOpen
         )
     }
 
diff --git a/head/schema-swift/test/inputs/schema/property-order.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/property-order.schema/default/quicktype.swift
new file mode 100644
index 0000000..0cedbda
--- /dev/null
+++ b/head/schema-swift/test/inputs/schema/property-order.schema/default/quicktype.swift
@@ -0,0 +1,158 @@
+// This file was generated from JSON Schema using quicktype, do not modify it directly.
+// To parse the JSON, add this file to your project and do:
+//
+//   let topLevel = try TopLevel(json)
+
+import Foundation
+
+// MARK: - TopLevel
+struct TopLevel: Codable {
+    let zebra: String
+    let mango: Double
+    let apple: Bool
+    let delta: String
+    let banana: Int
+    let ordered: Ordered
+
+    enum CodingKeys: String, CodingKey {
+        case zebra = "zebra"
+        case mango = "mango"
+        case apple = "apple"
+        case delta = "delta"
+        case banana = "banana"
+        case ordered = "ordered"
+    }
+}
+
+// MARK: TopLevel convenience initializers and mutators
+
+extension TopLevel {
+    init(data: Data) throws {
+        self = try newJSONDecoder().decode(TopLevel.self, from: data)
+    }
+
+    init(_ json: String, using encoding: String.Encoding = .utf8) throws {
+        guard let data = json.data(using: encoding) else {
+            throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil)
+        }
+        try self.init(data: data)
+    }
+
+    init(fromURL url: URL) throws {
+        try self.init(data: try Data(contentsOf: url))
+    }
+
+    func with(
+        zebra: String? = nil,
+        mango: Double? = nil,
+        apple: Bool? = nil,
+        delta: String? = nil,
+        banana: Int? = nil,
+        ordered: Ordered? = nil
+    ) -> TopLevel {
+        return TopLevel(
+            zebra: zebra ?? self.zebra,
+            mango: mango ?? self.mango,
+            apple: apple ?? self.apple,
+            delta: delta ?? self.delta,
+            banana: banana ?? self.banana,
+            ordered: ordered ?? self.ordered
+        )
+    }
+
+    func jsonData() throws -> Data {
+        return try newJSONEncoder().encode(self)
+    }
+
+    func jsonString(encoding: String.Encoding = .utf8) throws -> String? {
+        return String(data: try self.jsonData(), encoding: encoding)
+    }
+}
+
+// MARK: - Ordered
+struct Ordered: Codable {
+    let mango: Double
+    let zebra: String
+    let apple: Bool
+
+    enum CodingKeys: String, CodingKey {
+        case mango = "mango"
+        case zebra = "zebra"
+        case apple = "apple"
+    }
+}
+
+// MARK: Ordered convenience initializers and mutators
+
+extension Ordered {
+    init(data: Data) throws {
+        self = try newJSONDecoder().decode(Ordered.self, from: data)
+    }
+
+    init(_ json: String, using encoding: String.Encoding = .utf8) throws {
+        guard let data = json.data(using: encoding) else {
+            throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil)
+        }
+        try self.init(data: data)
+    }
+
+    init(fromURL url: URL) throws {
+        try self.init(data: try Data(contentsOf: url))
+    }
+
+    func with(
+        mango: Double? = nil,
+        zebra: String? = nil,
+        apple: Bool? = nil
+    ) -> Ordered {
+        return Ordered(
+            mango: mango ?? self.mango,
+            zebra: zebra ?? self.zebra,
+            apple: apple ?? self.apple
+        )
+    }
+
+    func jsonData() throws -> Data {
+        return try newJSONEncoder().encode(self)
+    }
+
+    func jsonString(encoding: String.Encoding = .utf8) throws -> String? {
+        return String(data: try self.jsonData(), encoding: encoding)
+    }
+}
+
+// MARK: - Helper functions for creating encoders and decoders
+
+func newJSONDecoder() -> JSONDecoder {
+    let decoder = JSONDecoder()
+    decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in
+        let container = try decoder.singleValueContainer()
+        let dateStr = try container.decode(String.self)
+
+        let formatter = DateFormatter()
+        formatter.calendar = Calendar(identifier: .iso8601)
+        formatter.locale = Locale(identifier: "en_US_POSIX")
+        formatter.timeZone = TimeZone(secondsFromGMT: 0)
+        formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
+        if let date = formatter.date(from: dateStr) {
+            return date
+        }
+        formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssXXXXX"
+        if let date = formatter.date(from: dateStr) {
+            return date
+        }
+        throw DecodingError.typeMismatch(Date.self, DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Could not decode date"))
+    })
+    return decoder
+}
+
+func newJSONEncoder() -> JSONEncoder {
+    let encoder = JSONEncoder()
+    let formatter = DateFormatter()
+    formatter.calendar = Calendar(identifier: .iso8601)
+    formatter.locale = Locale(identifier: "en_US_POSIX")
+    formatter.timeZone = TimeZone(secondsFromGMT: 0)
+    formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssXXXXX"
+    encoder.dateEncodingStrategy = .formatted(formatter)
+    return encoder
+}
diff --git a/base/schema-swift/test/inputs/schema/renaming-bug.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/renaming-bug.schema/default/quicktype.swift
index 46d99dc..960df08 100644
--- a/base/schema-swift/test/inputs/schema/renaming-bug.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/renaming-bug.schema/default/quicktype.swift
@@ -60,13 +60,13 @@ extension TopLevel {
 // MARK: - Fruit
 struct Fruit: Codable {
     let apple: Bool?
-    let berries: [Berry]?
     let orange: Bool?
+    let berries: [Berry]?
 
     enum CodingKeys: String, CodingKey {
         case apple = "apple"
-        case berries = "berries"
         case orange = "orange"
+        case berries = "berries"
     }
 }
 
@@ -90,13 +90,13 @@ extension Fruit {
 
     func with(
         apple: Bool?? = nil,
-        berries: [Berry]?? = nil,
-        orange: Bool?? = nil
+        orange: Bool?? = nil,
+        berries: [Berry]?? = nil
     ) -> Fruit {
         return Fruit(
             apple: apple ?? self.apple,
-            berries: berries ?? self.berries,
-            orange: orange ?? self.orange
+            orange: orange ?? self.orange,
+            berries: berries ?? self.berries
         )
     }
 
@@ -111,13 +111,13 @@ extension Fruit {
 
 // MARK: - Berry
 struct Berry: Codable {
-    let color: Color?
     let name: String?
+    let color: Color?
     let shapes: [Shape]?
 
     enum CodingKeys: String, CodingKey {
-        case color = "color"
         case name = "name"
+        case color = "color"
         case shapes = "shapes"
     }
 }
@@ -141,13 +141,13 @@ extension Berry {
     }
 
     func with(
-        color: Color?? = nil,
         name: String?? = nil,
+        color: Color?? = nil,
         shapes: [Shape]?? = nil
     ) -> Berry {
         return Berry(
-            color: color ?? self.color,
             name: name ?? self.name,
+            color: color ?? self.color,
             shapes: shapes ?? self.shapes
         )
     }
@@ -207,12 +207,12 @@ extension Color {
 
 // MARK: - Shape
 struct Shape: Codable {
-    let geometry: Geometry?
     let history: History?
+    let geometry: Geometry?
 
     enum CodingKeys: String, CodingKey {
-        case geometry = "geometry"
         case history = "history"
+        case geometry = "geometry"
     }
 }
 
@@ -235,12 +235,12 @@ extension Shape {
     }
 
     func with(
-        geometry: Geometry?? = nil,
-        history: History?? = nil
+        history: History?? = nil,
+        geometry: Geometry?? = nil
     ) -> Shape {
         return Shape(
-            geometry: geometry ?? self.geometry,
-            history: history ?? self.history
+            history: history ?? self.history,
+            geometry: geometry ?? self.geometry
         )
     }
 
@@ -391,14 +391,14 @@ extension RectShape {
 
 // MARK: - Part
 struct Part: Codable {
-    let depth: String?
     let length: String?
     let width: String?
+    let depth: String?
 
     enum CodingKeys: String, CodingKey {
-        case depth = "depth"
         case length = "length"
         case width = "width"
+        case depth = "depth"
     }
 }
 
@@ -421,14 +421,14 @@ extension Part {
     }
 
     func with(
-        depth: String?? = nil,
         length: String?? = nil,
-        width: String?? = nil
+        width: String?? = nil,
+        depth: String?? = nil
     ) -> Part {
         return Part(
-            depth: depth ?? self.depth,
             length: length ?? self.length,
-            width: width ?? self.width
+            width: width ?? self.width,
+            depth: depth ?? self.depth
         )
     }
 
@@ -487,20 +487,20 @@ extension History {
 
 // MARK: - Vehicle
 struct Vehicle: Codable {
-    let brand: String?
     let id: String?
-    let speed: Speed?
-    let subModule: Bool?
     let type: VehicleType?
+    let speed: Speed?
     let year: String?
+    let brand: String?
+    let subModule: Bool?
 
     enum CodingKeys: String, CodingKey {
-        case brand = "brand"
         case id = "id"
-        case speed = "speed"
-        case subModule = "subModule"
         case type = "type"
+        case speed = "speed"
         case year = "year"
+        case brand = "brand"
+        case subModule = "subModule"
     }
 }
 
@@ -523,20 +523,20 @@ extension Vehicle {
     }
 
     func with(
-        brand: String?? = nil,
         id: String?? = nil,
-        speed: Speed?? = nil,
-        subModule: Bool?? = nil,
         type: VehicleType?? = nil,
-        year: String?? = nil
+        speed: Speed?? = nil,
+        year: String?? = nil,
+        brand: String?? = nil,
+        subModule: Bool?? = nil
     ) -> Vehicle {
         return Vehicle(
-            brand: brand ?? self.brand,
             id: id ?? self.id,
-            speed: speed ?? self.speed,
-            subModule: subModule ?? self.subModule,
             type: type ?? self.type,
-            year: year ?? self.year
+            speed: speed ?? self.speed,
+            year: year ?? self.year,
+            brand: brand ?? self.brand,
+            subModule: subModule ?? self.subModule
         )
     }
 
@@ -595,12 +595,12 @@ extension Speed {
 
 // MARK: - Limit
 struct Limit: Codable {
-    let maximum: Double?
     let minimum: Double?
+    let maximum: Double?
 
     enum CodingKeys: String, CodingKey {
-        case maximum = "maximum"
         case minimum = "minimum"
+        case maximum = "maximum"
     }
 }
 
@@ -623,12 +623,12 @@ extension Limit {
     }
 
     func with(
-        maximum: Double?? = nil,
-        minimum: Double?? = nil
+        minimum: Double?? = nil,
+        maximum: Double?? = nil
     ) -> Limit {
         return Limit(
-            maximum: maximum ?? self.maximum,
-            minimum: minimum ?? self.minimum
+            minimum: minimum ?? self.minimum,
+            maximum: maximum ?? self.maximum
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.swift
index 94813e3..bf39d9b 100644
--- a/base/schema-swift/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/rust-cycle-breaker-union.schema/default/quicktype.swift
@@ -7,12 +7,12 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let next: Next?
     let value: String
+    let next: Next?
 
     enum CodingKeys: String, CodingKey {
-        case next = "next"
         case value = "value"
+        case next = "next"
     }
 }
 
@@ -35,12 +35,12 @@ extension TopLevel {
     }
 
     func with(
-        next: Next?? = nil,
-        value: String? = nil
+        value: String? = nil,
+        next: Next?? = nil
     ) -> TopLevel {
         return TopLevel(
-            next: next ?? self.next,
-            value: value ?? self.value
+            value: value ?? self.value,
+            next: next ?? self.next
         )
     }
 
@@ -55,12 +55,12 @@ extension TopLevel {
 
 // MARK: - Node
 struct Node: Codable {
-    let next: Next?
     let value: String
+    let next: Next?
 
     enum CodingKeys: String, CodingKey {
-        case next = "next"
         case value = "value"
+        case next = "next"
     }
 }
 
@@ -83,12 +83,12 @@ extension Node {
     }
 
     func with(
-        next: Next?? = nil,
-        value: String? = nil
+        value: String? = nil,
+        next: Next?? = nil
     ) -> Node {
         return Node(
-            next: next ?? self.next,
-            value: value ?? self.value
+            value: value ?? self.value,
+            next: next ?? self.next
         )
     }
 
diff --git a/base/schema-swift/test/inputs/schema/uuid.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/uuid.schema/default/quicktype.swift
index 3f502d2..ba997a0 100644
--- a/base/schema-swift/test/inputs/schema/uuid.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/uuid.schema/default/quicktype.swift
@@ -7,19 +7,19 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
-    let arrNullable: [String?]?
-    let arrOne: [String]?
-    let nullable: String?
     let one: String
     let topLevelOptional: String?
+    let nullable: String?
+    let arrOne: [String]?
+    let arrNullable: [String?]?
     let unionWithEnum: String
 
     enum CodingKeys: String, CodingKey {
-        case arrNullable = "arrNullable"
-        case arrOne = "arrOne"
-        case nullable = "nullable"
         case one = "one"
         case topLevelOptional = "optional"
+        case nullable = "nullable"
+        case arrOne = "arrOne"
+        case arrNullable = "arrNullable"
         case unionWithEnum = "unionWithEnum"
     }
 }
@@ -43,19 +43,19 @@ extension TopLevel {
     }
 
     func with(
-        arrNullable: [String?]?? = nil,
-        arrOne: [String]?? = nil,
-        nullable: String?? = nil,
         one: String? = nil,
         topLevelOptional: String?? = nil,
+        nullable: String?? = nil,
+        arrOne: [String]?? = nil,
+        arrNullable: [String?]?? = nil,
         unionWithEnum: String? = nil
     ) -> TopLevel {
         return TopLevel(
-            arrNullable: arrNullable ?? self.arrNullable,
-            arrOne: arrOne ?? self.arrOne,
-            nullable: nullable ?? self.nullable,
             one: one ?? self.one,
             topLevelOptional: topLevelOptional ?? self.topLevelOptional,
+            nullable: nullable ?? self.nullable,
+            arrOne: arrOne ?? self.arrOne,
+            arrNullable: arrNullable ?? self.arrNullable,
             unionWithEnum: unionWithEnum ?? self.unionWithEnum
         )
     }
diff --git a/base/schema-typescript/test/inputs/schema/accessors.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/accessors.schema/default/TopLevel.ts
index e05d9a8..740010c 100644
--- a/base/schema-typescript/test/inputs/schema/accessors.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/accessors.schema/default/TopLevel.ts
@@ -8,10 +8,10 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    bar:   string;
+    union: Union;
     enum:  Enum;
     foo:   string;
-    union: Union;
+    bar:   string;
 }
 
 export type Enum = "red" | "green" | "blue";
@@ -185,10 +185,10 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: "" },
+        { json: "union", js: "union", typ: u(true, 3.14) },
         { json: "enum", js: "enum", typ: r("Enum") },
         { json: "foo", js: "foo", typ: "" },
-        { json: "union", js: "union", typ: u(true, 3.14) },
+        { json: "bar", js: "bar", typ: "" },
     ], false),
     "Enum": [
         "red",
diff --git a/base/schema-typescript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.ts
index b0dd849..08ce322 100644
--- a/base/schema-typescript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.ts
@@ -10,8 +10,8 @@
 export interface TopLevel {
     amount:       number;
     frequency:    Frequency;
-    description?: string;
     type:         Type;
+    description?: string;
 }
 
 export type Frequency = "Weekly" | "Monthly" | "Annually";
@@ -187,8 +187,8 @@ const typeMap: any = {
     "TopLevel": o([
         { json: "amount", js: "amount", typ: 3.14 },
         { json: "frequency", js: "frequency", typ: r("Frequency") },
-        { json: "description", js: "description", typ: u(undefined, "") },
         { json: "type", js: "type", typ: r("Type") },
+        { json: "description", js: "description", typ: u(undefined, "") },
     ], false),
     "Frequency": [
         "Weekly",
diff --git a/base/schema-typescript/test/inputs/schema/bool-string.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/bool-string.schema/default/TopLevel.ts
index 5833a0e..8b5ba79 100644
--- a/base/schema-typescript/test/inputs/schema/bool-string.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/bool-string.schema/default/TopLevel.ts
@@ -8,11 +8,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    arrNullable?:         (null | string)[];
-    arrOne?:              string[];
-    nullable:             null | string;
     one:                  string;
     optional?:            string;
+    nullable:             null | string;
+    arrOne?:              string[];
+    arrNullable?:         (null | string)[];
     unionWithBool:        UnionWithBool;
     unionWithBoolAndEnum: UnionWithBool;
     [property: string]: unknown;
@@ -187,11 +187,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
-        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
-        { json: "nullable", js: "nullable", typ: u(null, "") },
         { json: "one", js: "one", typ: "" },
         { json: "optional", js: "optional", typ: u(undefined, "") },
+        { json: "nullable", js: "nullable", typ: u(null, "") },
+        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
+        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
         { json: "unionWithBool", js: "unionWithBool", typ: u(true, "") },
         { json: "unionWithBoolAndEnum", js: "unionWithBoolAndEnum", typ: u(true, "") },
     ], "any"),
diff --git a/base/schema-typescript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts
index b36493c..d828ee4 100644
--- a/base/schema-typescript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts
@@ -8,9 +8,9 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
+    foo:         string;
     disallowed?: unknown;
     empty:       unknown[];
-    foo:         string;
     impossible?: unknown;
 }
 
@@ -181,9 +181,9 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "foo", js: "foo", typ: "" },
         { json: "disallowed", js: "disallowed", typ: u(undefined, "any") },
         { json: "empty", js: "empty", typ: a("any") },
-        { json: "foo", js: "foo", typ: "" },
         { json: "impossible", js: "impossible", typ: u(undefined, "any") },
     ], false),
 };
diff --git a/base/schema-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
index 00f72f9..163aff5 100644
--- a/base/schema-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
@@ -22,18 +22,6 @@
  * }
  */
 export interface TopLevel {
-    /**
-     * Ends with a backslash \
-     */
-    trailingBackslash?: string;
-    /**
-     * Ends with a quote "
-     */
-    trailingQuote?: string;
-    /**
-     * Ends with a triple quote """
-     */
-    trailingTripleQuote?: string;
     /**
      * Property delimiters:
      * * /
@@ -49,6 +37,18 @@ export interface TopLevel {
      * }
      */
     value: string;
+    /**
+     * Ends with a backslash \
+     */
+    trailingBackslash?: string;
+    /**
+     * Ends with a quote "
+     */
+    trailingQuote?: string;
+    /**
+     * Ends with a triple quote """
+     */
+    trailingTripleQuote?: string;
 }
 
 // Converts JSON strings to/from your types
@@ -218,9 +218,9 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "value", js: "value", typ: "" },
         { json: "trailingBackslash", js: "trailingBackslash", typ: u(undefined, "") },
         { json: "trailingQuote", js: "trailingQuote", typ: u(undefined, "") },
         { json: "trailingTripleQuote", js: "trailingTripleQuote", typ: u(undefined, "") },
-        { json: "value", js: "value", typ: "" },
     ], false),
 };
diff --git a/base/schema-typescript/test/inputs/schema/const-non-string.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/const-non-string.schema/default/TopLevel.ts
index bca8bb4..d79cb3f 100644
--- a/base/schema-typescript/test/inputs/schema/const-non-string.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/const-non-string.schema/default/TopLevel.ts
@@ -8,11 +8,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
+    version: number;
     amount:  number;
+    ratio:   number;
     enabled: boolean;
     kind:    Kind;
-    ratio:   number;
-    version: number;
     [property: string]: unknown;
 }
 
@@ -185,11 +185,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "version", js: "version", typ: 3.14 },
         { json: "amount", js: "amount", typ: 0 },
+        { json: "ratio", js: "ratio", typ: 3.14 },
         { json: "enabled", js: "enabled", typ: true },
         { json: "kind", js: "kind", typ: r("Kind") },
-        { json: "ratio", js: "ratio", typ: 3.14 },
-        { json: "version", js: "version", typ: 3.14 },
     ], "any"),
     "Kind": [
         "widget",
diff --git a/base/schema-typescript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts
index 60c8d0a..32c223f 100644
--- a/base/schema-typescript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts
@@ -8,8 +8,8 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    bar: BarUnion;
     foo: string;
+    bar: BarUnion;
     [property: string]: unknown;
 }
 
@@ -184,8 +184,8 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: u(Date, r("BarEnum")) },
         { json: "foo", js: "foo", typ: "" },
+        { json: "bar", js: "bar", typ: u(Date, r("BarEnum")) },
     ], "any"),
     "BarEnum": [
         "quux",
diff --git a/base/schema-typescript/test/inputs/schema/date-time.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/date-time.schema/default/TopLevel.ts
index 69c36a8..ac1f2a0 100644
--- a/base/schema-typescript/test/inputs/schema/date-time.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/date-time.schema/default/TopLevel.ts
@@ -8,11 +8,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    "complex-union-array": ComplexUnionArrayElement[];
     date:                  Date;
-    "date-time":           Date;
     time:                  string;
+    "date-time":           Date;
     "union-array":         string[];
+    "complex-union-array": ComplexUnionArrayElement[];
 }
 
 export type ComplexUnionArrayElement = Date | ComplexUnionArrayEnum | number;
@@ -186,11 +186,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "complex-union-array", js: "complex-union-array", typ: a(u(Date, r("ComplexUnionArrayEnum"), 0)) },
         { json: "date", js: "date", typ: Date },
-        { json: "date-time", js: "date-time", typ: Date },
         { json: "time", js: "time", typ: "" },
+        { json: "date-time", js: "date-time", typ: Date },
         { json: "union-array", js: "union-array", typ: a("") },
+        { json: "complex-union-array", js: "complex-union-array", typ: a(u(Date, r("ComplexUnionArrayEnum"), 0)) },
     ], false),
     "ComplexUnionArrayEnum": [
         "foo",
diff --git a/base/schema-typescript/test/inputs/schema/description.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/description.schema/default/TopLevel.ts
index c0371fb..d0dbf2f 100644
--- a/base/schema-typescript/test/inputs/schema/description.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/description.schema/default/TopLevel.ts
@@ -13,19 +13,19 @@
  */
 export interface TopLevel {
     /**
-     * A pretty boolean
+     * Either a number or a string
      */
-    bar?: boolean;
+    union: Union;
     /**
      * An enumeration
      */
-    enum:               Enum;
-    foo?:               number;
-    "object-or-string": ObjectOrStringUnion;
+    enum: Enum;
+    foo?: number;
     /**
-     * Either a number or a string
+     * A pretty boolean
      */
-    union: Union;
+    bar?:               boolean;
+    "object-or-string": ObjectOrStringUnion;
 }
 
 /**
@@ -215,11 +215,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: u(undefined, true) },
+        { json: "union", js: "union", typ: u(3.14, "") },
         { json: "enum", js: "enum", typ: r("Enum") },
         { json: "foo", js: "foo", typ: u(undefined, 3.14) },
+        { json: "bar", js: "bar", typ: u(undefined, true) },
         { json: "object-or-string", js: "object-or-string", typ: u(r("ObjectOrStringObject"), "") },
-        { json: "union", js: "union", typ: u(3.14, "") },
     ], false),
     "ObjectOrStringObject": o([
         { json: "prop", js: "prop", typ: 3.14 },
diff --git a/base/schema-typescript/test/inputs/schema/direct-union.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/direct-union.schema/default/TopLevel.ts
index 6e28bc8..cd3a04e 100644
--- a/base/schema-typescript/test/inputs/schema/direct-union.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/direct-union.schema/default/TopLevel.ts
@@ -12,8 +12,8 @@ export interface TopLevel {
 }
 
 export interface Thing {
-    optional?: Anything;
     required:  Anything;
+    optional?: Anything;
 }
 
 export type Anything = unknown[] | boolean | number | number | { [key: string]: unknown } | null | string;
@@ -188,7 +188,7 @@ const typeMap: any = {
         { json: "stuff", js: "stuff", typ: m(r("Thing")) },
     ], false),
     "Thing": o([
-        { json: "optional", js: "optional", typ: u(undefined, u(a("any"), true, 3.14, 0, m("any"), null, "")) },
         { json: "required", js: "required", typ: u(a("any"), true, 3.14, 0, m("any"), null, "") },
+        { json: "optional", js: "optional", typ: u(undefined, u(a("any"), true, 3.14, 0, m("any"), null, "")) },
     ], false),
 };
diff --git a/base/schema-typescript/test/inputs/schema/enum.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/enum.schema/default/TopLevel.ts
index 5e635de..f056232 100644
--- a/base/schema-typescript/test/inputs/schema/enum.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/enum.schema/default/TopLevel.ts
@@ -8,11 +8,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    arr?:      Arr[];
-    for?:      string;
-    gve:       Gve;
     lvc?:      Lvc;
+    gve:       Gve;
+    arr?:      Arr[];
     otherArr?: OtherArr[];
+    for?:      string;
     [property: string]: unknown;
 }
 
@@ -191,11 +191,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "arr", js: "arr", typ: u(undefined, a(u(r("OtherArr"), 0))) },
-        { json: "for", js: "for", typ: u(undefined, "") },
-        { json: "gve", js: "gve", typ: r("Gve") },
         { json: "lvc", js: "lvc", typ: u(undefined, r("Lvc")) },
+        { json: "gve", js: "gve", typ: r("Gve") },
+        { json: "arr", js: "arr", typ: u(undefined, a(u(r("OtherArr"), 0))) },
         { json: "otherArr", js: "otherArr", typ: u(undefined, a(r("OtherArr"))) },
+        { json: "for", js: "for", typ: u(undefined, "") },
     ], "any"),
     "OtherArr": [
         "foo",
diff --git a/base/schema-typescript/test/inputs/schema/integer-string.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/integer-string.schema/default/TopLevel.ts
index eecf149..97270ec 100644
--- a/base/schema-typescript/test/inputs/schema/integer-string.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/integer-string.schema/default/TopLevel.ts
@@ -8,11 +8,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    arrNullable?:        (null | string)[];
-    arrOne?:             string[];
-    nullable:            null | string;
     one:                 string;
     optional?:           string;
+    nullable:            null | string;
+    arrOne?:             string[];
+    arrNullable?:        (null | string)[];
     unionWithInt:        UnionWithInt;
     unionWithIntAndEnum: UnionWithInt;
     [property: string]: unknown;
@@ -187,11 +187,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
-        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
-        { json: "nullable", js: "nullable", typ: u(null, "") },
         { json: "one", js: "one", typ: "" },
         { json: "optional", js: "optional", typ: u(undefined, "") },
+        { json: "nullable", js: "nullable", typ: u(null, "") },
+        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
+        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
         { json: "unionWithInt", js: "unionWithInt", typ: u(0, "") },
         { json: "unionWithIntAndEnum", js: "unionWithIntAndEnum", typ: u(0, "") },
     ], "any"),
diff --git a/base/schema-typescript/test/inputs/schema/integer-type.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/integer-type.schema/default/TopLevel.ts
index f174ca7..16fd70c 100644
--- a/base/schema-typescript/test/inputs/schema/integer-type.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/integer-type.schema/default/TopLevel.ts
@@ -8,15 +8,15 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
+    small_positive: number;
+    small_negative: number;
+    i32_range:      number;
     above_i32_max:  number;
     below_i32_min:  number;
-    i32_range:      number;
-    large_bounds:   number;
-    only_maximum:   number;
     only_minimum:   number;
-    small_negative: number;
-    small_positive: number;
+    only_maximum:   number;
     unbounded:      number;
+    large_bounds:   number;
     [property: string]: unknown;
 }
 
@@ -187,14 +187,14 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "small_positive", js: "small_positive", typ: 0 },
+        { json: "small_negative", js: "small_negative", typ: 0 },
+        { json: "i32_range", js: "i32_range", typ: 0 },
         { json: "above_i32_max", js: "above_i32_max", typ: 0 },
         { json: "below_i32_min", js: "below_i32_min", typ: 0 },
-        { json: "i32_range", js: "i32_range", typ: 0 },
-        { json: "large_bounds", js: "large_bounds", typ: 0 },
-        { json: "only_maximum", js: "only_maximum", typ: 0 },
         { json: "only_minimum", js: "only_minimum", typ: 0 },
-        { json: "small_negative", js: "small_negative", typ: 0 },
-        { json: "small_positive", js: "small_positive", typ: 0 },
+        { json: "only_maximum", js: "only_maximum", typ: 0 },
         { json: "unbounded", js: "unbounded", typ: 0 },
+        { json: "large_bounds", js: "large_bounds", typ: 0 },
     ], "any"),
 };
diff --git a/base/schema-typescript/test/inputs/schema/light.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/light.schema/default/TopLevel.ts
index 61a0d7c..7f5e129 100644
--- a/base/schema-typescript/test/inputs/schema/light.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/light.schema/default/TopLevel.ts
@@ -12,8 +12,8 @@ export interface TopLevel {
 }
 
 export interface LightParams {
-    app_id:    string;
     outlet_id: string;
+    app_id:    string;
     rgba:      string;
 }
 
@@ -187,8 +187,8 @@ const typeMap: any = {
         { json: "LightParams", js: "LightParams", typ: r("LightParams") },
     ], false),
     "LightParams": o([
-        { json: "app_id", js: "app_id", typ: "" },
         { json: "outlet_id", js: "outlet_id", typ: "" },
+        { json: "app_id", js: "app_id", typ: "" },
         { json: "rgba", js: "rgba", typ: "" },
     ], false),
 };
diff --git a/base/schema-typescript/test/inputs/schema/min-max-items.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/min-max-items.schema/default/TopLevel.ts
index fc04720..640ff51 100644
--- a/base/schema-typescript/test/inputs/schema/min-max-items.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/min-max-items.schema/default/TopLevel.ts
@@ -8,9 +8,9 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
+    minOnly:    [string, string, ...string[]];
     maxOnly:    number[];
     minAndMax:  [number, ...number[]];
-    minOnly:    [string, string, ...string[]];
     plain:      string[];
     unionItems: [UnionItem, UnionItem, ...UnionItem[]];
     [property: string]: unknown;
@@ -185,9 +185,9 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "minOnly", js: "minOnly", typ: a("") },
         { json: "maxOnly", js: "maxOnly", typ: a(0) },
         { json: "minAndMax", js: "minAndMax", typ: a(3.14) },
-        { json: "minOnly", js: "minOnly", typ: a("") },
         { json: "plain", js: "plain", typ: a("") },
         { json: "unionItems", js: "unionItems", typ: a(u(0, "")) },
     ], "any"),
diff --git a/base/schema-typescript/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts
index 96ec418..bba708d 100644
--- a/base/schema-typescript/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts
@@ -9,13 +9,13 @@
 
 export interface TopLevel {
     free:               number;
-    intersection:       number;
-    max:                number;
     min:                number;
+    max:                number;
     minmax:             number;
-    minMaxIntersection: number;
-    minMaxUnion:        number;
     union:              number;
+    minMaxUnion:        number;
+    intersection:       number;
+    minMaxIntersection: number;
     [property: string]: unknown;
 }
 
@@ -187,12 +187,12 @@ function r(name: string) {
 const typeMap: any = {
     "TopLevel": o([
         { json: "free", js: "free", typ: 0 },
-        { json: "intersection", js: "intersection", typ: 0 },
-        { json: "max", js: "max", typ: 0 },
         { json: "min", js: "min", typ: 0 },
+        { json: "max", js: "max", typ: 0 },
         { json: "minmax", js: "minmax", typ: 0 },
-        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 0 },
-        { json: "minMaxUnion", js: "minMaxUnion", typ: 0 },
         { json: "union", js: "union", typ: 0 },
+        { json: "minMaxUnion", js: "minMaxUnion", typ: 0 },
+        { json: "intersection", js: "intersection", typ: 0 },
+        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 0 },
     ], "any"),
 };
diff --git a/base/schema-typescript/test/inputs/schema/minmax.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/minmax.schema/default/TopLevel.ts
index 28e002d..7bcc5f8 100644
--- a/base/schema-typescript/test/inputs/schema/minmax.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/minmax.schema/default/TopLevel.ts
@@ -9,13 +9,13 @@
 
 export interface TopLevel {
     free:               number;
-    intersection:       number;
-    max:                number;
     min:                number;
+    max:                number;
     minmax:             number;
-    minMaxIntersection: number;
-    minMaxUnion:        number;
     union:              number;
+    minMaxUnion:        number;
+    intersection:       number;
+    minMaxIntersection: number;
     [property: string]: unknown;
 }
 
@@ -187,12 +187,12 @@ function r(name: string) {
 const typeMap: any = {
     "TopLevel": o([
         { json: "free", js: "free", typ: 3.14 },
-        { json: "intersection", js: "intersection", typ: 3.14 },
-        { json: "max", js: "max", typ: 3.14 },
         { json: "min", js: "min", typ: 3.14 },
+        { json: "max", js: "max", typ: 3.14 },
         { json: "minmax", js: "minmax", typ: 3.14 },
-        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 3.14 },
-        { json: "minMaxUnion", js: "minMaxUnion", typ: 3.14 },
         { json: "union", js: "union", typ: 3.14 },
+        { json: "minMaxUnion", js: "minMaxUnion", typ: 3.14 },
+        { json: "intersection", js: "intersection", typ: 3.14 },
+        { json: "minMaxIntersection", js: "minMaxIntersection", typ: 3.14 },
     ], "any"),
 };
diff --git a/base/schema-typescript/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
index adc9f79..f2dc5cd 100644
--- a/base/schema-typescript/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
@@ -8,14 +8,14 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    intersection:       string;
-    inUnion:            InUnion;
-    maxlength:          string;
     minlength:          string;
-    minMaxIntersection: string;
+    maxlength:          string;
     minmaxlength:       string;
-    minMaxUnion:        string;
     union:              string;
+    inUnion:            InUnion;
+    minMaxUnion:        string;
+    intersection:       string;
+    minMaxIntersection: string;
     [property: string]: unknown;
 }
 
@@ -188,13 +188,13 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "intersection", js: "intersection", typ: "" },
-        { json: "inUnion", js: "inUnion", typ: u(3.14, "") },
-        { json: "maxlength", js: "maxlength", typ: "" },
         { json: "minlength", js: "minlength", typ: "" },
-        { json: "minMaxIntersection", js: "minMaxIntersection", typ: "" },
+        { json: "maxlength", js: "maxlength", typ: "" },
         { json: "minmaxlength", js: "minmaxlength", typ: "" },
-        { json: "minMaxUnion", js: "minMaxUnion", typ: "" },
         { json: "union", js: "union", typ: "" },
+        { json: "inUnion", js: "inUnion", typ: u(3.14, "") },
+        { json: "minMaxUnion", js: "minMaxUnion", typ: "" },
+        { json: "intersection", js: "intersection", typ: "" },
+        { json: "minMaxIntersection", js: "minMaxIntersection", typ: "" },
     ], "any"),
 };
diff --git a/base/schema-typescript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts
index 36a9e74..3efaa69 100644
--- a/base/schema-typescript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts
@@ -8,8 +8,8 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    bar:  number;
     foo:  number;
+    bar:  number;
     quux: boolean;
     [property: string]: unknown;
 }
@@ -181,8 +181,8 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: 0 },
         { json: "foo", js: "foo", typ: 0 },
+        { json: "bar", js: "bar", typ: 0 },
         { json: "quux", js: "quux", typ: true },
     ], "any"),
 };
diff --git a/base/schema-typescript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.ts
index b5c10df..c5bcdee 100644
--- a/base/schema-typescript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.ts
@@ -8,8 +8,8 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    b?:   null | string;
     kind: Kind;
+    b?:   null | string;
     [property: string]: unknown;
 }
 
@@ -182,8 +182,8 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "b", js: "b", typ: u(undefined, u(null, "")) },
         { json: "kind", js: "kind", typ: r("Kind") },
+        { json: "b", js: "b", typ: u(undefined, u(null, "")) },
     ], "any"),
     "Kind": [
         "one",
diff --git a/base/schema-typescript/test/inputs/schema/optional-any.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/optional-any.schema/default/TopLevel.ts
index 9e9d082..e017cd0 100644
--- a/base/schema-typescript/test/inputs/schema/optional-any.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/optional-any.schema/default/TopLevel.ts
@@ -8,8 +8,8 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    bar:  boolean;
     foo?: unknown;
+    bar:  boolean;
 }
 
 // Converts JSON strings to/from your types
@@ -179,7 +179,7 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "bar", js: "bar", typ: true },
         { json: "foo", js: "foo", typ: u(undefined, "any") },
+        { json: "bar", js: "bar", typ: true },
     ], false),
 };
diff --git a/base/schema-typescript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
index cac062c..5d69e72 100644
--- a/base/schema-typescript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
@@ -9,12 +9,12 @@
 
 export interface TopLevel {
     coordinates?:        Coordinate[];
-    count?:              number;
-    label?:              string;
     requiredCoordinates: Coordinate[];
+    count?:              number;
     requiredCount:       number;
-    requiredLabel:       string;
     weight?:             number;
+    label?:              string;
+    requiredLabel:       string;
 }
 
 export interface Coordinate {
@@ -190,12 +190,12 @@ function r(name: string) {
 const typeMap: any = {
     "TopLevel": o([
         { json: "coordinates", js: "coordinates", typ: u(undefined, a(r("Coordinate"))) },
-        { json: "count", js: "count", typ: u(undefined, 0) },
-        { json: "label", js: "label", typ: u(undefined, "") },
         { json: "requiredCoordinates", js: "requiredCoordinates", typ: a(r("Coordinate")) },
+        { json: "count", js: "count", typ: u(undefined, 0) },
         { json: "requiredCount", js: "requiredCount", typ: 0 },
-        { json: "requiredLabel", js: "requiredLabel", typ: "" },
         { json: "weight", js: "weight", typ: u(undefined, 3.14) },
+        { json: "label", js: "label", typ: u(undefined, "") },
+        { json: "requiredLabel", js: "requiredLabel", typ: "" },
     ], false),
     "Coordinate": o([
         { json: "latitude", js: "latitude", typ: 3.14 },
diff --git a/base/schema-typescript/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
index e4f882c..50ee55f 100644
--- a/base/schema-typescript/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
@@ -8,11 +8,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    optDouble?:  number;
+    reqZeroMin:  number;
     optInt?:     number;
-    optPattern?: string;
+    optDouble?:  number;
     optString?:  string;
-    reqZeroMin:  number;
+    optPattern?: string;
     [property: string]: unknown;
 }
 
@@ -183,10 +183,10 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "optDouble", js: "optDouble", typ: u(undefined, 3.14) },
+        { json: "reqZeroMin", js: "reqZeroMin", typ: 0 },
         { json: "optInt", js: "optInt", typ: u(undefined, 0) },
-        { json: "optPattern", js: "optPattern", typ: u(undefined, "") },
+        { json: "optDouble", js: "optDouble", typ: u(undefined, 3.14) },
         { json: "optString", js: "optString", typ: u(undefined, "") },
-        { json: "reqZeroMin", js: "reqZeroMin", typ: 0 },
+        { json: "optPattern", js: "optPattern", typ: u(undefined, "") },
     ], "any"),
 };
diff --git a/base/schema-typescript/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts
index cf09c13..73fe4d7 100644
--- a/base/schema-typescript/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts
@@ -8,12 +8,12 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    "optional-date"?:      Date;
-    "optional-date-time"?: Date;
-    "optional-time"?:      string;
     "required-date":       Date;
-    "required-date-time":  Date;
     "required-time":       string;
+    "required-date-time":  Date;
+    "optional-date"?:      Date;
+    "optional-time"?:      string;
+    "optional-date-time"?: Date;
 }
 
 // Converts JSON strings to/from your types
@@ -183,11 +183,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "optional-date", js: "optional-date", typ: u(undefined, Date) },
-        { json: "optional-date-time", js: "optional-date-time", typ: u(undefined, Date) },
-        { json: "optional-time", js: "optional-time", typ: u(undefined, "") },
         { json: "required-date", js: "required-date", typ: Date },
-        { json: "required-date-time", js: "required-date-time", typ: Date },
         { json: "required-time", js: "required-time", typ: "" },
+        { json: "required-date-time", js: "required-date-time", typ: Date },
+        { json: "optional-date", js: "optional-date", typ: u(undefined, Date) },
+        { json: "optional-time", js: "optional-time", typ: u(undefined, "") },
+        { json: "optional-date-time", js: "optional-date-time", typ: u(undefined, Date) },
     ], false),
 };
diff --git a/base/schema-typescript/test/inputs/schema/prefix-items.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/prefix-items.schema/default/TopLevel.ts
index d3455e3..8b8ac3c 100644
--- a/base/schema-typescript/test/inputs/schema/prefix-items.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/prefix-items.schema/default/TopLevel.ts
@@ -8,8 +8,8 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    open:  Open[];
     tuple: Open[];
+    open:  Open[];
     [property: string]: unknown;
 }
 
@@ -182,7 +182,7 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "open", js: "open", typ: a(u(true, 0)) },
         { json: "tuple", js: "tuple", typ: a(u(true, 0)) },
+        { json: "open", js: "open", typ: a(u(true, 0)) },
     ], "any"),
 };
diff --git a/head/schema-typescript/test/inputs/schema/property-order.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/property-order.schema/default/TopLevel.ts
new file mode 100644
index 0000000..db5723c
--- /dev/null
+++ b/head/schema-typescript/test/inputs/schema/property-order.schema/default/TopLevel.ts
@@ -0,0 +1,204 @@
+// To parse this data:
+//
+//   import { Convert, TopLevel } from "./TopLevel";
+//
+//   const topLevel = Convert.toTopLevel(json);
+//
+// These functions will throw an error if the JSON doesn't
+// match the expected interface, even if the JSON is valid.
+
+export interface TopLevel {
+    zebra:   string;
+    mango:   number;
+    apple:   boolean;
+    delta:   string;
+    banana:  number;
+    ordered: Ordered;
+}
+
+export interface Ordered {
+    mango: number;
+    zebra: string;
+    apple: boolean;
+}
+
+// Converts JSON strings to/from your types
+// and asserts the results of JSON.parse at runtime
+export class Convert {
+    public static toTopLevel(json: string): TopLevel {
+        return cast(JSON.parse(json), r("TopLevel"));
+    }
+
+    public static topLevelToJson(value: TopLevel): string {
+        return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
+    }
+}
+
+function invalidValue(typ: any, val: any, key: any, parent: any = ''): never {
+    const prettyTyp = prettyTypeName(typ);
+    const parentText = parent ? ` on ${parent}` : '';
+    const keyText = key ? ` for key "${key}"` : '';
+    throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
+}
+
+function prettyTypeName(typ: any): string {
+    if (Array.isArray(typ)) {
+        if (typ.length === 2 && typ[0] === undefined) {
+            return `an optional ${prettyTypeName(typ[1])}`;
+        } else {
+            return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
+        }
+    } else if (typeof typ === "object" && typ.literal !== undefined) {
+        return typ.literal;
+    } else {
+        return typeof typ;
+    }
+}
+
+function jsonToJSProps(typ: any): any {
+    if (typ.jsonToJS === undefined) {
+        const map: any = {};
+        typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });
+        typ.jsonToJS = map;
+    }
+    return typ.jsonToJS;
+}
+
+function jsToJSONProps(typ: any): any {
+    if (typ.jsToJSON === undefined) {
+        const map: any = {};
+        typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });
+        typ.jsToJSON = map;
+    }
+    return typ.jsToJSON;
+}
+
+function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any {
+    function transformPrimitive(typ: string, val: any): any {
+        if (typeof typ === typeof val) return val;
+        return invalidValue(typ, val, key, parent);
+    }
+
+    function transformUnion(typs: any[], val: any): any {
+        // val must validate against one typ in typs
+        const l = typs.length;
+        for (let i = 0; i < l; i++) {
+            const typ = typs[i];
+            try {
+                return transform(val, typ, getProps);
+            } catch (_) {}
+        }
+        return invalidValue(typs, val, key, parent);
+    }
+
+    function transformEnum(cases: string[], val: any): any {
+        if (cases.indexOf(val) !== -1) return val;
+        return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
+    }
+
+    function transformArray(typ: any, val: any): any {
+        // val must be an array with no invalid elements
+        if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
+        return val.map(el => transform(el, typ, getProps));
+    }
+
+    function transformDate(val: any): any {
+        if (val === null) {
+            return null;
+        }
+        const d = new Date(val);
+        if (isNaN(d.valueOf())) {
+            return invalidValue(l("Date"), val, key, parent);
+        }
+        return d;
+    }
+
+    function transformObject(props: { [k: string]: any }, additional: any, val: any): any {
+        if (val === null || typeof val !== "object" || Array.isArray(val)) {
+            return invalidValue(l(ref || "object"), val, key, parent);
+        }
+        const result: any = {};
+        Object.getOwnPropertyNames(props).forEach(key => {
+            const prop = props[key];
+            const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
+            result[prop.key] = transform(v, prop.typ, getProps, key, ref);
+        });
+        Object.getOwnPropertyNames(val).forEach(key => {
+            if (!Object.prototype.hasOwnProperty.call(props, key)) {
+                result[key] = transform(val[key], additional, getProps, key, ref);
+            }
+        });
+        return result;
+    }
+
+    if (typ === "any") return val;
+    if (typ === null) {
+        if (val === null) return val;
+        return invalidValue(typ, val, key, parent);
+    }
+    if (typ === false) return invalidValue(typ, val, key, parent);
+    let ref: any = undefined;
+    while (typeof typ === "object" && typ.ref !== undefined) {
+        ref = typ.ref;
+        typ = typeMap[typ.ref];
+    }
+    if (Array.isArray(typ)) return transformEnum(typ, val);
+    if (typeof typ === "object") {
+        return typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
+            : typ.hasOwnProperty("arrayItems")    ? transformArray(typ.arrayItems, val)
+            : typ.hasOwnProperty("props")         ? transformObject(getProps(typ), typ.additional, val)
+            : invalidValue(typ, val, key, parent);
+    }
+    // Numbers can be parsed by Date but shouldn't be.
+    if (typ === Date && typeof val !== "number") return transformDate(val);
+    return transformPrimitive(typ, val);
+}
+
+function cast<T>(val: any, typ: any): T {
+    return transform(val, typ, jsonToJSProps);
+}
+
+function uncast<T>(val: T, typ: any): any {
+    return transform(val, typ, jsToJSONProps);
+}
+
+function l(typ: any) {
+    return { literal: typ };
+}
+
+function a(typ: any) {
+    return { arrayItems: typ };
+}
+
+function u(...typs: any[]) {
+    return { unionMembers: typs };
+}
+
+function o(props: any[], additional: any) {
+    return { props, additional };
+}
+
+function m(additional: any) {
+    const props: any[] = [];
+    return { props, additional };
+}
+
+function r(name: string) {
+    return { ref: name };
+}
+
+const typeMap: any = {
+    "TopLevel": o([
+        { json: "zebra", js: "zebra", typ: "" },
+        { json: "mango", js: "mango", typ: 3.14 },
+        { json: "apple", js: "apple", typ: true },
+        { json: "delta", js: "delta", typ: "" },
+        { json: "banana", js: "banana", typ: 0 },
+        { json: "ordered", js: "ordered", typ: r("Ordered") },
+    ], false),
+    "Ordered": o([
+        { json: "mango", js: "mango", typ: 3.14 },
+        { json: "zebra", js: "zebra", typ: "" },
+        { json: "apple", js: "apple", typ: true },
+    ], false),
+};
diff --git a/base/schema-typescript/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
index 3d08cf8..7967211 100644
--- a/base/schema-typescript/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
@@ -16,14 +16,14 @@ export interface TopLevel {
 
 export interface Fruit {
     apple?:   boolean;
-    berries?: Berry[];
     orange?:  boolean;
+    berries?: Berry[];
     [property: string]: unknown;
 }
 
 export interface Berry {
-    color?:  Color;
     name?:   string;
+    color?:  Color;
     shapes?: Shape[];
     [property: string]: unknown;
 }
@@ -34,8 +34,8 @@ export interface Color {
 }
 
 export interface Shape {
-    geometry?: Geometry;
     history?:  History;
+    geometry?: Geometry;
     [property: string]: unknown;
 }
 
@@ -56,9 +56,9 @@ export interface RectShape {
 }
 
 export interface Part {
-    depth?:  string;
     length?: string;
     width?:  string;
+    depth?:  string;
     [property: string]: unknown;
 }
 
@@ -68,12 +68,12 @@ export interface History {
 }
 
 export interface Vehicle {
-    brand?:     string;
     id?:        string;
-    speed?:     Speed;
-    subModule?: boolean;
     type?:      VehicleType;
+    speed?:     Speed;
     year?:      string;
+    brand?:     string;
+    subModule?: boolean;
     [property: string]: unknown;
 }
 
@@ -83,8 +83,8 @@ export interface Speed {
 }
 
 export interface Limit {
-    maximum?: number;
     minimum?: number;
+    maximum?: number;
     [property: string]: unknown;
 }
 
@@ -272,20 +272,20 @@ const typeMap: any = {
     ], "any"),
     "Fruit": o([
         { json: "apple", js: "apple", typ: u(undefined, true) },
-        { json: "berries", js: "berries", typ: u(undefined, a(r("Berry"))) },
         { json: "orange", js: "orange", typ: u(undefined, true) },
+        { json: "berries", js: "berries", typ: u(undefined, a(r("Berry"))) },
     ], "any"),
     "Berry": o([
-        { json: "color", js: "color", typ: u(undefined, r("Color")) },
         { json: "name", js: "name", typ: u(undefined, "") },
+        { json: "color", js: "color", typ: u(undefined, r("Color")) },
         { json: "shapes", js: "shapes", typ: u(undefined, a(r("Shape"))) },
     ], "any"),
     "Color": o([
         { json: "rgb", js: "rgb", typ: u(undefined, 3.14) },
     ], "any"),
     "Shape": o([
-        { json: "geometry", js: "geometry", typ: u(undefined, r("Geometry")) },
         { json: "history", js: "history", typ: u(undefined, r("History")) },
+        { json: "geometry", js: "geometry", typ: u(undefined, r("Geometry")) },
     ], "any"),
     "Geometry": o([
         { json: "rectShape", js: "rectShape", typ: u(undefined, r("RectShape")) },
@@ -298,27 +298,27 @@ const typeMap: any = {
         { json: "parts", js: "parts", typ: u(undefined, a(r("Part"))) },
     ], "any"),
     "Part": o([
-        { json: "depth", js: "depth", typ: u(undefined, "") },
         { json: "length", js: "length", typ: u(undefined, "") },
         { json: "width", js: "width", typ: u(undefined, "") },
+        { json: "depth", js: "depth", typ: u(undefined, "") },
     ], "any"),
     "History": o([
         { json: "class", js: "class", typ: u(undefined, "") },
     ], "any"),
     "Vehicle": o([
-        { json: "brand", js: "brand", typ: u(undefined, "") },
         { json: "id", js: "id", typ: u(undefined, "") },
-        { json: "speed", js: "speed", typ: u(undefined, r("Speed")) },
-        { json: "subModule", js: "subModule", typ: u(undefined, true) },
         { json: "type", js: "type", typ: u(undefined, r("VehicleType")) },
+        { json: "speed", js: "speed", typ: u(undefined, r("Speed")) },
         { json: "year", js: "year", typ: u(undefined, "") },
+        { json: "brand", js: "brand", typ: u(undefined, "") },
+        { json: "subModule", js: "subModule", typ: u(undefined, true) },
     ], "any"),
     "Speed": o([
         { json: "velocity", js: "velocity", typ: u(undefined, r("Limit")) },
     ], "any"),
     "Limit": o([
-        { json: "maximum", js: "maximum", typ: u(undefined, 3.14) },
         { json: "minimum", js: "minimum", typ: u(undefined, 3.14) },
+        { json: "maximum", js: "maximum", typ: u(undefined, 3.14) },
     ], "any"),
     "VehicleType": o([
         { json: "name", js: "name", typ: u(undefined, r("Name")) },
diff --git a/base/schema-typescript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts
index a88afa4..57045bb 100644
--- a/base/schema-typescript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts
@@ -8,14 +8,14 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    next?: Next;
     value: string;
+    next?: Next;
     [property: string]: unknown;
 }
 
 export interface Node {
-    next?: Next;
     value: string;
+    next?: Next;
     [property: string]: unknown;
 }
 
@@ -188,11 +188,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
         { json: "value", js: "value", typ: "" },
+        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
     ], "any"),
     "Node": o([
-        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
         { json: "value", js: "value", typ: "" },
+        { json: "next", js: "next", typ: u(undefined, u(null, r("Node"), "")) },
     ], "any"),
 };
diff --git a/base/schema-typescript/test/inputs/schema/uuid.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/uuid.schema/default/TopLevel.ts
index df20c01..4f93b7a 100644
--- a/base/schema-typescript/test/inputs/schema/uuid.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/uuid.schema/default/TopLevel.ts
@@ -8,11 +8,11 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
-    arrNullable?:  (null | string)[];
-    arrOne?:       string[];
-    nullable:      null | string;
     one:           string;
     optional?:     string;
+    nullable:      null | string;
+    arrOne?:       string[];
+    arrNullable?:  (null | string)[];
     unionWithEnum: string;
     [property: string]: unknown;
 }
@@ -184,11 +184,11 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
-        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
-        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
-        { json: "nullable", js: "nullable", typ: u(null, "") },
         { json: "one", js: "one", typ: "" },
         { json: "optional", js: "optional", typ: u(undefined, "") },
+        { json: "nullable", js: "nullable", typ: u(null, "") },
+        { json: "arrOne", js: "arrOne", typ: u(undefined, a("")) },
+        { json: "arrNullable", js: "arrNullable", typ: u(undefined, a(u(null, ""))) },
         { json: "unionWithEnum", js: "unionWithEnum", typ: "" },
     ], "any"),
 };
diff --git a/base/schema-typescript-zod/test/inputs/schema/accessors.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/accessors.schema/default/TopLevel.ts
index 0e7ce28..75e0c66 100644
--- a/base/schema-typescript-zod/test/inputs/schema/accessors.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/accessors.schema/default/TopLevel.ts
@@ -9,9 +9,9 @@ export const EnumSchema = z.enum([
 export type Enum = z.infer<typeof EnumSchema>;
 
 export const TopLevelSchema = z.object({
-    "bar": z.string(),
+    "union": z.union([z.boolean(), z.number()]),
     "enum": EnumSchema,
     "foo": z.string(),
-    "union": z.union([z.boolean(), z.number()]),
+    "bar": z.string(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/bool-string.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/bool-string.schema/default/TopLevel.ts
index 6b99faa..9b2e346 100644
--- a/base/schema-typescript-zod/test/inputs/schema/bool-string.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/bool-string.schema/default/TopLevel.ts
@@ -2,11 +2,11 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
-    "arrNullable": z.array(z.union([z.null(), z.string()])).optional(),
-    "arrOne": z.array(z.string()).optional(),
-    "nullable": z.union([z.null(), z.string()]),
     "one": z.string(),
     "optional": z.string().optional(),
+    "nullable": z.union([z.null(), z.string()]),
+    "arrOne": z.array(z.string()).optional(),
+    "arrNullable": z.array(z.union([z.null(), z.string()])).optional(),
     "unionWithBool": z.union([z.boolean(), z.string()]),
     "unionWithBoolAndEnum": z.union([z.boolean(), z.string()]),
 });
diff --git a/base/schema-typescript-zod/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts
index 15b1ddd..3e9b66f 100644
--- a/base/schema-typescript-zod/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts
@@ -2,9 +2,9 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
+    "foo": z.string(),
     "disallowed": z.any().optional(),
     "empty": z.array(z.any()),
-    "foo": z.string(),
     "impossible": z.any().optional(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/comment-injection.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
index 70c7b02..c6da9fd 100644
--- a/base/schema-typescript-zod/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
@@ -2,9 +2,9 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
+    "value": z.string(),
     "trailingBackslash": z.string().optional(),
     "trailingQuote": z.string().optional(),
     "trailingTripleQuote": z.string().optional(),
-    "value": z.string(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts
index df0d45d..830ffc1 100644
--- a/base/schema-typescript-zod/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts
@@ -7,7 +7,7 @@ export const BarEnumSchema = z.enum([
 export type BarEnum = z.infer<typeof BarEnumSchema>;
 
 export const TopLevelSchema = z.object({
-    "bar": z.union([z.coerce.date(), BarEnumSchema]),
     "foo": z.string(),
+    "bar": z.union([z.coerce.date(), BarEnumSchema]),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/description.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/description.schema/default/TopLevel.ts
index 52b083c..f2924ab 100644
--- a/base/schema-typescript-zod/test/inputs/schema/description.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/description.schema/default/TopLevel.ts
@@ -14,10 +14,10 @@ export const ObjectOrStringClassSchema = z.object({
 export type ObjectOrStringClass = z.infer<typeof ObjectOrStringClassSchema>;
 
 export const TopLevelSchema = z.object({
-    "bar": z.boolean().optional(),
+    "union": z.union([z.number(), z.string()]),
     "enum": EnumSchema,
     "foo": z.number().optional(),
+    "bar": z.boolean().optional(),
     "object-or-string": z.union([ObjectOrStringClassSchema, z.string()]),
-    "union": z.union([z.number(), z.string()]),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/integer-string.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/integer-string.schema/default/TopLevel.ts
index adbbe84..2346f22 100644
--- a/base/schema-typescript-zod/test/inputs/schema/integer-string.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/integer-string.schema/default/TopLevel.ts
@@ -2,11 +2,11 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
-    "arrNullable": z.array(z.union([z.null(), z.string()])).optional(),
-    "arrOne": z.array(z.string()).optional(),
-    "nullable": z.union([z.null(), z.string()]),
     "one": z.string(),
     "optional": z.string().optional(),
+    "nullable": z.union([z.null(), z.string()]),
+    "arrOne": z.array(z.string()).optional(),
+    "arrNullable": z.array(z.union([z.null(), z.string()])).optional(),
     "unionWithInt": z.union([z.number(), z.string()]),
     "unionWithIntAndEnum": z.union([z.number(), z.string()]),
 });
diff --git a/base/schema-typescript-zod/test/inputs/schema/integer-type.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/integer-type.schema/default/TopLevel.ts
index 4e92ace..9de2704 100644
--- a/base/schema-typescript-zod/test/inputs/schema/integer-type.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/integer-type.schema/default/TopLevel.ts
@@ -2,14 +2,14 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
+    "small_positive": z.number(),
+    "small_negative": z.number(),
+    "i32_range": z.number(),
     "above_i32_max": z.number(),
     "below_i32_min": z.number(),
-    "i32_range": z.number(),
-    "large_bounds": z.number(),
-    "only_maximum": z.number(),
     "only_minimum": z.number(),
-    "small_negative": z.number(),
-    "small_positive": z.number(),
+    "only_maximum": z.number(),
     "unbounded": z.number(),
+    "large_bounds": z.number(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/light.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/light.schema/default/TopLevel.ts
index d23650b..083e464 100644
--- a/base/schema-typescript-zod/test/inputs/schema/light.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/light.schema/default/TopLevel.ts
@@ -2,8 +2,8 @@ import * as z from "zod";
 
 
 export const LightParamsSchema = z.object({
-    "app_id": z.string(),
     "outlet_id": z.string(),
+    "app_id": z.string(),
     "rgba": z.string(),
 });
 export type LightParams = z.infer<typeof LightParamsSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/min-max-items.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/min-max-items.schema/default/TopLevel.ts
index ad2cbf0..8dfff07 100644
--- a/base/schema-typescript-zod/test/inputs/schema/min-max-items.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/min-max-items.schema/default/TopLevel.ts
@@ -2,9 +2,9 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
+    "minOnly": z.array(z.string()).min(2),
     "maxOnly": z.array(z.number()).max(3),
     "minAndMax": z.array(z.number()).min(1).max(4),
-    "minOnly": z.array(z.string()).min(2),
     "plain": z.array(z.string()),
     "unionItems": z.array(z.union([z.number(), z.string()])).min(2),
 });
diff --git a/base/schema-typescript-zod/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts
index 34fe7fc..8f7a129 100644
--- a/base/schema-typescript-zod/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts
@@ -3,12 +3,12 @@ import * as z from "zod";
 
 export const TopLevelSchema = z.object({
     "free": z.number(),
-    "intersection": z.number(),
-    "max": z.number(),
     "min": z.number(),
+    "max": z.number(),
     "minmax": z.number(),
-    "minMaxIntersection": z.number(),
-    "minMaxUnion": z.number(),
     "union": z.number(),
+    "minMaxUnion": z.number(),
+    "intersection": z.number(),
+    "minMaxIntersection": z.number(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/minmax.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/minmax.schema/default/TopLevel.ts
index 34fe7fc..8f7a129 100644
--- a/base/schema-typescript-zod/test/inputs/schema/minmax.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/minmax.schema/default/TopLevel.ts
@@ -3,12 +3,12 @@ import * as z from "zod";
 
 export const TopLevelSchema = z.object({
     "free": z.number(),
-    "intersection": z.number(),
-    "max": z.number(),
     "min": z.number(),
+    "max": z.number(),
     "minmax": z.number(),
-    "minMaxIntersection": z.number(),
-    "minMaxUnion": z.number(),
     "union": z.number(),
+    "minMaxUnion": z.number(),
+    "intersection": z.number(),
+    "minMaxIntersection": z.number(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
index 998dd2f..c5af189 100644
--- a/base/schema-typescript-zod/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
@@ -2,13 +2,13 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
-    "intersection": z.string(),
-    "inUnion": z.union([z.number(), z.string()]),
-    "maxlength": z.string(),
     "minlength": z.string(),
-    "minMaxIntersection": z.string(),
+    "maxlength": z.string(),
     "minmaxlength": z.string(),
-    "minMaxUnion": z.string(),
     "union": z.string(),
+    "inUnion": z.union([z.number(), z.string()]),
+    "minMaxUnion": z.string(),
+    "intersection": z.string(),
+    "minMaxIntersection": z.string(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts
index cf3b2e0..e367751 100644
--- a/base/schema-typescript-zod/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts
@@ -2,8 +2,8 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
-    "bar": z.number(),
     "foo": z.number(),
+    "bar": z.number(),
     "quux": z.boolean(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
index 2352d7a..b1654c6 100644
--- a/base/schema-typescript-zod/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
@@ -9,11 +9,11 @@ export type Coordinate = z.infer<typeof CoordinateSchema>;
 
 export const TopLevelSchema = z.object({
     "coordinates": z.array(CoordinateSchema).optional(),
-    "count": z.number().optional(),
-    "label": z.string().optional(),
     "requiredCoordinates": z.array(CoordinateSchema),
+    "count": z.number().optional(),
     "requiredCount": z.number(),
-    "requiredLabel": z.string(),
     "weight": z.number().optional(),
+    "label": z.string().optional(),
+    "requiredLabel": z.string(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
index 56bfdd1..41e9d4f 100644
--- a/base/schema-typescript-zod/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
@@ -2,10 +2,10 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
-    "optDouble": z.number().optional(),
+    "reqZeroMin": z.number(),
     "optInt": z.number().optional(),
-    "optPattern": z.string().optional(),
+    "optDouble": z.number().optional(),
     "optString": z.string().optional(),
-    "reqZeroMin": z.number(),
+    "optPattern": z.string().optional(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts
index f4338b3..509dee8 100644
--- a/base/schema-typescript-zod/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts
@@ -2,11 +2,11 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
-    "optional-date": z.string().optional(),
-    "optional-date-time": z.coerce.date().optional(),
-    "optional-time": z.string().optional(),
     "required-date": z.string(),
-    "required-date-time": z.coerce.date(),
     "required-time": z.string(),
+    "required-date-time": z.coerce.date(),
+    "optional-date": z.string().optional(),
+    "optional-time": z.string().optional(),
+    "optional-date-time": z.coerce.date().optional(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/prefix-items.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/prefix-items.schema/default/TopLevel.ts
index 4ac5bdf..2328451 100644
--- a/base/schema-typescript-zod/test/inputs/schema/prefix-items.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/prefix-items.schema/default/TopLevel.ts
@@ -2,7 +2,7 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
-    "open": z.array(z.union([z.boolean(), z.number()])),
     "tuple": z.array(z.union([z.boolean(), z.number()])),
+    "open": z.array(z.union([z.boolean(), z.number()])),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/head/schema-typescript-zod/test/inputs/schema/property-order.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/property-order.schema/default/TopLevel.ts
new file mode 100644
index 0000000..5229b42
--- /dev/null
+++ b/head/schema-typescript-zod/test/inputs/schema/property-order.schema/default/TopLevel.ts
@@ -0,0 +1,19 @@
+import * as z from "zod";
+
+
+export const OrderedSchema = z.object({
+    "mango": z.number(),
+    "zebra": z.string(),
+    "apple": z.boolean(),
+});
+export type Ordered = z.infer<typeof OrderedSchema>;
+
+export const TopLevelSchema = z.object({
+    "zebra": z.string(),
+    "mango": z.number(),
+    "apple": z.boolean(),
+    "delta": z.string(),
+    "banana": z.number(),
+    "ordered": OrderedSchema,
+});
+export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
index 004bf81..d639350 100644
--- a/base/schema-typescript-zod/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
@@ -36,9 +36,9 @@ export const CircularShapeSchema = z.object({
 export type CircularShape = z.infer<typeof CircularShapeSchema>;
 
 export const PartSchema = z.object({
-    "depth": z.string().optional(),
     "length": z.string().optional(),
     "width": z.string().optional(),
+    "depth": z.string().optional(),
 });
 export type Part = z.infer<typeof PartSchema>;
 
@@ -48,8 +48,8 @@ export const HistorySchema = z.object({
 export type History = z.infer<typeof HistorySchema>;
 
 export const LimitSchema = z.object({
-    "maximum": z.number().optional(),
     "minimum": z.number().optional(),
+    "maximum": z.number().optional(),
 });
 export type Limit = z.infer<typeof LimitSchema>;
 
@@ -77,32 +77,32 @@ export const GeometrySchema = z.object({
 export type Geometry = z.infer<typeof GeometrySchema>;
 
 export const VehicleSchema = z.object({
-    "brand": z.string().optional(),
     "id": z.string().optional(),
-    "speed": SpeedSchema.optional(),
-    "subModule": z.boolean().optional(),
     "type": VehicleTypeSchema.optional(),
+    "speed": SpeedSchema.optional(),
     "year": z.string().optional(),
+    "brand": z.string().optional(),
+    "subModule": z.boolean().optional(),
 });
 export type Vehicle = z.infer<typeof VehicleSchema>;
 
 export const ShapeSchema = z.object({
-    "geometry": GeometrySchema.optional(),
     "history": HistorySchema.optional(),
+    "geometry": GeometrySchema.optional(),
 });
 export type Shape = z.infer<typeof ShapeSchema>;
 
 export const BerrySchema = z.object({
-    "color": ColorSchema.optional(),
     "name": z.string().optional(),
+    "color": ColorSchema.optional(),
     "shapes": z.array(ShapeSchema).optional(),
 });
 export type Berry = z.infer<typeof BerrySchema>;
 
 export const FruitSchema = z.object({
     "apple": z.boolean().optional(),
-    "berries": z.array(BerrySchema).optional(),
     "orange": z.boolean().optional(),
+    "berries": z.array(BerrySchema).optional(),
 });
 export type Fruit = z.infer<typeof FruitSchema>;
 
diff --git a/base/schema-typescript-zod/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts
index 9036c1e..99ccd78 100644
--- a/base/schema-typescript-zod/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts
@@ -2,18 +2,18 @@ import * as z from "zod";
 
 
 export type Node = {
-    "next"?: Node | null | string;
     "value": string;
+    "next"?: Node | null | string;
 };
 export const NodeSchema: z.ZodType<Node> = z.lazy(() =>
     z.object({
-        "next": z.union([z.null(), NodeSchema, z.string()]).optional(),
         "value": z.string(),
+        "next": z.union([z.null(), NodeSchema, z.string()]).optional(),
     })
 );
 
 export const TopLevelSchema = z.object({
-    "next": z.union([z.null(), NodeSchema, z.string()]).optional(),
     "value": z.string(),
+    "next": z.union([z.null(), NodeSchema, z.string()]).optional(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/uuid.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/uuid.schema/default/TopLevel.ts
index 1121e90..683aced 100644
--- a/base/schema-typescript-zod/test/inputs/schema/uuid.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/uuid.schema/default/TopLevel.ts
@@ -2,11 +2,11 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
-    "arrNullable": z.array(z.union([z.null(), z.string()])).optional(),
-    "arrOne": z.array(z.string()).optional(),
-    "nullable": z.union([z.null(), z.string()]),
     "one": z.string(),
     "optional": z.string().optional(),
+    "nullable": z.union([z.null(), z.string()]),
+    "arrOne": z.array(z.string()).optional(),
+    "arrNullable": z.array(z.union([z.null(), z.string()])).optional(),
     "unionWithEnum": z.string(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/vega-lite.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/vega-lite.schema/default/TopLevel.ts
index ffd8d12..417c68d 100644
--- a/base/schema-typescript-zod/test/inputs/schema/vega-lite.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/vega-lite.schema/default/TopLevel.ts
@@ -717,8 +717,8 @@ export const MarkConfigSchema = z.object({
     "dx": z.number().optional(),
     "dy": z.number().optional(),
     "fill": z.string().optional(),
-    "filled": z.boolean().optional(),
     "fillOpacity": z.number().optional(),
+    "filled": z.boolean().optional(),
     "font": z.string().optional(),
     "fontSize": z.number().optional(),
     "fontStyle": FontStyleSchema.optional(),
@@ -767,9 +767,9 @@ export const AxisConfigSchema = z.object({
     "shortTimeLabels": z.boolean().optional(),
     "tickColor": z.string().optional(),
     "tickRound": z.boolean().optional(),
-    "ticks": z.boolean().optional(),
     "tickSize": z.number().optional(),
     "tickWidth": z.number().optional(),
+    "ticks": z.boolean().optional(),
     "titleAlign": z.string().optional(),
     "titleAngle": z.number().optional(),
     "titleBaseline": z.string().optional(),
@@ -809,9 +809,9 @@ export const VgAxisConfigSchema = z.object({
     "minExtent": z.number().optional(),
     "tickColor": z.string().optional(),
     "tickRound": z.boolean().optional(),
-    "ticks": z.boolean().optional(),
     "tickSize": z.number().optional(),
     "tickWidth": z.number().optional(),
+    "ticks": z.boolean().optional(),
     "titleAlign": z.string().optional(),
     "titleAngle": z.number().optional(),
     "titleBaseline": z.string().optional(),
@@ -839,8 +839,8 @@ export const BarConfigSchema = z.object({
     "dx": z.number().optional(),
     "dy": z.number().optional(),
     "fill": z.string().optional(),
-    "filled": z.boolean().optional(),
     "fillOpacity": z.number().optional(),
+    "filled": z.boolean().optional(),
     "font": z.string().optional(),
     "fontSize": z.number().optional(),
     "fontStyle": FontStyleSchema.optional(),
@@ -1035,8 +1035,8 @@ export const TextConfigSchema = z.object({
     "dx": z.number().optional(),
     "dy": z.number().optional(),
     "fill": z.string().optional(),
-    "filled": z.boolean().optional(),
     "fillOpacity": z.number().optional(),
+    "filled": z.boolean().optional(),
     "font": z.string().optional(),
     "fontSize": z.number().optional(),
     "fontStyle": FontStyleSchema.optional(),
@@ -1071,8 +1071,8 @@ export const TickConfigSchema = z.object({
     "dx": z.number().optional(),
     "dy": z.number().optional(),
     "fill": z.string().optional(),
-    "filled": z.boolean().optional(),
     "fillOpacity": z.number().optional(),
+    "filled": z.boolean().optional(),
     "font": z.string().optional(),
     "fontSize": z.number().optional(),
     "fontStyle": FontStyleSchema.optional(),
@@ -1285,8 +1285,8 @@ export const AxisSchema = z.object({
     "orient": TitleOrientSchema.optional(),
     "position": z.number().optional(),
     "tickCount": z.number().optional(),
-    "ticks": z.boolean().optional(),
     "tickSize": z.number().optional(),
+    "ticks": z.boolean().optional(),
     "title": z.union([z.null(), z.string()]).optional(),
     "titleMaxLength": z.number().optional(),
     "titlePadding": z.number().optional(),
@@ -1315,8 +1315,8 @@ export const MarkDefSchema = z.object({
     "dx": z.number().optional(),
     "dy": z.number().optional(),
     "fill": z.string().optional(),
-    "filled": z.boolean().optional(),
     "fillOpacity": z.number().optional(),
+    "filled": z.boolean().optional(),
     "font": z.string().optional(),
     "fontSize": z.number().optional(),
     "fontStyle": FontStyleSchema.optional(),
