diff --git a/head/schema-cplusplus/test/inputs/schema/upper-acronym-names.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/upper-acronym-names.schema/default/quicktype.hpp
new file mode 100644
index 0000000..d2e675a
--- /dev/null
+++ b/head/schema-cplusplus/test/inputs/schema/upper-acronym-names.schema/default/quicktype.hpp
@@ -0,0 +1,248 @@
+//  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 <optional>
+#include "json.hpp"
+
+#include <optional>
+#include <stdexcept>
+#include <regex>
+
+#ifndef NLOHMANN_OPT_HELPER
+#define NLOHMANN_OPT_HELPER
+namespace nlohmann {
+    template <typename T>
+    struct adl_serializer<std::shared_ptr<T>> {
+        static void to_json(json & j, const std::shared_ptr<T> & opt) {
+            if (!opt) j = nullptr; else j = *opt;
+        }
+
+        static std::shared_ptr<T> from_json(const json & j) {
+            if (j.is_null()) return std::shared_ptr<T>(); else return std::make_shared<T>(j.get<T>());
+        }
+    };
+    template <typename T>
+    struct adl_serializer<std::optional<T>> {
+        static void to_json(json & j, const std::optional<T> & opt) {
+            if (!opt) j = nullptr; else j = *opt;
+        }
+
+        static std::optional<T> from_json(const json & j) {
+            if (j.is_null()) return std::optional<T>(); else return std::make_optional<T>(j.get<T>());
+        }
+    };
+}
+#endif
+
+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
+
+    #ifndef NLOHMANN_OPTIONAL_quicktype_HELPER
+    #define NLOHMANN_OPTIONAL_quicktype_HELPER
+    template <typename T>
+    inline std::shared_ptr<T> get_heap_optional(const json & j, const char * property) {
+        auto it = j.find(property);
+        if (it != j.end() && !it->is_null()) {
+            return j.at(property).get<std::shared_ptr<T>>();
+        }
+        return std::shared_ptr<T>();
+    }
+
+    template <typename T>
+    inline std::shared_ptr<T> get_heap_optional(const json & j, std::string property) {
+        return get_heap_optional<T>(j, property.data());
+    }
+    template <typename T>
+    inline std::optional<T> get_stack_optional(const json & j, const char * property) {
+        auto it = j.find(property);
+        if (it != j.end() && !it->is_null()) {
+            return j.at(property).get<std::optional<T>>();
+        }
+        return std::optional<T>();
+    }
+
+    template <typename T>
+    inline std::optional<T> get_stack_optional(const json & j, std::string property) {
+        return get_stack_optional<T>(j, property.data());
+    }
+    #endif
+
+    class IdCardHttp {
+        public:
+        IdCardHttp() = default;
+        virtual ~IdCardHttp() = default;
+
+        private:
+        std::optional<std::string> value;
+
+        public:
+        const std::optional<std::string> & get_value() const { return value; }
+        std::optional<std::string> & get_mutable_value() { return value; }
+        void set_value(const std::optional<std::string> & value) { this->value = value; }
+    };
+
+    class Point {
+        public:
+        Point() = default;
+        virtual ~Point() = default;
+
+        private:
+        std::optional<double> latitude;
+        std::optional<double> longitude;
+
+        public:
+        const std::optional<double> & get_latitude() const { return latitude; }
+        std::optional<double> & get_mutable_latitude() { return latitude; }
+        void set_latitude(const std::optional<double> & value) { this->latitude = value; }
+
+        const std::optional<double> & get_longitude() const { return longitude; }
+        std::optional<double> & get_mutable_longitude() { return longitude; }
+        void set_longitude(const std::optional<double> & value) { this->longitude = value; }
+    };
+
+    enum class ScubaManeuver : int { ASCENT, DESCENT, LEVEL };
+
+    class ScubaWaypoint {
+        public:
+        ScubaWaypoint() = default;
+        virtual ~ScubaWaypoint() = default;
+
+        private:
+        std::optional<double> depth;
+        std::optional<IdCardHttp> id_card;
+        std::optional<Point> location;
+        std::optional<ScubaManeuver> maneuver;
+
+        public:
+        const std::optional<double> & get_depth() const { return depth; }
+        std::optional<double> & get_mutable_depth() { return depth; }
+        void set_depth(const std::optional<double> & value) { this->depth = value; }
+
+        const std::optional<IdCardHttp> & get_id_card() const { return id_card; }
+        std::optional<IdCardHttp> & get_mutable_id_card() { return id_card; }
+        void set_id_card(const std::optional<IdCardHttp> & value) { this->id_card = value; }
+
+        const std::optional<Point> & get_location() const { return location; }
+        std::optional<Point> & get_mutable_location() { return location; }
+        void set_location(const std::optional<Point> & value) { this->location = value; }
+
+        const std::optional<ScubaManeuver> & get_maneuver() const { return maneuver; }
+        std::optional<ScubaManeuver> & get_mutable_maneuver() { return maneuver; }
+        void set_maneuver(const std::optional<ScubaManeuver> & value) { this->maneuver = value; }
+    };
+
+    /**
+     * A SCUBA dive log with waypoints
+     */
+    class TopLevel {
+        public:
+        TopLevel() = default;
+        virtual ~TopLevel() = default;
+
+        private:
+        std::optional<std::vector<ScubaWaypoint>> waypoints;
+
+        public:
+        const std::optional<std::vector<ScubaWaypoint>> & get_waypoints() const { return waypoints; }
+        std::optional<std::vector<ScubaWaypoint>> & get_mutable_waypoints() { return waypoints; }
+        void set_waypoints(const std::optional<std::vector<ScubaWaypoint>> & value) { this->waypoints = value; }
+    };
+}
+
+namespace quicktype {
+    void from_json(const json & j, IdCardHttp & x);
+    void to_json(json & j, const IdCardHttp & x);
+
+    void from_json(const json & j, Point & x);
+    void to_json(json & j, const Point & x);
+
+    void from_json(const json & j, ScubaWaypoint & x);
+    void to_json(json & j, const ScubaWaypoint & x);
+
+    void from_json(const json & j, TopLevel & x);
+    void to_json(json & j, const TopLevel & x);
+
+    void from_json(const json & j, ScubaManeuver & x);
+    void to_json(json & j, const ScubaManeuver & x);
+
+    inline void from_json(const json & j, IdCardHttp& x) {
+        x.set_value(get_stack_optional<std::string>(j, "value"));
+    }
+
+    inline void to_json(json & j, const IdCardHttp & x) {
+        j = json::object();
+        j["value"] = x.get_value();
+    }
+
+    inline void from_json(const json & j, Point& x) {
+        x.set_latitude(get_stack_optional<double>(j, "latitude"));
+        x.set_longitude(get_stack_optional<double>(j, "longitude"));
+    }
+
+    inline void to_json(json & j, const Point & x) {
+        j = json::object();
+        j["latitude"] = x.get_latitude();
+        j["longitude"] = x.get_longitude();
+    }
+
+    inline void from_json(const json & j, ScubaWaypoint& x) {
+        x.set_depth(get_stack_optional<double>(j, "depth"));
+        x.set_id_card(get_stack_optional<IdCardHttp>(j, "idCard"));
+        x.set_location(get_stack_optional<Point>(j, "location"));
+        x.set_maneuver(get_stack_optional<ScubaManeuver>(j, "maneuver"));
+    }
+
+    inline void to_json(json & j, const ScubaWaypoint & x) {
+        j = json::object();
+        j["depth"] = x.get_depth();
+        j["idCard"] = x.get_id_card();
+        j["location"] = x.get_location();
+        j["maneuver"] = x.get_maneuver();
+    }
+
+    inline void from_json(const json & j, TopLevel& x) {
+        x.set_waypoints(get_stack_optional<std::vector<ScubaWaypoint>>(j, "waypoints"));
+    }
+
+    inline void to_json(json & j, const TopLevel & x) {
+        j = json::object();
+        j["waypoints"] = x.get_waypoints();
+    }
+
+    inline void from_json(const json & j, ScubaManeuver & x) {
+        if (j == "ASCENT") x = ScubaManeuver::ASCENT;
+        else if (j == "DESCENT") x = ScubaManeuver::DESCENT;
+        else if (j == "LEVEL") x = ScubaManeuver::LEVEL;
+        else { throw std::runtime_error("Cannot deserialize to enumeration \"ScubaManeuver\""); }
+    }
+
+    inline void to_json(json & j, const ScubaManeuver & x) {
+        switch (x) {
+            case ScubaManeuver::ASCENT: j = "ASCENT"; break;
+            case ScubaManeuver::DESCENT: j = "DESCENT"; break;
+            case ScubaManeuver::LEVEL: j = "LEVEL"; break;
+            default: throw std::runtime_error("Unexpected value in enumeration \"ScubaManeuver\": " + std::to_string(static_cast<int>(x)));
+        }
+    }
+}
diff --git a/head/schema-csharp/test/inputs/schema/upper-acronym-names.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/upper-acronym-names.schema/default/QuickType.cs
new file mode 100644
index 0000000..85cb41d
--- /dev/null
+++ b/head/schema-csharp/test/inputs/schema/upper-acronym-names.schema/default/QuickType.cs
@@ -0,0 +1,143 @@
+// <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;
+
+    /// <summary>
+    /// A SCUBA dive log with waypoints
+    /// </summary>
+    public partial class TopLevel
+    {
+        [JsonProperty("waypoints", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public ScubaWaypoint[]? Waypoints { get; set; }
+    }
+
+    public partial class ScubaWaypoint
+    {
+        [JsonProperty("depth", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public double? Depth { get; set; }
+
+        [JsonProperty("idCard", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public IdCardHttp? IdCard { get; set; }
+
+        [JsonProperty("location", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public Point? Location { get; set; }
+
+        [JsonProperty("maneuver", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public ScubaManeuver? Maneuver { get; set; }
+    }
+
+    public partial class IdCardHttp
+    {
+        [JsonProperty("value", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public string? Value { get; set; }
+    }
+
+    public partial class Point
+    {
+        [JsonProperty("latitude", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public double? Latitude { get; set; }
+
+        [JsonProperty("longitude", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public double? Longitude { get; set; }
+    }
+
+    public enum ScubaManeuver { Ascent, Descent, Level };
+
+    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 =
+            {
+                ScubaManeuverConverter.Singleton,
+                new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
+            },
+        };
+    }
+
+    internal class ScubaManeuverConverter : JsonConverter
+    {
+        public override bool CanConvert(Type t) => t == typeof(ScubaManeuver) || t == typeof(ScubaManeuver?);
+
+        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
+        {
+            if (reader.TokenType == JsonToken.Null) return null;
+            var value = serializer.Deserialize<string>(reader);
+            switch (value)
+            {
+                case "ASCENT":
+                    return ScubaManeuver.Ascent;
+                case "DESCENT":
+                    return ScubaManeuver.Descent;
+                case "LEVEL":
+                    return ScubaManeuver.Level;
+            }
+            throw new Exception("Cannot unmarshal type ScubaManeuver");
+        }
+
+        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
+        {
+            if (untypedValue == null)
+            {
+                serializer.Serialize(writer, null);
+                return;
+            }
+            var value = (ScubaManeuver)untypedValue;
+            switch (value)
+            {
+                case ScubaManeuver.Ascent:
+                    serializer.Serialize(writer, "ASCENT");
+                    return;
+                case ScubaManeuver.Descent:
+                    serializer.Serialize(writer, "DESCENT");
+                    return;
+                case ScubaManeuver.Level:
+                    serializer.Serialize(writer, "LEVEL");
+                    return;
+            }
+            throw new Exception("Cannot marshal type ScubaManeuver");
+        }
+
+        public static readonly ScubaManeuverConverter Singleton = new ScubaManeuverConverter();
+    }
+}
+#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/head/schema-csharp-SystemTextJson/test/inputs/schema/upper-acronym-names.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/upper-acronym-names.schema/default/QuickType.cs
new file mode 100644
index 0000000..e694c57
--- /dev/null
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/upper-acronym-names.schema/default/QuickType.cs
@@ -0,0 +1,248 @@
+// <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;
+
+    /// <summary>
+    /// A SCUBA dive log with waypoints
+    /// </summary>
+    public partial class TopLevel
+    {
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("waypoints")]
+        public ScubaWaypoint[]? Waypoints { get; set; }
+    }
+
+    public partial class ScubaWaypoint
+    {
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("depth")]
+        public double? Depth { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("idCard")]
+        public IdCardHttp? IdCard { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("location")]
+        public Point? Location { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("maneuver")]
+        public ScubaManeuver? Maneuver { get; set; }
+    }
+
+    public partial class IdCardHttp
+    {
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("value")]
+        public string? Value { get; set; }
+    }
+
+    public partial class Point
+    {
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("latitude")]
+        public double? Latitude { get; set; }
+
+        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+        [JsonPropertyName("longitude")]
+        public double? Longitude { get; set; }
+    }
+
+    public enum ScubaManeuver { Ascent, Descent, Level };
+
+    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 =
+            {
+                ScubaManeuverConverter.Singleton,
+                new DateOnlyConverter(),
+                new TimeOnlyConverter(),
+                IsoDateTimeOffsetConverter.Singleton
+            },
+        };
+    }
+
+    internal class ScubaManeuverConverter : JsonConverter<ScubaManeuver>
+    {
+        public override bool CanConvert(Type t) => t == typeof(ScubaManeuver);
+
+        public override ScubaManeuver Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+        {
+            var value = reader.GetString();
+            switch (value)
+            {
+                case "ASCENT":
+                    return ScubaManeuver.Ascent;
+                case "DESCENT":
+                    return ScubaManeuver.Descent;
+                case "LEVEL":
+                    return ScubaManeuver.Level;
+            }
+            throw new JsonException("Cannot unmarshal type ScubaManeuver");
+        }
+
+        public override void Write(Utf8JsonWriter writer, ScubaManeuver value, JsonSerializerOptions options)
+        {
+            switch (value)
+            {
+                case ScubaManeuver.Ascent:
+                    JsonSerializer.Serialize(writer, "ASCENT", options);
+                    return;
+                case ScubaManeuver.Descent:
+                    JsonSerializer.Serialize(writer, "DESCENT", options);
+                    return;
+                case ScubaManeuver.Level:
+                    JsonSerializer.Serialize(writer, "LEVEL", options);
+                    return;
+            }
+            throw new NotSupportedException("Cannot marshal type ScubaManeuver");
+        }
+
+        public static readonly ScubaManeuverConverter Singleton = new ScubaManeuverConverter();
+    }
+    
+    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/head/schema-csharp-records/test/inputs/schema/upper-acronym-names.schema/default/QuickType.cs b/head/schema-csharp-records/test/inputs/schema/upper-acronym-names.schema/default/QuickType.cs
new file mode 100644
index 0000000..09b4507
--- /dev/null
+++ b/head/schema-csharp-records/test/inputs/schema/upper-acronym-names.schema/default/QuickType.cs
@@ -0,0 +1,143 @@
+// <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;
+
+    /// <summary>
+    /// A SCUBA dive log with waypoints
+    /// </summary>
+    public partial record TopLevel
+    {
+        [JsonProperty("waypoints", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public ScubaWaypoint[]? Waypoints { get; set; }
+    }
+
+    public partial record ScubaWaypoint
+    {
+        [JsonProperty("depth", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public double? Depth { get; set; }
+
+        [JsonProperty("idCard", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public IdCardHttp? IdCard { get; set; }
+
+        [JsonProperty("location", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public Point? Location { get; set; }
+
+        [JsonProperty("maneuver", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public ScubaManeuver? Maneuver { get; set; }
+    }
+
+    public partial record IdCardHttp
+    {
+        [JsonProperty("value", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public string? Value { get; set; }
+    }
+
+    public partial record Point
+    {
+        [JsonProperty("latitude", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public double? Latitude { get; set; }
+
+        [JsonProperty("longitude", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
+        public double? Longitude { get; set; }
+    }
+
+    public enum ScubaManeuver { Ascent, Descent, Level };
+
+    public partial record 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 =
+            {
+                ScubaManeuverConverter.Singleton,
+                new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
+            },
+        };
+    }
+
+    internal class ScubaManeuverConverter : JsonConverter
+    {
+        public override bool CanConvert(Type t) => t == typeof(ScubaManeuver) || t == typeof(ScubaManeuver?);
+
+        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
+        {
+            if (reader.TokenType == JsonToken.Null) return null;
+            var value = serializer.Deserialize<string>(reader);
+            switch (value)
+            {
+                case "ASCENT":
+                    return ScubaManeuver.Ascent;
+                case "DESCENT":
+                    return ScubaManeuver.Descent;
+                case "LEVEL":
+                    return ScubaManeuver.Level;
+            }
+            throw new Exception("Cannot unmarshal type ScubaManeuver");
+        }
+
+        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
+        {
+            if (untypedValue == null)
+            {
+                serializer.Serialize(writer, null);
+                return;
+            }
+            var value = (ScubaManeuver)untypedValue;
+            switch (value)
+            {
+                case ScubaManeuver.Ascent:
+                    serializer.Serialize(writer, "ASCENT");
+                    return;
+                case ScubaManeuver.Descent:
+                    serializer.Serialize(writer, "DESCENT");
+                    return;
+                case ScubaManeuver.Level:
+                    serializer.Serialize(writer, "LEVEL");
+                    return;
+            }
+            throw new Exception("Cannot marshal type ScubaManeuver");
+        }
+
+        public static readonly ScubaManeuverConverter Singleton = new ScubaManeuverConverter();
+    }
+}
+#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/head/schema-dart/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.dart
new file mode 100644
index 0000000..0df7052
--- /dev/null
+++ b/head/schema-dart/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.dart
@@ -0,0 +1,115 @@
+// 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());
+
+
+///A SCUBA dive log with waypoints
+class TopLevel {
+    final List<ScubaWaypoint>? waypoints;
+
+    TopLevel({
+        this.waypoints,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        waypoints: json["waypoints"] == null ? null : List<ScubaWaypoint>.from(json["waypoints"]!.map((x) => ScubaWaypoint.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "waypoints": waypoints == null ? null : List<dynamic>.from(waypoints!.map((x) => x.toJson())),
+    };
+}
+
+class ScubaWaypoint {
+    final double? depth;
+    final IdCardHttp? idCard;
+    final Point? location;
+    final ScubaManeuver? maneuver;
+
+    ScubaWaypoint({
+        this.depth,
+        this.idCard,
+        this.location,
+        this.maneuver,
+    });
+
+    factory ScubaWaypoint.fromJson(Map<String, dynamic> json) => ScubaWaypoint(
+        depth: json["depth"]?.toDouble(),
+        idCard: json["idCard"] == null ? null : IdCardHttp.fromJson(json["idCard"]),
+        location: json["location"] == null ? null : Point.fromJson(json["location"]),
+        maneuver: scubaManeuverValues.map[json["maneuver"]],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "depth": depth,
+        "idCard": idCard?.toJson(),
+        "location": location?.toJson(),
+        "maneuver": scubaManeuverValues.reverse[maneuver],
+    };
+}
+
+class IdCardHttp {
+    final String? value;
+
+    IdCardHttp({
+        this.value,
+    });
+
+    factory IdCardHttp.fromJson(Map<String, dynamic> json) => IdCardHttp(
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "value": value,
+    };
+}
+
+class Point {
+    final double? latitude;
+    final double? longitude;
+
+    Point({
+        this.latitude,
+        this.longitude,
+    });
+
+    factory Point.fromJson(Map<String, dynamic> json) => Point(
+        latitude: json["latitude"]?.toDouble(),
+        longitude: json["longitude"]?.toDouble(),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "latitude": latitude,
+        "longitude": longitude,
+    };
+}
+
+enum ScubaManeuver {
+    ASCENT,
+    DESCENT,
+    LEVEL
+}
+
+final scubaManeuverValues = EnumValues({
+    "ASCENT": ScubaManeuver.ASCENT,
+    "DESCENT": ScubaManeuver.DESCENT,
+    "LEVEL": ScubaManeuver.LEVEL
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/schema-elixir/test/inputs/schema/upper-acronym-names.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/upper-acronym-names.schema/default/QuickType.ex
new file mode 100644
index 0000000..4bf2f5a
--- /dev/null
+++ b/head/schema-elixir/test/inputs/schema/upper-acronym-names.schema/default/QuickType.ex
@@ -0,0 +1,197 @@
+# This file was autogenerated using quicktype https://github.com/quicktype/quicktype
+#
+# Add Jason to your mix.exs
+#
+# Decode a JSON string: TopLevel.from_json(data)
+# Encode into a JSON string: TopLevel.to_json(struct)
+
+defmodule IDCardHTTP do
+  defstruct [:value]
+
+  @type t :: %__MODULE__{
+          value: String.t() | nil
+        }
+
+  def from_map(m) do
+    %IDCardHTTP{
+      value: m["value"],
+    }
+  end
+
+  def from_json(json) do
+    json
+          |> Jason.decode!()
+          |> from_map()
+  end
+
+  def to_map(struct) do
+    %{
+      "value" => struct.value,
+    }
+  end
+
+  def to_json(struct) do
+    struct
+          |> to_map()
+          |> Jason.encode!()
+  end
+end
+
+defmodule Point do
+  defstruct [:latitude, :longitude]
+
+  @type t :: %__MODULE__{
+          latitude: float() | nil,
+          longitude: float() | nil
+        }
+
+  def from_map(m) do
+    %Point{
+      latitude: m["latitude"],
+      longitude: m["longitude"],
+    }
+  end
+
+  def from_json(json) do
+    json
+          |> Jason.decode!()
+          |> from_map()
+  end
+
+  def to_map(struct) do
+    %{
+      "latitude" => struct.latitude,
+      "longitude" => struct.longitude,
+    }
+  end
+
+  def to_json(struct) do
+    struct
+          |> to_map()
+          |> Jason.encode!()
+  end
+end
+
+defmodule SCUBAManeuver do
+  @valid_enum_members [
+    :ASCENT,
+    :DESCENT,
+    :LEVEL,
+  ]
+
+  def valid_atom?(value), do: value in @valid_enum_members
+
+  def valid_atom_string?(value) do
+    try do
+        atom = String.to_existing_atom(value)
+        atom in @valid_enum_members
+    rescue
+        ArgumentError -> false
+    end
+  end
+
+  def encode(value) do
+    if valid_atom?(value) do
+        Atom.to_string(value)
+    else
+        {:error, "Unexpected value when encoding atom: #{inspect(value)}"}
+    end
+  end
+
+  def decode(value) do
+    if valid_atom_string?(value) do
+        String.to_existing_atom(value)
+    else
+        {:error, "Unexpected value when decoding atom: #{inspect(value)}"}
+    end
+  end
+
+  def from_json(json) do
+    json
+    |> Jason.decode!()
+    |> decode()
+  end
+
+  def to_json(data) do
+    data
+    |> encode()
+    |> Jason.encode!()
+  end
+end
+
+defmodule SCUBAWaypoint do
+  defstruct [:depth, :id_card, :location, :maneuver]
+
+  @type t :: %__MODULE__{
+          depth: float() | nil,
+          id_card: IDCardHTTP.t() | nil,
+          location: Point.t() | nil,
+          maneuver: SCUBAManeuver.t() | nil
+        }
+
+  def from_map(m) do
+    %SCUBAWaypoint{
+      depth: m["depth"],
+      id_card: m["idCard"] && IDCardHTTP.from_map(m["idCard"]),
+      location: m["location"] && Point.from_map(m["location"]),
+      maneuver: m["maneuver"] && SCUBAManeuver.decode(m["maneuver"]),
+    }
+  end
+
+  def from_json(json) do
+    json
+          |> Jason.decode!()
+          |> from_map()
+  end
+
+  def to_map(struct) do
+    %{
+      "depth" => struct.depth,
+      "idCard" => struct.id_card && IDCardHTTP.to_map(struct.id_card),
+      "location" => struct.location && Point.to_map(struct.location),
+      "maneuver" => struct.maneuver && SCUBAManeuver.encode(struct.maneuver),
+    }
+  end
+
+  def to_json(struct) do
+    struct
+          |> to_map()
+          |> Jason.encode!()
+  end
+end
+
+defmodule TopLevel do
+  @moduledoc """
+  A SCUBA dive log with waypoints
+  """
+
+  defstruct [:waypoints]
+
+  @type t :: %__MODULE__{
+          waypoints: [SCUBAWaypoint.t()] | nil
+        }
+
+  def from_map(m) do
+    %TopLevel{
+      waypoints: m["waypoints"] && Enum.map(m["waypoints"], &SCUBAWaypoint.from_map/1),
+    }
+  end
+
+  def from_json(json) do
+    json
+          |> Jason.decode!()
+          |> from_map()
+  end
+
+  def to_map(struct) do
+    %{
+      "waypoints" => struct.waypoints && Enum.map(struct.waypoints, &SCUBAWaypoint.to_map/1),
+    }
+  end
+
+  def to_json(struct) do
+    struct
+          |> to_map()
+          |> Jason.encode!()
+  end
+end
diff --git a/head/schema-elm/test/inputs/schema/upper-acronym-names.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/upper-acronym-names.schema/default/QuickType.elm
new file mode 100644
index 0000000..e51c88d
--- /dev/null
+++ b/head/schema-elm/test/inputs/schema/upper-acronym-names.schema/default/QuickType.elm
@@ -0,0 +1,136 @@
+-- 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
+    , SCUBAWaypoint
+    , IDCardHTTP
+    , Point
+    , SCUBAManeuver(..)
+    )
+
+import Json.Decode as Jdec
+import Json.Decode.Pipeline as Jpipe
+import Json.Encode as Jenc
+import Dict exposing (Dict)
+
+{-| A SCUBA dive log with waypoints -}
+
+type alias QuickType =
+    { waypoints : Maybe (List SCUBAWaypoint)
+    }
+
+type alias SCUBAWaypoint =
+    { depth : Maybe Float
+    , idCard : Maybe IDCardHTTP
+    , location : Maybe Point
+    , maneuver : Maybe SCUBAManeuver
+    }
+
+type alias IDCardHTTP =
+    { value : Maybe String
+    }
+
+type alias Point =
+    { latitude : Maybe Float
+    , longitude : Maybe Float
+    }
+
+type SCUBAManeuver
+    = Ascent
+    | Descent
+    | Level
+
+-- decoders and encoders
+
+quickTypeToString : QuickType -> String
+quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
+
+quickType : Jdec.Decoder QuickType
+quickType =
+    Jdec.succeed QuickType
+        |> Jpipe.optional "waypoints" (Jdec.nullable (Jdec.list scubaWaypoint)) Nothing
+
+encodeQuickType : QuickType -> Jenc.Value
+encodeQuickType x =
+    Jenc.object
+        [ ("waypoints", makeNullableEncoder (Jenc.list encodeSCUBAWaypoint) x.waypoints)
+        ]
+
+scubaWaypoint : Jdec.Decoder SCUBAWaypoint
+scubaWaypoint =
+    Jdec.succeed SCUBAWaypoint
+        |> Jpipe.optional "depth" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.optional "idCard" (Jdec.nullable idCardHTTP) Nothing
+        |> Jpipe.optional "location" (Jdec.nullable point) Nothing
+        |> Jpipe.optional "maneuver" (Jdec.nullable scubaManeuver) Nothing
+
+encodeSCUBAWaypoint : SCUBAWaypoint -> Jenc.Value
+encodeSCUBAWaypoint x =
+    Jenc.object
+        [ ("depth", makeNullableEncoder Jenc.float x.depth)
+        , ("idCard", makeNullableEncoder encodeIDCardHTTP x.idCard)
+        , ("location", makeNullableEncoder encodePoint x.location)
+        , ("maneuver", makeNullableEncoder encodeSCUBAManeuver x.maneuver)
+        ]
+
+idCardHTTP : Jdec.Decoder IDCardHTTP
+idCardHTTP =
+    Jdec.succeed IDCardHTTP
+        |> Jpipe.optional "value" (Jdec.nullable Jdec.string) Nothing
+
+encodeIDCardHTTP : IDCardHTTP -> Jenc.Value
+encodeIDCardHTTP x =
+    Jenc.object
+        [ ("value", makeNullableEncoder Jenc.string x.value)
+        ]
+
+point : Jdec.Decoder Point
+point =
+    Jdec.succeed Point
+        |> Jpipe.optional "latitude" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.optional "longitude" (Jdec.nullable Jdec.float) Nothing
+
+encodePoint : Point -> Jenc.Value
+encodePoint x =
+    Jenc.object
+        [ ("latitude", makeNullableEncoder Jenc.float x.latitude)
+        , ("longitude", makeNullableEncoder Jenc.float x.longitude)
+        ]
+
+scubaManeuver : Jdec.Decoder SCUBAManeuver
+scubaManeuver =
+    Jdec.string
+        |> Jdec.andThen (\str ->
+            case str of
+                "ASCENT" -> Jdec.succeed Ascent
+                "DESCENT" -> Jdec.succeed Descent
+                "LEVEL" -> Jdec.succeed Level
+                somethingElse -> Jdec.fail <| "Invalid SCUBAManeuver: " ++ somethingElse
+        )
+
+encodeSCUBAManeuver : SCUBAManeuver -> Jenc.Value
+encodeSCUBAManeuver x = case x of
+    Ascent -> Jenc.string "ASCENT"
+    Descent -> Jenc.string "DESCENT"
+    Level -> Jenc.string "LEVEL"
+
+--- 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/head/schema-flow/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.js
new file mode 100644
index 0000000..1ca4618
--- /dev/null
+++ b/head/schema-flow/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.js
@@ -0,0 +1,234 @@
+// @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.
+
+/**
+ * A SCUBA dive log with waypoints
+ */
+export type TopLevel = {
+    waypoints?: SCUBAWaypoint[];
+    [property: string]: mixed;
+};
+
+export type SCUBAWaypoint = {
+    depth?:    number;
+    idCard?:   IDCardHTTP;
+    location?: Point;
+    maneuver?: SCUBAManeuver;
+    [property: string]: mixed;
+};
+
+export type IDCardHTTP = {
+    value?: string;
+    [property: string]: mixed;
+};
+
+export type Point = {
+    latitude?:  number;
+    longitude?: number;
+    [property: string]: mixed;
+};
+
+export type SCUBAManeuver =
+      "ASCENT"
+    | "DESCENT"
+    | "LEVEL";
+
+// 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: "waypoints", js: "waypoints", typ: u(undefined, a(r("SCUBAWaypoint"))) },
+    ], "any"),
+    "SCUBAWaypoint": o([
+        { json: "depth", js: "depth", typ: u(undefined, 3.14) },
+        { json: "idCard", js: "idCard", typ: u(undefined, r("IDCardHTTP")) },
+        { json: "location", js: "location", typ: u(undefined, r("Point")) },
+        { json: "maneuver", js: "maneuver", typ: u(undefined, r("SCUBAManeuver")) },
+    ], "any"),
+    "IDCardHTTP": o([
+        { json: "value", js: "value", typ: u(undefined, "") },
+    ], "any"),
+    "Point": o([
+        { json: "latitude", js: "latitude", typ: u(undefined, 3.14) },
+        { json: "longitude", js: "longitude", typ: u(undefined, 3.14) },
+    ], "any"),
+    "SCUBAManeuver": [
+        "ASCENT",
+        "DESCENT",
+        "LEVEL",
+    ],
+};
+
+module.exports = {
+    "topLevelToJson": topLevelToJson,
+    "toTopLevel": toTopLevel,
+};
diff --git a/head/schema-golang/test/inputs/schema/upper-acronym-names.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/upper-acronym-names.schema/default/quicktype.go
new file mode 100644
index 0000000..2aa9f04
--- /dev/null
+++ b/head/schema-golang/test/inputs/schema/upper-acronym-names.schema/default/quicktype.go
@@ -0,0 +1,48 @@
+// 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)
+}
+
+// A SCUBA dive log with waypoints
+type TopLevel struct {
+	Waypoints []SCUBAWaypoint `json:"waypoints,omitempty"`
+}
+
+type SCUBAWaypoint struct {
+	Depth    *float64       `json:"depth,omitempty"`
+	IDCard   *IDCardHTTP    `json:"idCard,omitempty"`
+	Location *Point         `json:"location,omitempty"`
+	Maneuver *SCUBAManeuver `json:"maneuver,omitempty"`
+}
+
+type IDCardHTTP struct {
+	Value *string `json:"value,omitempty"`
+}
+
+type Point struct {
+	Latitude  *float64 `json:"latitude,omitempty"`
+	Longitude *float64 `json:"longitude,omitempty"`
+}
+
+type SCUBAManeuver string
+
+const (
+	Ascent  SCUBAManeuver = "ASCENT"
+	Descent SCUBAManeuver = "DESCENT"
+	Level   SCUBAManeuver = "LEVEL"
+)
diff --git a/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Converter.java b/head/schema-java/test/inputs/schema/upper-acronym-names.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/upper-acronym-names.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/upper-acronym-names.schema/default/src/main/java/io/quicktype/IDCardHTTP.java b/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/IDCardHTTP.java
new file mode 100644
index 0000000..3d0a90c
--- /dev/null
+++ b/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/IDCardHTTP.java
@@ -0,0 +1,12 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class IDCardHTTP {
+    private String value;
+
+    @JsonProperty("value")
+    public String getValue() { return value; }
+    @JsonProperty("value")
+    public void setValue(String value) { this.value = value; }
+}
diff --git a/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Point.java b/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Point.java
new file mode 100644
index 0000000..cdb7115
--- /dev/null
+++ b/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Point.java
@@ -0,0 +1,18 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class Point {
+    private Double latitude;
+    private Double longitude;
+
+    @JsonProperty("latitude")
+    public Double getLatitude() { return latitude; }
+    @JsonProperty("latitude")
+    public void setLatitude(Double value) { this.latitude = value; }
+
+    @JsonProperty("longitude")
+    public Double getLongitude() { return longitude; }
+    @JsonProperty("longitude")
+    public void setLongitude(Double value) { this.longitude = value; }
+}
diff --git a/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAManeuver.java b/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAManeuver.java
new file mode 100644
index 0000000..1c03a80
--- /dev/null
+++ b/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAManeuver.java
@@ -0,0 +1,26 @@
+package io.quicktype;
+
+import java.io.IOException;
+import com.fasterxml.jackson.annotation.*;
+
+public enum SCUBAManeuver {
+    ASCENT, DESCENT, LEVEL;
+
+    @JsonValue
+    public String toValue() {
+        switch (this) {
+            case ASCENT: return "ASCENT";
+            case DESCENT: return "DESCENT";
+            case LEVEL: return "LEVEL";
+        }
+        return null;
+    }
+
+    @JsonCreator
+    public static SCUBAManeuver forValue(String value) throws IOException {
+        if (value.equals("ASCENT")) return ASCENT;
+        if (value.equals("DESCENT")) return DESCENT;
+        if (value.equals("LEVEL")) return LEVEL;
+        throw new IOException("Cannot deserialize SCUBAManeuver");
+    }
+}
diff --git a/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAWaypoint.java b/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAWaypoint.java
new file mode 100644
index 0000000..e617d93
--- /dev/null
+++ b/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAWaypoint.java
@@ -0,0 +1,30 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class SCUBAWaypoint {
+    private Double depth;
+    private IDCardHTTP idCard;
+    private Point location;
+    private SCUBAManeuver maneuver;
+
+    @JsonProperty("depth")
+    public Double getDepth() { return depth; }
+    @JsonProperty("depth")
+    public void setDepth(Double value) { this.depth = value; }
+
+    @JsonProperty("idCard")
+    public IDCardHTTP getIDCard() { return idCard; }
+    @JsonProperty("idCard")
+    public void setIDCard(IDCardHTTP value) { this.idCard = value; }
+
+    @JsonProperty("location")
+    public Point getLocation() { return location; }
+    @JsonProperty("location")
+    public void setLocation(Point value) { this.location = value; }
+
+    @JsonProperty("maneuver")
+    public SCUBAManeuver getManeuver() { return maneuver; }
+    @JsonProperty("maneuver")
+    public void setManeuver(SCUBAManeuver value) { this.maneuver = value; }
+}
diff --git a/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/TopLevel.java
new file mode 100644
index 0000000..f5434b2
--- /dev/null
+++ b/head/schema-java/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -0,0 +1,16 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+import java.util.List;
+
+/**
+ * A SCUBA dive log with waypoints
+ */
+public class TopLevel {
+    private List<SCUBAWaypoint> waypoints;
+
+    @JsonProperty("waypoints")
+    public List<SCUBAWaypoint> getWaypoints() { return waypoints; }
+    @JsonProperty("waypoints")
+    public void setWaypoints(List<SCUBAWaypoint> value) { this.waypoints = value; }
+}
diff --git a/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Converter.java b/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.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/upper-acronym-names.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/upper-acronym-names.schema/default/src/main/java/io/quicktype/IDCardHTTP.java b/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/IDCardHTTP.java
new file mode 100644
index 0000000..3d0a90c
--- /dev/null
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/IDCardHTTP.java
@@ -0,0 +1,12 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class IDCardHTTP {
+    private String value;
+
+    @JsonProperty("value")
+    public String getValue() { return value; }
+    @JsonProperty("value")
+    public void setValue(String value) { this.value = value; }
+}
diff --git a/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Point.java b/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Point.java
new file mode 100644
index 0000000..cdb7115
--- /dev/null
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Point.java
@@ -0,0 +1,18 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class Point {
+    private Double latitude;
+    private Double longitude;
+
+    @JsonProperty("latitude")
+    public Double getLatitude() { return latitude; }
+    @JsonProperty("latitude")
+    public void setLatitude(Double value) { this.latitude = value; }
+
+    @JsonProperty("longitude")
+    public Double getLongitude() { return longitude; }
+    @JsonProperty("longitude")
+    public void setLongitude(Double value) { this.longitude = value; }
+}
diff --git a/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAManeuver.java b/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAManeuver.java
new file mode 100644
index 0000000..1c03a80
--- /dev/null
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAManeuver.java
@@ -0,0 +1,26 @@
+package io.quicktype;
+
+import java.io.IOException;
+import com.fasterxml.jackson.annotation.*;
+
+public enum SCUBAManeuver {
+    ASCENT, DESCENT, LEVEL;
+
+    @JsonValue
+    public String toValue() {
+        switch (this) {
+            case ASCENT: return "ASCENT";
+            case DESCENT: return "DESCENT";
+            case LEVEL: return "LEVEL";
+        }
+        return null;
+    }
+
+    @JsonCreator
+    public static SCUBAManeuver forValue(String value) throws IOException {
+        if (value.equals("ASCENT")) return ASCENT;
+        if (value.equals("DESCENT")) return DESCENT;
+        if (value.equals("LEVEL")) return LEVEL;
+        throw new IOException("Cannot deserialize SCUBAManeuver");
+    }
+}
diff --git a/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAWaypoint.java b/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAWaypoint.java
new file mode 100644
index 0000000..e617d93
--- /dev/null
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAWaypoint.java
@@ -0,0 +1,30 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class SCUBAWaypoint {
+    private Double depth;
+    private IDCardHTTP idCard;
+    private Point location;
+    private SCUBAManeuver maneuver;
+
+    @JsonProperty("depth")
+    public Double getDepth() { return depth; }
+    @JsonProperty("depth")
+    public void setDepth(Double value) { this.depth = value; }
+
+    @JsonProperty("idCard")
+    public IDCardHTTP getIDCard() { return idCard; }
+    @JsonProperty("idCard")
+    public void setIDCard(IDCardHTTP value) { this.idCard = value; }
+
+    @JsonProperty("location")
+    public Point getLocation() { return location; }
+    @JsonProperty("location")
+    public void setLocation(Point value) { this.location = value; }
+
+    @JsonProperty("maneuver")
+    public SCUBAManeuver getManeuver() { return maneuver; }
+    @JsonProperty("maneuver")
+    public void setManeuver(SCUBAManeuver value) { this.maneuver = value; }
+}
diff --git a/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/TopLevel.java
new file mode 100644
index 0000000..f5434b2
--- /dev/null
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -0,0 +1,16 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+import java.util.List;
+
+/**
+ * A SCUBA dive log with waypoints
+ */
+public class TopLevel {
+    private List<SCUBAWaypoint> waypoints;
+
+    @JsonProperty("waypoints")
+    public List<SCUBAWaypoint> getWaypoints() { return waypoints; }
+    @JsonProperty("waypoints")
+    public void setWaypoints(List<SCUBAWaypoint> value) { this.waypoints = value; }
+}
diff --git a/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Converter.java b/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.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/upper-acronym-names.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/upper-acronym-names.schema/default/src/main/java/io/quicktype/IDCardHTTP.java b/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/IDCardHTTP.java
new file mode 100644
index 0000000..3d0a90c
--- /dev/null
+++ b/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/IDCardHTTP.java
@@ -0,0 +1,12 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class IDCardHTTP {
+    private String value;
+
+    @JsonProperty("value")
+    public String getValue() { return value; }
+    @JsonProperty("value")
+    public void setValue(String value) { this.value = value; }
+}
diff --git a/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Point.java b/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Point.java
new file mode 100644
index 0000000..cdb7115
--- /dev/null
+++ b/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/Point.java
@@ -0,0 +1,18 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class Point {
+    private Double latitude;
+    private Double longitude;
+
+    @JsonProperty("latitude")
+    public Double getLatitude() { return latitude; }
+    @JsonProperty("latitude")
+    public void setLatitude(Double value) { this.latitude = value; }
+
+    @JsonProperty("longitude")
+    public Double getLongitude() { return longitude; }
+    @JsonProperty("longitude")
+    public void setLongitude(Double value) { this.longitude = value; }
+}
diff --git a/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAManeuver.java b/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAManeuver.java
new file mode 100644
index 0000000..1c03a80
--- /dev/null
+++ b/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAManeuver.java
@@ -0,0 +1,26 @@
+package io.quicktype;
+
+import java.io.IOException;
+import com.fasterxml.jackson.annotation.*;
+
+public enum SCUBAManeuver {
+    ASCENT, DESCENT, LEVEL;
+
+    @JsonValue
+    public String toValue() {
+        switch (this) {
+            case ASCENT: return "ASCENT";
+            case DESCENT: return "DESCENT";
+            case LEVEL: return "LEVEL";
+        }
+        return null;
+    }
+
+    @JsonCreator
+    public static SCUBAManeuver forValue(String value) throws IOException {
+        if (value.equals("ASCENT")) return ASCENT;
+        if (value.equals("DESCENT")) return DESCENT;
+        if (value.equals("LEVEL")) return LEVEL;
+        throw new IOException("Cannot deserialize SCUBAManeuver");
+    }
+}
diff --git a/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAWaypoint.java b/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAWaypoint.java
new file mode 100644
index 0000000..e617d93
--- /dev/null
+++ b/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/SCUBAWaypoint.java
@@ -0,0 +1,30 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+
+public class SCUBAWaypoint {
+    private Double depth;
+    private IDCardHTTP idCard;
+    private Point location;
+    private SCUBAManeuver maneuver;
+
+    @JsonProperty("depth")
+    public Double getDepth() { return depth; }
+    @JsonProperty("depth")
+    public void setDepth(Double value) { this.depth = value; }
+
+    @JsonProperty("idCard")
+    public IDCardHTTP getIDCard() { return idCard; }
+    @JsonProperty("idCard")
+    public void setIDCard(IDCardHTTP value) { this.idCard = value; }
+
+    @JsonProperty("location")
+    public Point getLocation() { return location; }
+    @JsonProperty("location")
+    public void setLocation(Point value) { this.location = value; }
+
+    @JsonProperty("maneuver")
+    public SCUBAManeuver getManeuver() { return maneuver; }
+    @JsonProperty("maneuver")
+    public void setManeuver(SCUBAManeuver value) { this.maneuver = value; }
+}
diff --git a/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/TopLevel.java
new file mode 100644
index 0000000..f5434b2
--- /dev/null
+++ b/head/schema-java-lombok/test/inputs/schema/upper-acronym-names.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -0,0 +1,16 @@
+package io.quicktype;
+
+import com.fasterxml.jackson.annotation.*;
+import java.util.List;
+
+/**
+ * A SCUBA dive log with waypoints
+ */
+public class TopLevel {
+    private List<SCUBAWaypoint> waypoints;
+
+    @JsonProperty("waypoints")
+    public List<SCUBAWaypoint> getWaypoints() { return waypoints; }
+    @JsonProperty("waypoints")
+    public void setWaypoints(List<SCUBAWaypoint> value) { this.waypoints = value; }
+}
diff --git a/head/schema-javascript/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.js
new file mode 100644
index 0000000..5da37c6
--- /dev/null
+++ b/head/schema-javascript/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.js
@@ -0,0 +1,200 @@
+// 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: "waypoints", js: "waypoints", typ: u(undefined, a(r("SCUBAWaypoint"))) },
+    ], "any"),
+    "SCUBAWaypoint": o([
+        { json: "depth", js: "depth", typ: u(undefined, 3.14) },
+        { json: "idCard", js: "idCard", typ: u(undefined, r("IDCardHTTP")) },
+        { json: "location", js: "location", typ: u(undefined, r("Point")) },
+        { json: "maneuver", js: "maneuver", typ: u(undefined, r("SCUBAManeuver")) },
+    ], "any"),
+    "IDCardHTTP": o([
+        { json: "value", js: "value", typ: u(undefined, "") },
+    ], "any"),
+    "Point": o([
+        { json: "latitude", js: "latitude", typ: u(undefined, 3.14) },
+        { json: "longitude", js: "longitude", typ: u(undefined, 3.14) },
+    ], "any"),
+    "SCUBAManeuver": [
+        "ASCENT",
+        "DESCENT",
+        "LEVEL",
+    ],
+};
+
+module.exports = {
+    "topLevelToJson": topLevelToJson,
+    "toTopLevel": toTopLevel,
+};
diff --git a/head/schema-kotlin/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.kt
new file mode 100644
index 0000000..7c986df
--- /dev/null
+++ b/head/schema-kotlin/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.kt
@@ -0,0 +1,62 @@
+// To parse the JSON, install Klaxon and do:
+//
+//   val topLevel = TopLevel.fromJson(jsonString)
+
+package quicktype
+
+import com.beust.klaxon.*
+
+private fun <T> Klaxon.convert(k: kotlin.reflect.KClass<*>, fromJson: (JsonValue) -> T, toJson: (T) -> String, isUnion: Boolean = false) =
+    this.converter(object: Converter {
+        @Suppress("UNCHECKED_CAST")
+        override fun toJson(value: Any)        = toJson(value as T)
+        override fun fromJson(jv: JsonValue)   = fromJson(jv) as Any
+        override fun canConvert(cls: Class<*>) = cls == k.java || (isUnion && cls.superclass == k.java)
+    })
+
+private val klaxon = Klaxon()
+    .convert(SCUBAManeuver::class, { SCUBAManeuver.fromValue(it.string!!) }, { "\"${it.value}\"" })
+
+/**
+ * A SCUBA dive log with waypoints
+ */
+data class TopLevel (
+    val waypoints: List<SCUBAWaypoint>? = null
+) {
+    public fun toJson() = klaxon.toJsonString(this)
+
+    companion object {
+        public fun fromJson(json: String) = klaxon.parse<TopLevel>(json)
+    }
+}
+
+data class SCUBAWaypoint (
+    val depth: Double? = null,
+    val idCard: IDCardHTTP? = null,
+    val location: Point? = null,
+    val maneuver: SCUBAManeuver? = null
+)
+
+data class IDCardHTTP (
+    val value: String? = null
+)
+
+data class Point (
+    val latitude: Double? = null,
+    val longitude: Double? = null
+)
+
+enum class SCUBAManeuver(val value: String) {
+    Ascent("ASCENT"),
+    Descent("DESCENT"),
+    Level("LEVEL");
+
+    companion object {
+        public fun fromValue(value: String): SCUBAManeuver = when (value) {
+            "ASCENT"  -> Ascent
+            "DESCENT" -> Descent
+            "LEVEL"   -> Level
+            else      -> throw IllegalArgumentException()
+        }
+    }
+}
diff --git a/head/schema-kotlin-jackson/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.kt
new file mode 100644
index 0000000..14647e2
--- /dev/null
+++ b/head/schema-kotlin-jackson/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.kt
@@ -0,0 +1,75 @@
+// 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.*
+
+
+@Suppress("UNCHECKED_CAST")
+private fun <T> ObjectMapper.convert(k: kotlin.reflect.KClass<*>, fromJson: (JsonNode) -> T, toJson: (T) -> String, isUnion: Boolean = false) = registerModule(SimpleModule().apply {
+    addSerializer(k.java as Class<T>, object : StdSerializer<T>(k.java as Class<T>) {
+            override fun serialize(value: T, gen: JsonGenerator, provider: SerializerProvider) = gen.writeRawValue(toJson(value))
+    })
+    addDeserializer(k.java as Class<T>, object : StdDeserializer<T>(k.java as Class<T>) {
+            override fun deserialize(p: JsonParser, ctxt: DeserializationContext) = fromJson(p.readValueAsTree())
+    })
+})
+
+val mapper = jacksonObjectMapper().apply {
+    propertyNamingStrategy = PropertyNamingStrategy.LOWER_CAMEL_CASE
+    setSerializationInclusion(JsonInclude.Include.NON_NULL)
+    convert(SCUBAManeuver::class, { SCUBAManeuver.fromValue(it.asText()) }, { "\"${it.value}\"" })
+}
+
+/**
+ * A SCUBA dive log with waypoints
+ */
+data class TopLevel (
+    val waypoints: List<SCUBAWaypoint>? = null
+) {
+    fun toJson() = mapper.writeValueAsString(this)
+
+    companion object {
+        fun fromJson(json: String) = mapper.readValue<TopLevel>(json)
+    }
+}
+
+data class SCUBAWaypoint (
+    val depth: Double? = null,
+    val idCard: IDCardHTTP? = null,
+    val location: Point? = null,
+    val maneuver: SCUBAManeuver? = null
+)
+
+data class IDCardHTTP (
+    val value: String? = null
+)
+
+data class Point (
+    val latitude: Double? = null,
+    val longitude: Double? = null
+)
+
+enum class SCUBAManeuver(val value: String) {
+    Ascent("ASCENT"),
+    Descent("DESCENT"),
+    Level("LEVEL");
+
+    companion object {
+        fun fromValue(value: String): SCUBAManeuver = when (value) {
+            "ASCENT"  -> Ascent
+            "DESCENT" -> Descent
+            "LEVEL"   -> Level
+            else      -> throw IllegalArgumentException()
+        }
+    }
+}
diff --git a/head/schema-kotlinx/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.kt
new file mode 100644
index 0000000..85a65b4
--- /dev/null
+++ b/head/schema-kotlinx/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.kt
@@ -0,0 +1,45 @@
+// 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.*
+
+/**
+ * A SCUBA dive log with waypoints
+ */
+@Serializable
+data class TopLevel (
+    val waypoints: List<SCUBAWaypoint>? = null
+)
+
+@Serializable
+data class SCUBAWaypoint (
+    val depth: Double? = null,
+    val idCard: IDCardHTTP? = null,
+    val location: Point? = null,
+    val maneuver: SCUBAManeuver? = null
+)
+
+@Serializable
+data class IDCardHTTP (
+    val value: String? = null
+)
+
+@Serializable
+data class Point (
+    val latitude: Double? = null,
+    val longitude: Double? = null
+)
+
+@Serializable
+enum class SCUBAManeuver(val value: String) {
+    @SerialName("ASCENT") Ascent("ASCENT"),
+    @SerialName("DESCENT") Descent("DESCENT"),
+    @SerialName("LEVEL") Level("LEVEL");
+}
diff --git a/head/schema-php/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.php
new file mode 100644
index 0000000..bd2f8d3
--- /dev/null
+++ b/head/schema-php/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.php
@@ -0,0 +1,758 @@
+<?php
+declare(strict_types=1);
+
+// This is an autogenerated file:TopLevel
+
+class TopLevel {
+    private ?array $waypoints; // json:waypoints Optional
+
+    /**
+     * @param array|null $waypoints
+     */
+    public function __construct(?array $waypoints) {
+        $this->waypoints = $waypoints;
+    }
+
+    /**
+     * @param ?array $value
+     * @throws Exception
+     * @return ?array
+     */
+    public static function fromWaypoints(?array $value): ?array {
+        if (!is_null($value)) {
+            return  array_map(function ($value) {
+                return SCUBAWaypoint::from($value); /*class*/
+            }, $value);
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * @throws Exception
+     * @return ?array
+     */
+    public function toWaypoints(): ?array {
+        if (TopLevel::validateWaypoints($this->waypoints))  {
+            if (!is_null($this->waypoints)) {
+                return array_map(function ($value) {
+                    return $value->to(); /*class*/
+                }, $this->waypoints);
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this TopLevel::waypoints');
+    }
+
+    /**
+     * @param array|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateWaypoints(?array $value): bool {
+        if (!is_null($value)) {
+            if (!is_array($value)) {
+                throw new Exception("Attribute Error:TopLevel::waypoints");
+            }
+            array_walk($value, function($value_v) {
+                $value_v->validate();
+            });
+        }
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return ?array
+     */
+    public function getWaypoints(): ?array {
+        if (TopLevel::validateWaypoints($this->waypoints))  {
+            return $this->waypoints;
+        }
+        throw new Exception('never get to getWaypoints TopLevel::waypoints');
+    }
+
+    /**
+     * @return ?array
+     */
+    public static function sampleWaypoints(): ?array {
+        return  array(
+            SCUBAWaypoint::sample() /*31:*/
+        ); /* 31:waypoints*/
+    }
+
+    /**
+     * @throws Exception
+     * @return bool
+     */
+    public function validate(): bool {
+        return TopLevel::validateWaypoints($this->waypoints);
+    }
+
+    /**
+     * @return stdClass
+     * @throws Exception
+     */
+    public function to(): stdClass  {
+        $out = new stdClass();
+        $out->{'waypoints'} = $this->toWaypoints();
+        return $out;
+    }
+
+    /**
+     * @param stdClass $obj
+     * @return TopLevel
+     * @throws Exception
+     */
+    public static function from(stdClass $obj): TopLevel {
+        return new TopLevel(
+         TopLevel::fromWaypoints($obj->{'waypoints'})
+        );
+    }
+
+    /**
+     * @return TopLevel
+     */
+    public static function sample(): TopLevel {
+        return new TopLevel(
+         TopLevel::sampleWaypoints()
+        );
+    }
+}
+
+// This is an autogenerated file:SCUBAWaypoint
+
+class SCUBAWaypoint {
+    private ?float $depth; // json:depth Optional
+    private ?IDCardHTTP $idCard; // json:idCard Optional
+    private ?Point $location; // json:location Optional
+    private ?SCUBAManeuver $maneuver; // json:maneuver Optional
+
+    /**
+     * @param float|null $depth
+     * @param IDCardHTTP|null $idCard
+     * @param Point|null $location
+     * @param SCUBAManeuver|null $maneuver
+     */
+    public function __construct(?float $depth, ?IDCardHTTP $idCard, ?Point $location, ?SCUBAManeuver $maneuver) {
+        $this->depth = $depth;
+        $this->idCard = $idCard;
+        $this->location = $location;
+        $this->maneuver = $maneuver;
+    }
+
+    /**
+     * @param ?float $value
+     * @throws Exception
+     * @return ?float
+     */
+    public static function fromDepth(?float $value): ?float {
+        if (!is_null($value)) {
+            return $value; /*float*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * @throws Exception
+     * @return ?float
+     */
+    public function toDepth(): ?float {
+        if (SCUBAWaypoint::validateDepth($this->depth))  {
+            if (!is_null($this->depth)) {
+                return $this->depth; /*float*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this SCUBAWaypoint::depth');
+    }
+
+    /**
+     * @param float|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateDepth(?float $value): bool {
+        if (!is_null($value)) {
+        }
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return ?float
+     */
+    public function getDepth(): ?float {
+        if (SCUBAWaypoint::validateDepth($this->depth))  {
+            return $this->depth;
+        }
+        throw new Exception('never get to getDepth SCUBAWaypoint::depth');
+    }
+
+    /**
+     * @return ?float
+     */
+    public static function sampleDepth(): ?float {
+        return 31.031; /*31:depth*/
+    }
+
+    /**
+     * @param ?stdClass $value
+     * @throws Exception
+     * @return ?IDCardHTTP
+     */
+    public static function fromIDCard(?stdClass $value): ?IDCardHTTP {
+        if (!is_null($value)) {
+            return IDCardHTTP::from($value); /*class*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * @throws Exception
+     * @return ?stdClass
+     */
+    public function toIDCard(): ?stdClass {
+        if (SCUBAWaypoint::validateIDCard($this->idCard))  {
+            if (!is_null($this->idCard)) {
+                return $this->idCard->to(); /*class*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this SCUBAWaypoint::idCard');
+    }
+
+    /**
+     * @param IDCardHTTP|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateIDCard(?IDCardHTTP $value): bool {
+        if (!is_null($value)) {
+            $value->validate();
+        }
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return ?IDCardHTTP
+     */
+    public function getIDCard(): ?IDCardHTTP {
+        if (SCUBAWaypoint::validateIDCard($this->idCard))  {
+            return $this->idCard;
+        }
+        throw new Exception('never get to getIDCard SCUBAWaypoint::idCard');
+    }
+
+    /**
+     * @return ?IDCardHTTP
+     */
+    public static function sampleIDCard(): ?IDCardHTTP {
+        return IDCardHTTP::sample(); /*32:idCard*/
+    }
+
+    /**
+     * @param ?stdClass $value
+     * @throws Exception
+     * @return ?Point
+     */
+    public static function fromLocation(?stdClass $value): ?Point {
+        if (!is_null($value)) {
+            return Point::from($value); /*class*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * @throws Exception
+     * @return ?stdClass
+     */
+    public function toLocation(): ?stdClass {
+        if (SCUBAWaypoint::validateLocation($this->location))  {
+            if (!is_null($this->location)) {
+                return $this->location->to(); /*class*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this SCUBAWaypoint::location');
+    }
+
+    /**
+     * @param Point|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateLocation(?Point $value): bool {
+        if (!is_null($value)) {
+            $value->validate();
+        }
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return ?Point
+     */
+    public function getLocation(): ?Point {
+        if (SCUBAWaypoint::validateLocation($this->location))  {
+            return $this->location;
+        }
+        throw new Exception('never get to getLocation SCUBAWaypoint::location');
+    }
+
+    /**
+     * @return ?Point
+     */
+    public static function sampleLocation(): ?Point {
+        return Point::sample(); /*33:location*/
+    }
+
+    /**
+     * @param ?string $value
+     * @throws Exception
+     * @return ?SCUBAManeuver
+     */
+    public static function fromManeuver(?string $value): ?SCUBAManeuver {
+        if (!is_null($value)) {
+            return SCUBAManeuver::from($value); /*enum*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * @throws Exception
+     * @return ?string
+     */
+    public function toManeuver(): ?string {
+        if (SCUBAWaypoint::validateManeuver($this->maneuver))  {
+            if (!is_null($this->maneuver)) {
+                return SCUBAManeuver::to($this->maneuver); /*enum*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this SCUBAWaypoint::maneuver');
+    }
+
+    /**
+     * @param SCUBAManeuver|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateManeuver(?SCUBAManeuver $value): bool {
+        if (!is_null($value)) {
+            SCUBAManeuver::to($value);
+        }
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return ?SCUBAManeuver
+     */
+    public function getManeuver(): ?SCUBAManeuver {
+        if (SCUBAWaypoint::validateManeuver($this->maneuver))  {
+            return $this->maneuver;
+        }
+        throw new Exception('never get to getManeuver SCUBAWaypoint::maneuver');
+    }
+
+    /**
+     * @return ?SCUBAManeuver
+     */
+    public static function sampleManeuver(): ?SCUBAManeuver {
+        return SCUBAManeuver::sample(); /*enum*/
+    }
+
+    /**
+     * @throws Exception
+     * @return bool
+     */
+    public function validate(): bool {
+        return SCUBAWaypoint::validateDepth($this->depth)
+        || SCUBAWaypoint::validateIDCard($this->idCard)
+        || SCUBAWaypoint::validateLocation($this->location)
+        || SCUBAWaypoint::validateManeuver($this->maneuver);
+    }
+
+    /**
+     * @return stdClass
+     * @throws Exception
+     */
+    public function to(): stdClass  {
+        $out = new stdClass();
+        $out->{'depth'} = $this->toDepth();
+        $out->{'idCard'} = $this->toIDCard();
+        $out->{'location'} = $this->toLocation();
+        $out->{'maneuver'} = $this->toManeuver();
+        return $out;
+    }
+
+    /**
+     * @param stdClass $obj
+     * @return SCUBAWaypoint
+     * @throws Exception
+     */
+    public static function from(stdClass $obj): SCUBAWaypoint {
+        return new SCUBAWaypoint(
+         SCUBAWaypoint::fromDepth($obj->{'depth'})
+        ,SCUBAWaypoint::fromIDCard($obj->{'idCard'})
+        ,SCUBAWaypoint::fromLocation($obj->{'location'})
+        ,SCUBAWaypoint::fromManeuver($obj->{'maneuver'})
+        );
+    }
+
+    /**
+     * @return SCUBAWaypoint
+     */
+    public static function sample(): SCUBAWaypoint {
+        return new SCUBAWaypoint(
+         SCUBAWaypoint::sampleDepth()
+        ,SCUBAWaypoint::sampleIDCard()
+        ,SCUBAWaypoint::sampleLocation()
+        ,SCUBAWaypoint::sampleManeuver()
+        );
+    }
+}
+
+// This is an autogenerated file:IDCardHTTP
+
+class IDCardHTTP {
+    private ?string $value; // json:value Optional
+
+    /**
+     * @param string|null $value
+     */
+    public function __construct(?string $value) {
+        $this->value = $value;
+    }
+
+    /**
+     * @param ?string $value
+     * @throws Exception
+     * @return ?string
+     */
+    public static function fromValue(?string $value): ?string {
+        if (!is_null($value)) {
+            return $value; /*string*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * @throws Exception
+     * @return ?string
+     */
+    public function toValue(): ?string {
+        if (IDCardHTTP::validateValue($this->value))  {
+            if (!is_null($this->value)) {
+                return $this->value; /*string*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this IDCardHTTP::value');
+    }
+
+    /**
+     * @param string|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateValue(?string $value): bool {
+        if (!is_null($value)) {
+        }
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return ?string
+     */
+    public function getValue(): ?string {
+        if (IDCardHTTP::validateValue($this->value))  {
+            return $this->value;
+        }
+        throw new Exception('never get to getValue IDCardHTTP::value');
+    }
+
+    /**
+     * @return ?string
+     */
+    public static function sampleValue(): ?string {
+        return 'IDCardHTTP::value::31'; /*31:value*/
+    }
+
+    /**
+     * @throws Exception
+     * @return bool
+     */
+    public function validate(): bool {
+        return IDCardHTTP::validateValue($this->value);
+    }
+
+    /**
+     * @return stdClass
+     * @throws Exception
+     */
+    public function to(): stdClass  {
+        $out = new stdClass();
+        $out->{'value'} = $this->toValue();
+        return $out;
+    }
+
+    /**
+     * @param stdClass $obj
+     * @return IDCardHTTP
+     * @throws Exception
+     */
+    public static function from(stdClass $obj): IDCardHTTP {
+        return new IDCardHTTP(
+         IDCardHTTP::fromValue($obj->{'value'})
+        );
+    }
+
+    /**
+     * @return IDCardHTTP
+     */
+    public static function sample(): IDCardHTTP {
+        return new IDCardHTTP(
+         IDCardHTTP::sampleValue()
+        );
+    }
+}
+
+// This is an autogenerated file:Point
+
+class Point {
+    private ?float $latitude; // json:latitude Optional
+    private ?float $longitude; // json:longitude Optional
+
+    /**
+     * @param float|null $latitude
+     * @param float|null $longitude
+     */
+    public function __construct(?float $latitude, ?float $longitude) {
+        $this->latitude = $latitude;
+        $this->longitude = $longitude;
+    }
+
+    /**
+     * @param ?float $value
+     * @throws Exception
+     * @return ?float
+     */
+    public static function fromLatitude(?float $value): ?float {
+        if (!is_null($value)) {
+            return $value; /*float*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * @throws Exception
+     * @return ?float
+     */
+    public function toLatitude(): ?float {
+        if (Point::validateLatitude($this->latitude))  {
+            if (!is_null($this->latitude)) {
+                return $this->latitude; /*float*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this Point::latitude');
+    }
+
+    /**
+     * @param float|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateLatitude(?float $value): bool {
+        if (!is_null($value)) {
+        }
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return ?float
+     */
+    public function getLatitude(): ?float {
+        if (Point::validateLatitude($this->latitude))  {
+            return $this->latitude;
+        }
+        throw new Exception('never get to getLatitude Point::latitude');
+    }
+
+    /**
+     * @return ?float
+     */
+    public static function sampleLatitude(): ?float {
+        return 31.031; /*31:latitude*/
+    }
+
+    /**
+     * @param ?float $value
+     * @throws Exception
+     * @return ?float
+     */
+    public static function fromLongitude(?float $value): ?float {
+        if (!is_null($value)) {
+            return $value; /*float*/
+        } else {
+            return  null;
+        }
+    }
+
+    /**
+     * @throws Exception
+     * @return ?float
+     */
+    public function toLongitude(): ?float {
+        if (Point::validateLongitude($this->longitude))  {
+            if (!is_null($this->longitude)) {
+                return $this->longitude; /*float*/
+            } else {
+                return  null;
+            }
+        }
+        throw new Exception('never get to this Point::longitude');
+    }
+
+    /**
+     * @param float|null
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateLongitude(?float $value): bool {
+        if (!is_null($value)) {
+        }
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return ?float
+     */
+    public function getLongitude(): ?float {
+        if (Point::validateLongitude($this->longitude))  {
+            return $this->longitude;
+        }
+        throw new Exception('never get to getLongitude Point::longitude');
+    }
+
+    /**
+     * @return ?float
+     */
+    public static function sampleLongitude(): ?float {
+        return 32.032; /*32:longitude*/
+    }
+
+    /**
+     * @throws Exception
+     * @return bool
+     */
+    public function validate(): bool {
+        return Point::validateLatitude($this->latitude)
+        || Point::validateLongitude($this->longitude);
+    }
+
+    /**
+     * @return stdClass
+     * @throws Exception
+     */
+    public function to(): stdClass  {
+        $out = new stdClass();
+        $out->{'latitude'} = $this->toLatitude();
+        $out->{'longitude'} = $this->toLongitude();
+        return $out;
+    }
+
+    /**
+     * @param stdClass $obj
+     * @return Point
+     * @throws Exception
+     */
+    public static function from(stdClass $obj): Point {
+        return new Point(
+         Point::fromLatitude($obj->{'latitude'})
+        ,Point::fromLongitude($obj->{'longitude'})
+        );
+    }
+
+    /**
+     * @return Point
+     */
+    public static function sample(): Point {
+        return new Point(
+         Point::sampleLatitude()
+        ,Point::sampleLongitude()
+        );
+    }
+}
+
+// This is an autogenerated file:SCUBAManeuver
+
+class SCUBAManeuver {
+    public static SCUBAManeuver $ASCENT;
+    public static SCUBAManeuver $DESCENT;
+    public static SCUBAManeuver $LEVEL;
+    public static function init() {
+        SCUBAManeuver::$ASCENT = new SCUBAManeuver('ASCENT');
+        SCUBAManeuver::$DESCENT = new SCUBAManeuver('DESCENT');
+        SCUBAManeuver::$LEVEL = new SCUBAManeuver('LEVEL');
+    }
+    private string $enum;
+    public function __construct(string $enum) {
+        $this->enum = $enum;
+    }
+
+    /**
+     * @param SCUBAManeuver
+     * @return string
+     * @throws Exception
+     */
+    public static function to(SCUBAManeuver $obj): string {
+        switch ($obj->enum) {
+            case SCUBAManeuver::$ASCENT->enum: return 'ASCENT';
+            case SCUBAManeuver::$DESCENT->enum: return 'DESCENT';
+            case SCUBAManeuver::$LEVEL->enum: return 'LEVEL';
+        }
+        throw new Exception('the give value is not an enum-value.');
+    }
+
+    /**
+     * @param mixed
+     * @return SCUBAManeuver
+     * @throws Exception
+     */
+    public static function from($obj): SCUBAManeuver {
+        switch ($obj) {
+            case 'ASCENT': return SCUBAManeuver::$ASCENT;
+            case 'DESCENT': return SCUBAManeuver::$DESCENT;
+            case 'LEVEL': return SCUBAManeuver::$LEVEL;
+        }
+        throw new Exception("Cannot deserialize SCUBAManeuver");
+    }
+
+    /**
+     * @return SCUBAManeuver
+     */
+    public static function sample(): SCUBAManeuver {
+        return SCUBAManeuver::$ASCENT;
+    }
+}
+SCUBAManeuver::init();
diff --git a/head/schema-pike/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.pmod
new file mode 100644
index 0000000..5ae581d
--- /dev/null
+++ b/head/schema-pike/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.pmod
@@ -0,0 +1,112 @@
+// 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.
+
+// A SCUBA dive log with waypoints
+class TopLevel {
+    array(ScubaWaypoint)|mixed waypoints; // json: "waypoints"
+
+    string encode_json() {
+        mapping(string:mixed) json = ([
+            "waypoints" : waypoints,
+        ]);
+
+        return Standards.JSON.encode(json);
+    }
+}
+
+TopLevel TopLevel_from_JSON(mixed json) {
+    TopLevel retval = TopLevel();
+
+    retval.waypoints = json["waypoints"];
+
+    return retval;
+}
+
+class ScubaWaypoint {
+    float|mixed         depth;    // json: "depth"
+    IdCardHttp|mixed    id_card;  // json: "idCard"
+    Point|mixed         location; // json: "location"
+    ScubaManeuver|mixed maneuver; // json: "maneuver"
+
+    string encode_json() {
+        mapping(string:mixed) json = ([
+            "depth" : depth,
+            "idCard" : id_card,
+            "location" : location,
+            "maneuver" : maneuver,
+        ]);
+
+        return Standards.JSON.encode(json);
+    }
+}
+
+ScubaWaypoint ScubaWaypoint_from_JSON(mixed json) {
+    ScubaWaypoint retval = ScubaWaypoint();
+
+    retval.depth = json["depth"];
+    retval.id_card = json["idCard"];
+    retval.location = json["location"];
+    retval.maneuver = json["maneuver"];
+
+    return retval;
+}
+
+class IdCardHttp {
+    mixed|string value; // json: "value"
+
+    string encode_json() {
+        mapping(string:mixed) json = ([
+            "value" : value,
+        ]);
+
+        return Standards.JSON.encode(json);
+    }
+}
+
+IdCardHttp IdCardHttp_from_JSON(mixed json) {
+    IdCardHttp retval = IdCardHttp();
+
+    retval.value = json["value"];
+
+    return retval;
+}
+
+class Point {
+    float|mixed latitude;  // json: "latitude"
+    float|mixed longitude; // json: "longitude"
+
+    string encode_json() {
+        mapping(string:mixed) json = ([
+            "latitude" : latitude,
+            "longitude" : longitude,
+        ]);
+
+        return Standards.JSON.encode(json);
+    }
+}
+
+Point Point_from_JSON(mixed json) {
+    Point retval = Point();
+
+    retval.latitude = json["latitude"];
+    retval.longitude = json["longitude"];
+
+    return retval;
+}
+
+enum ScubaManeuver {
+    ASCENT = "ASCENT",   // json: "ASCENT"
+    DESCENT = "DESCENT", // json: "DESCENT"
+    LEVEL = "LEVEL",     // json: "LEVEL"
+}
diff --git a/head/schema-python/test/inputs/schema/upper-acronym-names.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/upper-acronym-names.schema/default/quicktype.py
new file mode 100644
index 0000000..c99db33
--- /dev/null
+++ b/head/schema-python/test/inputs/schema/upper-acronym-names.schema/default/quicktype.py
@@ -0,0 +1,151 @@
+from dataclasses import dataclass
+from typing import Any, TypeVar, Type, cast, Callable
+from enum import Enum
+
+
+T = TypeVar("T")
+EnumT = TypeVar("EnumT", bound=Enum)
+
+
+def from_str(x: Any) -> str:
+    assert isinstance(x, str)
+    return x
+
+
+def from_none(x: Any) -> Any:
+    assert x is None
+    return x
+
+
+def from_union(fs, x):
+    for f in fs:
+        try:
+            return f(x)
+        except:
+            pass
+    assert False
+
+
+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_class(c: Type[T], x: Any) -> dict:
+    assert isinstance(x, c)
+    return cast(Any, x).to_dict()
+
+
+def to_enum(c: Type[EnumT], x: Any) -> EnumT:
+    assert isinstance(x, c)
+    return x.value
+
+
+def from_list(f: Callable[[Any], T], x: Any) -> list[T]:
+    assert isinstance(x, list)
+    return [f(y) for y in x]
+
+
+@dataclass
+class IDCardHTTP:
+    value: str | None = None
+
+    @staticmethod
+    def from_dict(obj: Any) -> 'IDCardHTTP':
+        assert isinstance(obj, dict)
+        value = from_union([from_str, from_none], obj.get("value"))
+        return IDCardHTTP(value)
+
+    def to_dict(self) -> dict:
+        result: dict = {}
+        if self.value is not None:
+            result["value"] = from_union([from_str, from_none], self.value)
+        return result
+
+
+@dataclass
+class Point:
+    latitude: float | None = None
+    longitude: float | None = None
+
+    @staticmethod
+    def from_dict(obj: Any) -> 'Point':
+        assert isinstance(obj, dict)
+        latitude = from_union([from_float, from_none], obj.get("latitude"))
+        longitude = from_union([from_float, from_none], obj.get("longitude"))
+        return Point(latitude, longitude)
+
+    def to_dict(self) -> dict:
+        result: dict = {}
+        if self.latitude is not None:
+            result["latitude"] = from_union([to_float, from_none], self.latitude)
+        if self.longitude is not None:
+            result["longitude"] = from_union([to_float, from_none], self.longitude)
+        return result
+
+
+class SCUBAManeuver(Enum):
+    ASCENT = "ASCENT"
+    DESCENT = "DESCENT"
+    LEVEL = "LEVEL"
+
+
+@dataclass
+class SCUBAWaypoint:
+    depth: float | None = None
+    id_card: IDCardHTTP | None = None
+    location: Point | None = None
+    maneuver: SCUBAManeuver | None = None
+
+    @staticmethod
+    def from_dict(obj: Any) -> 'SCUBAWaypoint':
+        assert isinstance(obj, dict)
+        depth = from_union([from_float, from_none], obj.get("depth"))
+        id_card = from_union([IDCardHTTP.from_dict, from_none], obj.get("idCard"))
+        location = from_union([Point.from_dict, from_none], obj.get("location"))
+        maneuver = from_union([SCUBAManeuver, from_none], obj.get("maneuver"))
+        return SCUBAWaypoint(depth, id_card, location, maneuver)
+
+    def to_dict(self) -> dict:
+        result: dict = {}
+        if self.depth is not None:
+            result["depth"] = from_union([to_float, from_none], self.depth)
+        if self.id_card is not None:
+            result["idCard"] = from_union([lambda x: to_class(IDCardHTTP, x), from_none], self.id_card)
+        if self.location is not None:
+            result["location"] = from_union([lambda x: to_class(Point, x), from_none], self.location)
+        if self.maneuver is not None:
+            result["maneuver"] = from_union([lambda x: to_enum(SCUBAManeuver, x), from_none], self.maneuver)
+        return result
+
+
+@dataclass
+class TopLevel:
+    """A SCUBA dive log with waypoints"""
+
+    waypoints: list[SCUBAWaypoint] | None = None
+
+    @staticmethod
+    def from_dict(obj: Any) -> 'TopLevel':
+        assert isinstance(obj, dict)
+        waypoints = from_union([lambda x: from_list(SCUBAWaypoint.from_dict, x), from_none], obj.get("waypoints"))
+        return TopLevel(waypoints)
+
+    def to_dict(self) -> dict:
+        result: dict = {}
+        if self.waypoints is not None:
+            result["waypoints"] = from_union([lambda x: from_list(lambda x: to_class(SCUBAWaypoint, x), x), from_none], self.waypoints)
+        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/head/schema-ruby/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.rb
new file mode 100644
index 0000000..7c01e2a
--- /dev/null
+++ b/head/schema-ruby/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.rb
@@ -0,0 +1,141 @@
+# 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.waypoints&.first.location&.latitude
+#
+# 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)
+
+  Hash          = Strict::Hash
+  String        = Strict::String
+  Double        = Strict::Float | Strict::Integer
+  SCUBAManeuver = Strict::String.enum("ASCENT", "DESCENT", "LEVEL")
+end
+
+class IDCardHTTP < Dry::Struct
+  attribute :value, Types::String.optional
+
+  def self.from_dynamic!(d)
+    d = Types::Hash[d]
+    new(
+      value: d["value"],
+    )
+  end
+
+  def self.from_json!(json)
+    from_dynamic!(JSON.parse(json))
+  end
+
+  def to_dynamic
+    {
+      "value" => value,
+    }
+  end
+
+  def to_json(options = nil)
+    JSON.generate(to_dynamic, options)
+  end
+end
+
+class Point < Dry::Struct
+  attribute :latitude,  Types::Double.optional
+  attribute :longitude, Types::Double.optional
+
+  def self.from_dynamic!(d)
+    d = Types::Hash[d]
+    new(
+      latitude:  d["latitude"],
+      longitude: d["longitude"],
+    )
+  end
+
+  def self.from_json!(json)
+    from_dynamic!(JSON.parse(json))
+  end
+
+  def to_dynamic
+    {
+      "latitude"  => latitude,
+      "longitude" => longitude,
+    }
+  end
+
+  def to_json(options = nil)
+    JSON.generate(to_dynamic, options)
+  end
+end
+
+module SCUBAManeuver
+  Ascent  = "ASCENT"
+  Descent = "DESCENT"
+  Level   = "LEVEL"
+end
+
+class SCUBAWaypoint < Dry::Struct
+  attribute :depth,    Types::Double.optional
+  attribute :id_card,  IDCardHTTP.optional
+  attribute :location, Point.optional
+  attribute :maneuver, Types::SCUBAManeuver.optional
+
+  def self.from_dynamic!(d)
+    d = Types::Hash[d]
+    new(
+      depth:    d["depth"],
+      id_card:  d["idCard"] ? IDCardHTTP.from_dynamic!(d["idCard"]) : nil,
+      location: d["location"] ? Point.from_dynamic!(d["location"]) : nil,
+      maneuver: d["maneuver"],
+    )
+  end
+
+  def self.from_json!(json)
+    from_dynamic!(JSON.parse(json))
+  end
+
+  def to_dynamic
+    {
+      "depth"    => depth,
+      "idCard"   => id_card&.to_dynamic,
+      "location" => location&.to_dynamic,
+      "maneuver" => maneuver,
+    }
+  end
+
+  def to_json(options = nil)
+    JSON.generate(to_dynamic, options)
+  end
+end
+
+# A SCUBA dive log with waypoints
+class TopLevel < Dry::Struct
+  attribute :waypoints, Types.Array(SCUBAWaypoint).optional
+
+  def self.from_dynamic!(d)
+    d = Types::Hash[d]
+    new(
+      waypoints: d["waypoints"]&.map { |x| SCUBAWaypoint.from_dynamic!(x) },
+    )
+  end
+
+  def self.from_json!(json)
+    from_dynamic!(JSON.parse(json))
+  end
+
+  def to_dynamic
+    {
+      "waypoints" => waypoints&.map { |x| x.to_dynamic },
+    }
+  end
+
+  def to_json(options = nil)
+    JSON.generate(to_dynamic, options)
+  end
+end
diff --git a/head/schema-rust/test/inputs/schema/upper-acronym-names.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/upper-acronym-names.schema/default/module_under_test.rs
new file mode 100644
index 0000000..a1e801b
--- /dev/null
+++ b/head/schema-rust/test/inputs/schema/upper-acronym-names.schema/default/module_under_test.rs
@@ -0,0 +1,56 @@
+// 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};
+
+/// A SCUBA dive log with waypoints
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct TopLevel {
+    pub waypoints: Option<Vec<ScubaWaypoint>>,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct ScubaWaypoint {
+    pub depth: Option<f64>,
+
+    pub id_card: Option<IdCardHttp>,
+
+    pub location: Option<Point>,
+
+    pub maneuver: Option<ScubaManeuver>,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct IdCardHttp {
+    pub value: Option<String>,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Point {
+    pub latitude: Option<f64>,
+
+    pub longitude: Option<f64>,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub enum ScubaManeuver {
+    #[serde(rename = "ASCENT")]
+    Ascent,
+
+    #[serde(rename = "DESCENT")]
+    Descent,
+
+    #[serde(rename = "LEVEL")]
+    Level,
+}
diff --git a/head/schema-scala3/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.scala
new file mode 100644
index 0000000..0449c7c
--- /dev/null
+++ b/head/schema-scala3/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.scala
@@ -0,0 +1,48 @@
+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
+
+/**
+ * A SCUBA dive log with waypoints
+ */
+case class TopLevel (
+    val waypoints : Option[Seq[SCUBAWaypoint]] = None
+) derives Encoder.AsObject, Decoder
+
+case class SCUBAWaypoint (
+    val depth : Option[Double] = None,
+    val idCard : Option[IDCardHTTP] = None,
+    val location : Option[Point] = None,
+    val maneuver : Option[SCUBAManeuver] = None
+) derives Encoder.AsObject, Decoder
+
+case class IDCardHTTP (
+    val value : Option[String] = None
+) derives Encoder.AsObject, Decoder
+
+case class Point (
+    val latitude : Option[Double] = None,
+    val longitude : Option[Double] = None
+) derives Encoder.AsObject, Decoder
+
+enum SCUBAManeuver : 
+    case Ascent
+    case Descent
+    case Level
+
+given Decoder[SCUBAManeuver] = Decoder.decodeString.emap {
+    case "ASCENT" => scala.Right(SCUBAManeuver.Ascent)
+    case "DESCENT" => scala.Right(SCUBAManeuver.Descent)
+    case "LEVEL" => scala.Right(SCUBAManeuver.Level)
+    case other => scala.Left("invalid SCUBAManeuver: " + other)
+}
+given Encoder[SCUBAManeuver] = Encoder.encodeString.contramap {
+    case SCUBAManeuver.Ascent => "ASCENT"
+    case SCUBAManeuver.Descent => "DESCENT"
+    case SCUBAManeuver.Level => "LEVEL"
+}
diff --git a/head/schema-scala3-upickle/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.scala
new file mode 100644
index 0000000..956d534
--- /dev/null
+++ b/head/schema-scala3-upickle/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.scala
@@ -0,0 +1,108 @@
+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
+
+
+/**
+ * A SCUBA dive log with waypoints
+ */
+case class TopLevel (
+    val waypoints : Option[Seq[SCUBAWaypoint]] = None
+) derives OptionPickler.ReadWriter
+
+case class SCUBAWaypoint (
+    val depth : Option[Double] = None,
+    val idCard : Option[IDCardHTTP] = None,
+    val location : Option[Point] = None,
+    val maneuver : Option[SCUBAManeuver] = None
+) derives OptionPickler.ReadWriter
+
+case class IDCardHTTP (
+    val value : Option[String] = None
+) derives OptionPickler.ReadWriter
+
+case class Point (
+    val latitude : Option[Double] = None,
+    val longitude : Option[Double] = None
+) derives OptionPickler.ReadWriter
+
+enum SCUBAManeuver : 
+    case Ascent
+    case Descent
+    case Level
+
+given OptionPickler.ReadWriter[SCUBAManeuver] = OptionPickler.readwriter[String].bimap[SCUBAManeuver](
+    {
+        case SCUBAManeuver.Ascent => "ASCENT"
+        case SCUBAManeuver.Descent => "DESCENT"
+        case SCUBAManeuver.Level => "LEVEL"
+    },
+    {
+        case "ASCENT" => SCUBAManeuver.Ascent
+        case "DESCENT" => SCUBAManeuver.Descent
+        case "LEVEL" => SCUBAManeuver.Level
+        case other => throw new upickle.core.Abort("invalid SCUBAManeuver: " + other)
+    }
+)
diff --git a/head/schema-schema/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.schema
new file mode 100644
index 0000000..942635d
--- /dev/null
+++ b/head/schema-schema/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.schema
@@ -0,0 +1,75 @@
+{
+    "$schema": "http://json-schema.org/draft-06/schema#",
+    "$ref": "#/definitions/TopLevel",
+    "definitions": {
+        "TopLevel": {
+            "type": "object",
+            "additionalProperties": {},
+            "properties": {
+                "waypoints": {
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/SCUBAWaypoint"
+                    }
+                }
+            },
+            "required": [],
+            "title": "TopLevel",
+            "description": "A SCUBA dive log with waypoints"
+        },
+        "SCUBAWaypoint": {
+            "type": "object",
+            "additionalProperties": {},
+            "properties": {
+                "depth": {
+                    "type": "number"
+                },
+                "idCard": {
+                    "$ref": "#/definitions/IDCardHTTP"
+                },
+                "location": {
+                    "$ref": "#/definitions/Point"
+                },
+                "maneuver": {
+                    "$ref": "#/definitions/SCUBAManeuver"
+                }
+            },
+            "required": [],
+            "title": "SCUBAWaypoint"
+        },
+        "IDCardHTTP": {
+            "type": "object",
+            "additionalProperties": {},
+            "properties": {
+                "value": {
+                    "type": "string"
+                }
+            },
+            "required": [],
+            "title": "IDCardHTTP"
+        },
+        "Point": {
+            "type": "object",
+            "additionalProperties": {},
+            "properties": {
+                "latitude": {
+                    "type": "number"
+                },
+                "longitude": {
+                    "type": "number"
+                }
+            },
+            "required": [],
+            "title": "Point"
+        },
+        "SCUBAManeuver": {
+            "type": "string",
+            "enum": [
+                "ASCENT",
+                "DESCENT",
+                "LEVEL"
+            ],
+            "title": "SCUBAManeuver"
+        }
+    }
+}
diff --git a/head/schema-typescript/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.ts
new file mode 100644
index 0000000..ccc0af0
--- /dev/null
+++ b/head/schema-typescript/test/inputs/schema/upper-acronym-names.schema/default/TopLevel.ts
@@ -0,0 +1,226 @@
+// 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.
+
+/**
+ * A SCUBA dive log with waypoints
+ */
+export interface TopLevel {
+    waypoints?: SCUBAWaypoint[];
+    [property: string]: unknown;
+}
+
+export interface SCUBAWaypoint {
+    depth?:    number;
+    idCard?:   IDCardHTTP;
+    location?: Point;
+    maneuver?: SCUBAManeuver;
+    [property: string]: unknown;
+}
+
+export interface IDCardHTTP {
+    value?: string;
+    [property: string]: unknown;
+}
+
+export interface Point {
+    latitude?:  number;
+    longitude?: number;
+    [property: string]: unknown;
+}
+
+export type SCUBAManeuver = "ASCENT" | "DESCENT" | "LEVEL";
+
+// 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: "waypoints", js: "waypoints", typ: u(undefined, a(r("SCUBAWaypoint"))) },
+    ], "any"),
+    "SCUBAWaypoint": o([
+        { json: "depth", js: "depth", typ: u(undefined, 3.14) },
+        { json: "idCard", js: "idCard", typ: u(undefined, r("IDCardHTTP")) },
+        { json: "location", js: "location", typ: u(undefined, r("Point")) },
+        { json: "maneuver", js: "maneuver", typ: u(undefined, r("SCUBAManeuver")) },
+    ], "any"),
+    "IDCardHTTP": o([
+        { json: "value", js: "value", typ: u(undefined, "") },
+    ], "any"),
+    "Point": o([
+        { json: "latitude", js: "latitude", typ: u(undefined, 3.14) },
+        { json: "longitude", js: "longitude", typ: u(undefined, 3.14) },
+    ], "any"),
+    "SCUBAManeuver": [
+        "ASCENT",
+        "DESCENT",
+        "LEVEL",
+    ],
+};
