diff --git a/crates/schematic/tests/macros_test.rs b/crates/schematic/tests/macros_test.rs index b647345f..b86930b0 100644 --- a/crates/schematic/tests/macros_test.rs +++ b/crates/schematic/tests/macros_test.rs @@ -316,6 +316,10 @@ fn generates_json_schema() { generator.add::(); generator.add::(); generator.add::(); + generator.add::(); + generator.add::(); + generator.add::(); + generator.add::(); // Partials are separate generator.add::(); generator.add::(); @@ -357,6 +361,10 @@ fn generates_typescript() { generator.add::(); generator.add::(); generator.add::(); + generator.add::(); + generator.add::(); + generator.add::(); + generator.add::(); // Partials are separate generator.add::(); generator.add::(); diff --git a/crates/schematic/tests/snapshots/macros_test__generates_json_schema.snap b/crates/schematic/tests/snapshots/macros_test__generates_json_schema.snap index 85301528..52dfff5d 100644 --- a/crates/schematic/tests/snapshots/macros_test__generates_json_schema.snap +++ b/crates/schematic/tests/snapshots/macros_test__generates_json_schema.snap @@ -916,6 +916,30 @@ expression: "std::fs::read_to_string(file).unwrap()" "b-a-z" ] }, + "UnnamedMultiple": { + "title": "UnnamedMultiple", + "type": "array", + "items": [ + { + "type": "string" + }, + { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + { + "type": "boolean" + } + ], + "maxItems": 3, + "minItems": 3 + }, "Validations": { "title": "Validations", "type": "object", diff --git a/crates/schematic/tests/snapshots/macros_test__generates_typescript-2.snap b/crates/schematic/tests/snapshots/macros_test__generates_typescript-2.snap index cf53e579..11801d26 100644 --- a/crates/schematic/tests/snapshots/macros_test__generates_typescript-2.snap +++ b/crates/schematic/tests/snapshots/macros_test__generates_typescript-2.snap @@ -156,6 +156,8 @@ export type Comments = { normal: boolean, }; +export type UnnamedMultiple = [string, number | null, boolean]; + export type PartialDefaultValues = { array?: number[] | null, arrayOpt?: number[] | null, diff --git a/crates/schematic/tests/snapshots/macros_test__generates_typescript.snap b/crates/schematic/tests/snapshots/macros_test__generates_typescript.snap index 68284fd2..f257605f 100644 --- a/crates/schematic/tests/snapshots/macros_test__generates_typescript.snap +++ b/crates/schematic/tests/snapshots/macros_test__generates_typescript.snap @@ -139,6 +139,8 @@ export interface Comments { normal: boolean; } +export type UnnamedMultiple = [string, number | null, boolean]; + export interface PartialDefaultValues { array?: number[] | null; arrayOpt?: number[] | null;