File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1
1
name = " JSONSchemaGenerator"
2
2
uuid = " b10a6b5e-eaef-4b72-b159-8e5005e98e8e"
3
3
authors = [
" matthijscox <[email protected] > and contributors" ]
4
- version = " 0.3.0 "
4
+ version = " 0.3.1 "
5
5
6
6
[deps ]
7
7
Dates = " ade2ca70-3891-5945-98fb-dc099432e06a"
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ function schema(
96
96
reference_types = reference_types,
97
97
dict_type = dict_type,
98
98
)
99
- d = _generate_json_object (schema_type, settings)
99
+ d = _generate_json_type_def (schema_type, settings)
100
100
return d
101
101
end
102
102
Original file line number Diff line number Diff line change 332
332
@test_throws Exception bad_combo_schema2 = JSONSchemaGenerator. schema (TestTypes. BadBooleanCombinationSchema2)
333
333
end
334
334
end
335
+
336
+ @testset " Vector{T} Regression Test" begin
337
+ @testset " Int" begin
338
+ int_array_schema = JSONSchemaGenerator. schema (Vector{Int})
339
+ @test int_array_schema[" type" ] == " array"
340
+ @test int_array_schema[" items" ][" type" ] == " integer"
341
+ end
342
+
343
+ @testset " Nested" begin
344
+ nested_array_schema = JSONSchemaGenerator. schema (Vector{Vector{Int}})
345
+ @test nested_array_schema[" type" ] == " array"
346
+ @test nested_array_schema[" items" ][" type" ] == " array"
347
+ @test nested_array_schema[" items" ][" items" ][" type" ] == " integer"
348
+ end
349
+ end
You can’t perform that action at this time.
0 commit comments