Skip to content

feat(options)!: unify --just-types across all languages#2943

Merged
schani merged 2 commits into
masterfrom
fix/unify-just-types
Jul 14, 2026
Merged

feat(options)!: unify --just-types across all languages#2943
schani merged 2 commits into
masterfrom
fix/unify-just-types

Conversation

@schani

@schani schani commented Jul 14, 2026

Copy link
Copy Markdown
Member

--just-types is the common spelling for "plain types, no (de)serialization helpers" — 15 languages accept it as a boolean option. But C# spelled it --features just-types, and Kotlin, Scala 3, and Smithy4s --framework just-types, so the flag everyone reaches for first failed with Option parsing failed: Unknown option: --just-types.

What this does

Warning

This is a breaking change. It targets the next major version. The enum spellings are removed, not deprecated: they now fail with Unknown value just-types for option … (CLI and API alike).

Every quicktype language now spells "plain types" the same way: the boolean --just-types. It goes through the normal option registry, so it shows up in --help and in the typed rendererOptions maps. When both --just-types and an explicit --features/--framework are given, --just-types wins.

Migration

Language Old spelling New spelling
C# --features just-types --just-types
C# --features just-types-and-namespace --just-types (the two enum values had identical semantics)
Kotlin --framework just-types --just-types
Scala 3 --framework just-types --just-types
Smithy4s --framework just-types --just-types — or nothing: plain types is Smithy4s's only mode, and its single-value --framework option is gone

API callers: same renames in rendererOptions (e.g. { framework: "just-types" }{ "just-types": true }).

⚠️ Scala 3's default output changes

--framework just-types was Scala 3's default, and a removed enum value can't stay the default. The default is now circe: a bare quicktype -l scala3 generates circe (de)serialization instead of plain case classes. To keep the old output, pass --just-types. Kotlin's default (klaxon) and C#'s default (--features complete, Newtonsoft) are unchanged.

Cleanups this enables

  • C#'s features enum keeps complete (default) and attributes-only; the renderers derive "need helpers/attributes" from features and justTypes directly.
  • Kotlin/Scala 3 renderer dispatch is a plain if (justTypes) in front of the framework switch; Smithy4s's framework switch (marked FIXME: why does this exist) is deleted.
  • The VS Code extension's per-language special-casing collapses into one generic check — which also fixes a bug where its "just types" commands silently generated full serialization code for every language other than C# and Kotlin.
  • The renderer-options type test keeps rust as its "another language's option" compile-error case (Rust really has no just-types).

Testing

Unit tests (all 119 green) assert: --just-types yields plain output for all four languages; the removed enum spellings raise Unknown value … for option …; the boolean wins over a conflicting explicit enum for C#/Kotlin/Scala 3; Scala 3's bare default now emits circe and Kotlin's stays klaxon. Verified --just-types, the conflict rule, the new errors, and --help for all four languages with the built CLI. The Smithy4s fixture definition migrates to { "just-types": "true" } (kotlinc isn't available in this environment, so the compile fixtures ride on CI).

🤖 Generated with Claude Code

schani and others added 2 commits July 14, 2026 12:24
…an enum

Most languages spell "generate plain types without (de)serialization
helpers" as a `just-types` boolean option, but C# spelled it
`--features just-types` and Kotlin, Scala 3, and Smithy4s
`--framework just-types`, so the common `--just-types` flag was
rejected for them with an option-parsing error.

Those four languages now also accept `just-types` (secondary option).
When it's set, makeRenderer forces the corresponding enum option to its
just-types value before resolving options, so the boolean wins over a
conflicting explicit enum value.  The enum spellings keep working
unchanged.

The renderer-options type test that used kotlin + just-types as its
"another language's option" compile error now uses rust, which really
has no such option.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BREAKING CHANGE: the enum spellings of "plain types" are gone. C# loses
`--features just-types` and `--features just-types-and-namespace` (their
value maps were identical); Kotlin and Scala 3 lose `--framework
just-types`; Smithy4s loses its single-value `--framework` option
entirely. Every language now spells it the way the other 15 always have:
the boolean `--just-types`, which wins over a conflicting explicit
`--features`/`--framework`.

Scala 3's default changes with this: a bare `quicktype -l scala3` now
generates circe (de)serialization instead of plain case classes — plain
types now require asking for `--just-types`, like in every other
language.

The VS Code extension's per-language special-casing collapses into a
single check for whether the target language has a `just-types` option
(fixing a bug where its "just types" commands silently did nothing for
languages other than C# and Kotlin), and the Smithy4s test fixture
migrates to the boolean spelling.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@schani schani changed the title feat(options): accept --just-types in every language that spells it as an enum feat(options)!: unify --just-types across all languages Jul 14, 2026
@schani schani merged commit f97aa8d into master Jul 14, 2026
24 checks passed
@schani schani deleted the fix/unify-just-types branch July 14, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant