Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0afd512
fix(effect): preserve optional class properties
schani Sep 5, 2026
1965d78
test: enable Swift and TypeScript schema CI coverage
schani Sep 5, 2026
2792517
Merge remote-tracking branch 'origin/master' into enable-dart-swift-t…
schani Sep 5, 2026
33c63fe
test: centralize language-specific schema discovery
schani Sep 5, 2026
52cb8e0
test: share Unicode cases and retain existing option coverage
schani Sep 5, 2026
ee20482
Merge master and preserve Effect optional-property support
schani Sep 5, 2026
76dbb3f
Merge current master and retain all option coverage
schani Sep 5, 2026
83a1018
Merge remote-tracking branch 'origin/enable-dart-swift-ts-tests' into…
schani Sep 5, 2026
af40029
test(effect): reject null for optional non-null properties
schani Sep 5, 2026
39fe6c3
test: round-trip schema-generated Swift without renaming
schani Sep 5, 2026
8af9704
test: check schema roundtrips in existing Swift fixture
schani Sep 5, 2026
66739af
fix(dart): count Unicode code points in string bounds (#3442)
schani Sep 5, 2026
c1e9fd3
fix(zod): count Unicode code points for string length (#3443)
schani Sep 5, 2026
db9d7d4
fix(effect): count Unicode code points for string length (#3444)
schani Sep 5, 2026
b08c20d
fix(javascript): count Unicode code points for string length (#3445)
schani Sep 5, 2026
988a3d6
Merge master and retain Dart option coverage
schani Sep 5, 2026
27787e6
test: share optional-property regression across languages
schani Sep 5, 2026
19b16c7
Merge remote-tracking branch 'origin/enable-dart-swift-ts-tests' into…
schani Sep 5, 2026
5f971bd
test: skip confirmed optional-null failures
schani Sep 5, 2026
88c8091
test: skip confirmed Haskell optional-null failure
schani Sep 5, 2026
3334d3b
Merge remote-tracking branch 'origin/master' into fix/effect-optional…
schani Sep 5, 2026
d0e08be
Merge remote-tracking branch 'origin/master' into fix/effect-optional…
schani Sep 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export class TypeScriptEffectSchemaTargetLanguage extends TargetLanguage<
super(typeScriptEffectSchemaLanguageConfig);
}

public get supportsOptionalClassProperties(): boolean {
return true;
}

public getOptions(): typeof typeScriptEffectSchemaOptions {
return typeScriptEffectSchemaOptions;
}
Expand Down
1 change: 1 addition & 0 deletions test/inputs/schema/optional-property.1.fail.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"value":null}
1 change: 1 addition & 0 deletions test/inputs/schema/optional-property.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions test/inputs/schema/optional-property.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"value":"present"}
7 changes: 7 additions & 0 deletions test/inputs/schema/optional-property.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "object",
"properties": {
"value": { "type": "string" }
},
"additionalProperties": false
}
44 changes: 23 additions & 21 deletions test/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export const CSharpLanguageSystemTextJson: Language = {
skipJSON: [],
skipMiscJSON: false,
skipSchema: [
"optional-property.schema",
// The following skips are pre-existing System.Text.Json renderer issues,
// found when first enabling the schema fixture for this language:
// minmaxlength.schema, optional-constraints.schema, and
Expand Down Expand Up @@ -239,7 +240,7 @@ export const JavaLanguage: Language = {
topLevel: "TopLevel",
skipJSON: [],
skipMiscJSON: false,
skipSchema: [],
skipSchema: ["optional-property.schema"],
rendererOptions: {},
// The default is array-type=list; this keeps the T[] code path
// covered.
Expand Down Expand Up @@ -301,7 +302,7 @@ export const PythonLanguage: Language = {
topLevel: "TopLevel",
skipJSON: [],
skipMiscJSON: false,
skipSchema: [],
skipSchema: ["optional-property.schema"],
rendererOptions: {},
quickTestRendererOptions: [
// The default is "3.10"; keep the older feature sets covered.
Expand Down Expand Up @@ -341,7 +342,7 @@ export const RustLanguage: Language = {
output: "module_under_test.rs",
topLevel: "TopLevel",
skipJSON: [],
skipSchema: [],
skipSchema: ["optional-property.schema"],
skipMiscJSON: false,
rendererOptions: {},
quickTestRendererOptions: [
Expand Down Expand Up @@ -401,7 +402,7 @@ export const CrystalLanguage: Language = {
"simple-identifiers.json",
"nst-test-suite.json",
],
skipSchema: [],
skipSchema: ["optional-property.schema"],
skipMiscJSON: false,
rendererOptions: {},
quickTestRendererOptions: [],
Expand Down Expand Up @@ -486,7 +487,7 @@ export const RubyLanguage: Language = {
output: "TopLevel.rb",
topLevel: "TopLevel",
skipJSON: [],
skipSchema: [],
skipSchema: ["optional-property.schema"],
skipMiscJSON: false,
rendererOptions: {},
quickTestRendererOptions: [["pokedex.json", { namespace: "QuickType" }]],
Expand Down Expand Up @@ -518,7 +519,7 @@ export const GoLanguage: Language = {
"nst-test-suite.json",
],
skipMiscJSON: false,
skipSchema: [],
skipSchema: ["optional-property.schema"],
rendererOptions: {},
quickTestRendererOptions: [
// Runs against the expected-output file
Expand Down Expand Up @@ -730,7 +731,7 @@ export const CPlusPlusLanguage: Language = {
topLevel: "TopLevel",
skipJSON: [],
skipMiscJSON: false,
skipSchema: [],
skipSchema: ["optional-property.schema"],
rendererOptions: {},
quickTestRendererOptions: [
{ "code-format": "with-struct" },
Expand Down Expand Up @@ -809,6 +810,7 @@ export const ElmLanguage: Language = {
],
skipMiscJSON: false,
skipSchema: [
"optional-property.schema",
"union-list.schema", // recursion
"list.schema", // recursion
"ref-remote.schema", // recursion
Expand Down Expand Up @@ -858,7 +860,7 @@ export const SwiftLanguage: Language = {
"nst-test-suite.json",
],
skipMiscJSON: false,
skipSchema: [],
skipSchema: ["optional-property.schema"],
rendererOptions: { "support-linux": "true" },
quickTestRendererOptions: [
{ "support-linux": "false" },
Expand Down Expand Up @@ -930,7 +932,7 @@ export const ObjectiveCLanguage: Language = {
"blns-object.json",
],
skipMiscJSON: false,
skipSchema: [],
skipSchema: ["optional-property.schema"],
rendererOptions: { functions: "true" },
quickTestRendererOptions: [],
sourceFiles: ["src/language/Objective-C/index.ts"],
Expand Down Expand Up @@ -1059,7 +1061,7 @@ export const JavaScriptPropTypesLanguage: Language = {
output: "toplevel.js",
topLevel: "TopLevel",
skipJSON: [],
skipSchema: [],
skipSchema: ["optional-property.schema"],
skipMiscJSON: false,
rendererOptions: { "module-system": "es6" },
quickTestRendererOptions: [{ converters: "top-level" }],
Expand Down Expand Up @@ -1134,6 +1136,7 @@ export const Scala3Language: Language = {
topLevel: "TopLevel",
skipJSON: [],
skipSchema: [
"optional-property.schema",
// The generated case class exceeds the JVM's 254-parameter limit.
"keyword-unions.schema",
],
Expand Down Expand Up @@ -1178,6 +1181,7 @@ export const Scala3UpickleLanguage: Language = {
topLevel: "TopLevel",
skipJSON: [],
skipSchema: [
"optional-property.schema",
// The generated case class exceeds the JVM's 254-parameter limit.
"keyword-unions.schema",
],
Expand Down Expand Up @@ -1319,6 +1323,7 @@ export const KotlinLanguage: Language = {
"af2d1.json",
],
skipSchema: [
"optional-property.schema",
// Very weird - the types are correct, but it can (de)serialize the string,
// which is not represented in the types (implicit-class-array-union);
// class-map-union: KlaxonException: Couldn't find a suitable constructor for class UnionValue to initialize with {}
Expand Down Expand Up @@ -1384,7 +1389,7 @@ export const KotlinJacksonLanguage: Language = {
// The enum serializer does not escape control characters.
"objc-control-characters.json",
],
skipSchema: ["keyword-unions.schema"],
skipSchema: ["optional-property.schema", "keyword-unions.schema"],
skipMiscJSON: false,
rendererOptions: { framework: "jackson" },
quickTestRendererOptions: [],
Expand Down Expand Up @@ -1439,6 +1444,7 @@ export const KotlinXLanguage: Language = {
"blns-object.json", // JSON-to-schema property naming is not stable for case collisions.
],
skipSchema: [
"optional-property.schema",
"integer-before-number.schema", // Python-specific union-order regression.
// Unions render as sealed classes without serializer wiring, so
// deserialization fails at runtime (documented TODO in
Expand Down Expand Up @@ -1503,6 +1509,7 @@ export const DartLanguage: Language = {
"test/inputs/regressions/unicode-codepoint-length.schema",
],
skipSchema: [
"optional-property.schema",
"integer-before-number.schema", // Python-specific union-order regression.
],
skipMiscJSON: false,
Expand Down Expand Up @@ -1561,6 +1568,7 @@ export const PikeLanguage: Language = {
skipJSON: [],
skipMiscJSON: false,
skipSchema: [
"optional-property.schema",
// no implicit cast int <-> float in Pike
...skipsIntFloatUnions.filter(
(schema) =>
Expand Down Expand Up @@ -1641,7 +1649,7 @@ export const HaskellLanguage: Language = {
topLevel: "QuickType",
skipJSON: ["combinations4.json"],
skipMiscJSON: false,
skipSchema: ["keyword-unions.schema"],
skipSchema: ["optional-property.schema", "keyword-unions.schema"],
rendererOptions: {},
// The default is array-type=list; this keeps the Vector code path
// covered.
Expand Down Expand Up @@ -1683,6 +1691,7 @@ export const PHPLanguage: Language = {
],
skipMiscJSON: false,
skipSchema: [
"optional-property.schema",
"integer-before-number.schema", // Python-specific union-order regression.
// Unions are inlined as PHP union type declarations, so a
// top-level union produces no named TopLevel class for the driver.
Expand Down Expand Up @@ -1742,15 +1751,7 @@ export const TypeScriptEffectSchemaLanguage: Language = {
return `npm run --silent test "${sample}"`;
},
diffViaSchema: true,
skipDiffViaSchema: [
// Schema generated type uses first key as type name, JSON uses last
"0cffa.json",
"f6a65.json",
"c3303.json",
"7681c.json",
"127a1.json",
"26b49.json",
],
skipDiffViaSchema: [],
allowMissingNull: false,
features: [
"enum",
Expand Down Expand Up @@ -1833,6 +1834,7 @@ export const ElixirLanguage: Language = {
],
skipMiscJSON: false,
skipSchema: [
"optional-property.schema",
// The test incorrectly succeeds due to the emitter being permissive for unions that contain only primitives. A future enhancement
// for the Elixir emitter could be a user-controlled 'strict' mode that pattern matches even on unions of only primitive types.
// A top-level array is deserialized without enforcing its element
Expand Down
Loading