@Override
    public int compare(StringNode a, StringNode b) {
        int index1 = ORDERED_KEYS.indexOf(a.getValue());
        int index2 = ORDERED_KEYS.indexOf(b.getValue());

        if (index1 == -1) {
            return index2 == -1 ? a.getValue().compareToIgnoreCase(b.getValue()) : 1;
        } else if (index2 == -1) {
            return -1;
        } else {
            return index1 - index2;
        }
    }
Provides a more natural sort-order to keys in JSON schemas.
smithy-jsonschema/src/main/java/software/amazon/smithy/jsonschema/SchemaComparator.java