[pull] master from glideapps:master#72
Merged
Merged
Conversation
1. Added IntegerType enum 2. Introduced integerType configuration option - Supports forced i32/i64 usage - Enables automatic selection based on numerical range
Add support for the unevaluatedProperties keyword from JSON Schema draft 2019-09/2020-12.
When additionalProperties is not defined, unevaluatedProperties is now used as a fallback
to determine the type of additional properties in an object.
This fixes issues where objects using unevaluatedProperties would generate incorrect
types (e.g., map[string]interface{} instead of properly typed maps in Go).
Klaxon has been unmaintained since ~2022 and our own fixture skip-lists cite its open bugs; the Jackson renderer is feature-complete and fully CI-covered. The kotlin/schema-kotlin fixtures now pin framework=klaxon explicitly so the Klaxon renderer keeps end-to-end coverage (kotlin-jackson and kotlinx fixtures cover the other frameworks). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
System.Text.Json is the built-in, Microsoft-recommended serializer; Newtonsoft.Json is in maintenance mode. The csharp, schema-csharp, schema-json-csharp, and graphql-csharp fixtures now pin framework=NewtonSoft explicitly so the Newtonsoft renderer keeps its end-to-end coverage (the SystemTextJson fixtures already exist). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
C++17 std::optional/std::variant have been universally available since ~2018; requiring Boost by default is a legacy accommodation. CI already compiles the fixture at -std=c++17. The quicktest options now exercise boost=true so the Boost code path keeps coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… edition-2018 - visibility now defaults to public: private fields on generated structs can neither be constructed nor read by consumers, and every modern Rust codegen emits pub fields. - derive-debug and derive-clone now default to true, per the Rust API guidelines (C-COMMON-TRAITS); all emitted field types are Clone, so this always compiles. - The vestigial edition-2018 option is deleted: it only toggled between 'use serde::...' and the pre-2018 'extern crate serde_derive;' prelude. The 2018+ form is now unconditional. Passing --edition-2018 is an error now (breaking). A quicktest combo pins the old defaults (visibility=private, no derives) so the legacy output shape keeps fixture coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The ecosystem has turned on TypeScript enum syntax: Node's default type stripping and tsc --erasableSyntaxOnly both hard-error on it. Enums now render as unions of string literals by default; --no-prefer-unions restores the old output. Runtime typechecking of enum values is unaffected (the typeMap lists case values either way), so the schema fixtures' enum fail-samples still fail as required. Flow always rendered enums as string-literal unions and ignores this option; its output is unchanged. quicktests pin prefer-unions=false for typescript (covering the enum code path) and flow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
List<T> is the universal Java DTO idiom (Effective Java, OpenAPI Generator, jsonschema2pojo); raw arrays fight equals/hashCode and generics. The quicktest entries for the java, java-datetime-legacy, and java-lombok fixtures now pin array-type=array so the T[] code path keeps coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- final-props now defaults to true: Effective Dart and all current data-class idioms (freezed, @immutable culture) use final fields. A quicktest pins final-props=false so the mutable-property path keeps coverage. - The null-safety option is deleted: null-safe output is the only choice that compiles under Dart 3, so the non-null-safe branches were dead weight. Null-safe rendering is now unconditional; passing --null-safety/--no-null-safety is an error now (breaking). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- density=normal (one property per line, explicit CodingKeys) is what swift-format, SwiftFormat, and the Google Swift style guide produce; merged declarations read as a codegen quirk. Round-tripping is identical. The dense path stays covered by the existing density=dense quicktest; the now-redundant density=normal quicktest is dropped. - The swift-5-support option is deleted: the renderer never read it, so it has been a no-op for years. Passing --swift-5-support is an error now (breaking). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Hand-written aeson records overwhelmingly use [a]; the Vector default was inherited from the Elm renderer and forces an extra import. The quicktest entry now pins array-type=array so the Vector code path keeps coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…alization
The emitted adl_serializer for optionals handled null by calling the
optional *factory* with no arguments. That is only correct in boost
mode, where the factory is boost::optional and produces an empty
optional. In boost-free mode std::make_optional<T>() wraps a
default-constructed T, and std::make_shared<T>() (both modes) points at
a default-constructed T — so a JSON null inside a union or array came
back as 0/""/{} on round-trip. Null now maps to an empty optType<T>().
This is a pre-existing bug in the boost=false option; flipping the
default to boost=false in this branch merely exposed it, because the
old {boost:"false"} quicktest never actually ran: quicktests without a
pinned input run against combinations[1-4].json, which are all in the
C++ fixture's skipJSON. The boost quicktests are therefore now pinned
to unions.json (nulls inside unions, where the boost and std code
paths differ) and pokedex.json so they really execute.
Verified locally: QUICKTEST=true FIXTURE=cplusplus passes end to end
(63 tests), with the boost=true quicktests compiled against Boost 1.84
headers; unions.json round-trips byte-identically in both modes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
In list mode, the union deserializer read JSON arrays with
jsonParser.readValueAs(new TypeReference<List>() {}) — a raw List, so
Jackson skipped element-type checking entirely and schema-invalid
inputs (e.g. a string array where List<Long> is expected) deserialized
successfully instead of being rejected. The TypeReference now carries
the full generic type (javaType instead of javaTypeWithoutGenerics),
e.g. TypeReference<List<Long>>.
This is a pre-existing bug in the array-type=list option; flipping the
default to list in this branch merely exposed it, via the
implicit-class-array-union.schema expected-failure sample in the
schema-java fixture (its .fail.union.json no longer failed).
Verified by running the generated code against Jackson 2.17: all five
valid samples round-trip, both fail samples now exit nonzero, and the
old code demonstrably accepted the bad input. A corpus-wide sweep of
all schema and JSON inputs in list mode shows every emitted
TypeReference now carries its element type; union-heavy inputs
(unions.json, combinations1-4, php-mixed-union, optional-union,
union-constructor-clash) round-trip within the harness' tolerances.
(Union members of map type still use raw readValueAs(Map.class) — that
looseness is mode-independent and pre-existing in both array and list
modes; left as a follow-up.)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # test/languages.ts
Bumps [stream-json](https://github.com/uhop/stream-json) from 1.8.0 to 3.5.0. - [Commits](uhop/stream-json@1.8.0...3.5.0) --- updated-dependencies: - dependency-name: stream-json dependency-version: 3.5.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
With #2694 merged, C# 8 output with nullable reference types becomes the out-of-box experience, pairing with the SystemTextJson default. Both csharp fixtures now pin csharp-version=5 and =6 in their quicktests (replacing the now-redundant =8 rows), so all three language-version code paths stay covered. Promoting v8 to the base schema-fixture runs put Newtonsoft v8 over the full schema corpus for the first time (quicktests only cover the JSON fixtures) and exposed a gap in #2694's NRT pragma set: the emitted constraint-check and string-transformer helpers produce CS8602, CS8604, and CS8625 warnings under '#nullable enable', which 'dotnet run' prints to stdout ahead of the JSON, breaking the fixture comparison. Those three codes are now suppressed alongside the existing CS8618/CS8601/CS8603(/CS8765) pragmas; a corpus-wide compile scan of every schema under both frameworks confirms no other warning codes remain. Suppressing CS8602 also fixes the exact issue behind three schema-csharp-SystemTextJson skips (minmaxlength, optional-constraints, optional-const-ref), so those schemas are un-skipped. Verified locally with dotnet SDK 8.0.423: QUICKTEST runs of csharp, csharp-SystemTextJson, schema-csharp, and schema-csharp-SystemTextJson all pass end to end (272 tests), with every quicktest row confirmed executing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
stream-json 3.x replaced the Parser class export with a lowercase parser factory; the Duplex-stream form is now parser.asStream(). Token names, payload shapes, and the pack/stream option defaults are unchanged from 1.x, so the event handler needs no changes. Also drop @types/stream-json (1.x types) — 3.x ships its own TypeScript declarations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Modernize the Elm renderer from Elm 0.18 (which elm.org no longer
supports) to Elm 0.19:
- Seed decode pipelines with `Jdec.succeed` instead of the `decode`
function that was removed in NoRedInk/elm-json-decode-pipeline 1.0.
- Use the 0.19 elm/json encoder API: `Json.Encode.list`/`array` now take
the element encoder directly and `Json.Encode.dict` exists, so the
generated `makeArrayEncoder`/`makeListEncoder`/`makeDictEncoder`
helpers are gone; only `makeNullableEncoder` remains.
- Stop exposing `map`/`toList` from imports (Elm 0.19 shadowing rules);
only `Dict` (and `Array` when needed) are exposed.
- Forbid the parameter names used by generated functions (`x`, `y`, `r`,
`f`, `m`, `str`, `somethingElse`) as global identifiers: Elm 0.19 does
not allow a parameter to shadow a top-level definition.
- Never start generated identifiers with an underscore, which Elm 0.19
rejects.
- Escape non-printable characters in string literals with Elm's
`\u{XXXX}` syntax; the previously used `\uXXXX`/`\UXXXXXXXX` forms are
syntax errors in Elm 0.19.
- Update the usage comment to `elm install NoRedInk/elm-json-decode-pipeline`
and fix a stray backtick in it.
Elm 0.18 output is not supported anymore.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`List` is the idiomatic Elm collection type, and with the 0.19 `Json.Encode.list` API it needs no custom encoder helper. Generating `Array` is still available via `--array-type array`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rewrite the fixture driver for Elm 0.19: `elm.json` replaces `elm-package.json`, `Main.elm` uses `Platform.worker` and `Jdec.errorToString`, and `runner.js` uses the 0.19 embedding API (`Elm.Main.init()`). The setup command compiles a new `Warmup.elm` to pre-populate the shared ELM_HOME package cache, because elm 0.19.1 can corrupt its package registry when parallel compiles race on a cold cache; the 0.18-era `sysconfcpus` hack is gone. Every skip-list entry was re-verified against elm 0.19.1: - `identifiers.json`, `simple-identifiers.json`, `blns-object.json`, `nst-test-suite.json`, and `keywords.json` now pass (they only failed on 0.19 escape syntax, leading underscores, and shadowing, all fixed in the renderer) and are only excluded from the diff-via-schema code comparison, where schema round-tripping changes inferred names. - The recursive inputs stay skipped: Elm type aliases cannot be recursive. - `constructor.schema` and `keyword-unions.schema` stay skipped with an accurate reason: elm/json's field decoder uses the JS `in` operator, which finds inherited Object.prototype members. - `nested-intersection-union.schema` is newly skipped: the generated decoder accepts invalid union members because all class properties decode via `Jpipe.optional`. - `recursive-union-flattening.schema` (added since the fixture was disabled) is skipped for recursion. The quicktest renderer option flips to `array-type: array` to keep the non-default Array path covered now that `list` is the default. The full corpus passes locally with elm 0.19.1 (215 JSON tests including misc, 67 schema tests), so `elm,schema-elm` returns to the CI matrix; the workflow's elm 0.19.1 install step already existed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…roperties For an optional property whose type is itself a nullable union (e.g. GraphQL's nullable String, which infers as string | null), propertyDefinition calls nullableCSType on the union, whose csType rendering already resolves the union through nullableCSType and appends '?'. At csharp-version 8 the outer call then appended a second one, emitting 'public string?? Name' — invalid C# (CS1519). The same path produced 'long??' for optional nullable value-type unions at any version. nullableCSType now unwraps a nullable union before rendering, so the annotation is applied exactly once. This is a pre-existing bug in the csharp-version=8 option: the GraphQL fixtures run base options only, so flipping the default to 8 put v8 GraphQL output in CI for the first time (caught by graphql-csharp on github5.graphql). Verified locally with dotnet SDK 8: a corpus-wide sweep (all GraphQL, schema, and JSON inputs under both frameworks, 242 generated files) contains no doubled '?' in any type position, a representative set compiles clean, and the full CI fixture set - csharp, schema-csharp, schema-json-csharp, graphql-csharp, csharp-SystemTextJson, schema-csharp-SystemTextJson - passes end to end (326 tests). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Elm 0.19.2 (released 2026-07-06) is a compiler performance release with no language changes. It refuses to build applications whose elm.json declares 0.19.1, so the fixture's elm.json now declares 0.19.2, and CI downloads the 0.19.2 binary (the release assets are named elm-0.19.2-linux-x64.gz; the old binary-for-linux-64-bit.gz naming is gone). The `Warmup.elm` cache pre-warm stays: concurrent cold-cache builds still corrupt the shared ELM_HOME package cache with 0.19.2 (verified: 16 parallel cold-cache `elm make` runs consistently fail without the warmup, and the fixtures pass with it). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Modernize Elm target to 0.19
…m-json-3.5.0 build(deps): bump stream-json from 1.8.0 to 3.5.0
fix(cpp): support std::optional in Utf16_Utf8 string conversion
Co-Authored-By: gpt-5.6-sol via pi <noreply@openai.com>
quicktype's URL input reader handed the fetch response body straight to the JSON parser without checking response.ok, so an HTTP error (e.g. a 401 from an expired auth token) whose body happened to be valid JSON was silently treated as legitimate input, generating types from the error payload and exiting 0. Now readableFromFileOrURL throws a clear error including the HTTP status when the response is not OK. Co-Authored-By: gpt-5.6-sol via pi <noreply@openai.com>
fix(input): reject non-OK HTTP responses when reading from a URL
fix(typescript-zod): preserve null for nullable date-time fields
fix(schema-input): report clean fetch error for missing schema paths
fix(cli): surface clear error for duplicate -o instead of internal error
ConvenienceRenderer.forEachEnumCase always alphabetized enum cases by their rendered name before handing them to every language renderer's emitEnum, so C++ (and other languages) generated enums in alphabetical order instead of the order declared in the source JSON Schema/JSON. Stop sorting and let the existing insertion order (already preserved by the underlying case-names map) flow through unchanged. Co-Authored-By: gpt-5.6-sol via pi <noreply@openai.com>
fix(json-schema): recognize $defs when deriving type names
fix(dart): preserve null for optional list properties
fix(csharp): throw JsonException/NotSupportedException in SystemTextJson converters
fix(dart): keep top-level fromJson/toJson names with --from-map
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…guishable (#2357) Co-Authored-By: gpt-5.6-sol via pi <noreply@openai.com>
…alProperties: false (#1257) When merging object types from an `allOf`, IntersectionAccumulator discarded a property as soon as any other branch didn't declare that property and didn't allow additional properties. Since JSON Schema input commonly sets `additionalProperties: false` on every branch, this meant merging two or more `allOf` branches with disjoint property sets produced an empty (or partially empty) merged object instead of the union of all their properties. Fix ResolveIntersections.ts so a property known from any branch is kept in the merged object regardless of whether other branches restrict additional properties; `additionalProperties: false` still correctly disallows properties nobody declared. Added test/inputs/schema/all-of-additional-properties-false.schema with a positive fixture sample and a `.fail.enum` negative sample (invalid enum value for a property merged in from one of the allOf branches, which only fails if that property survived the merge). Verified locally: npm run build passes, npm run test:unit passes (176 tests), and QUICKTEST=true FIXTURE=schema-typescript script/test passes (exit 0), including the new fixture. CI will cover the other schema-<language> fixtures. Fixes #1257 Co-Authored-By: gpt-5.6-sol via pi <noreply@openai.com>
fix(core): preserve JSON Schema enum case order
For a union of `integer` and `number` (e.g. JSON Schema `type: ["integer", "number"]`), the Python target emitted `from_union([from_float, from_int], ...)`. `from_float` accepts plain ints and coerces them to `float`, so `from_int` was unreachable: every integer value silently turned into a float and the round-trip was not bijective (`5` became `5.0`). Reorder Python union member (de)serializer dispatch so the `integer` branch is always tried before `number`/`double`. Co-Authored-By: gpt-5.6-sol via pi <noreply@openai.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cjson's generated deserializer does not validate enum values, so the `.1.fail.enum.json` negative sample of the new `all-of-additional-properties-false.schema` fixture round-trips instead of being rejected, making the expected-failure assertion fail. Add the schema to the shared `skipsEnumValueValidation` list, matching the existing enum fixtures that other non-enum-validating languages already skip. Co-Authored-By: Claude <noreply@anthropic.com>
cjson declares the minmax/minmaxlength features so the fail samples run, but its generated code does not enforce min/max/length constraints — which is why it already skips minmax.schema, minmaxlength.schema, pattern.schema and optional-constraints.schema. The new schema-constraints.schema is the same kind of constraint fixture and was never added to the skip list, so its expected-failure samples were not rejected and schema-cjson failed. Scope it out for cjson alongside the existing constraint schemas. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fix(schema): keep allOf-merged properties when additionalProperties: false
fix(schema): emit min/max constraints for applicable type kinds
fix(typescript-input): strip brace-wrapped types from JSDoc @type tags
fix(typescript): annotate m() helper's props array to satisfy noImplicitAny
fix(cpp): silence unused-parameter warnings for empty objects
fix(c++): auto-include Generators.hpp and use real type names in multi-source usage comments
fix(cjson): start enum values at 1 so invalid/missing input is distinguishable
fix(python): try integer before number in union deserialization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )