@@ -1320,7 +1320,7 @@ final class SchemaObjectTests: XCTestCase {
13201320 func test_withInitalAllowedValues( ) {
13211321 let null = JSONSchema . null ( . init( allowedValues: [ nil ] ) )
13221322 let boolean = JSONSchema . boolean ( . init( format: . unspecified, required: true , allowedValues: [ false ] ) )
1323- let object = JSONSchema . object ( . init( format: . unspecified, required: true , allowedValues: [ . init( [ : ] ) ] ) , . init( properties: [ : ] ) )
1323+ let object = JSONSchema . object ( . init( format: . unspecified, required: true , allowedValues: [ . init( emptyStringDict ) ] ) , . init( properties: [ : ] ) )
13241324 let array = JSONSchema . array ( . init( format: . unspecified, required: true , allowedValues: [ . init( [ false ] ) ] ) , . init( items: . boolean( . init( format: . unspecified, required: true ) ) ) )
13251325 let number = JSONSchema . number ( . init( format: . unspecified, required: true , allowedValues: [ 2.5 ] ) , . init( ) )
13261326 let integer = JSONSchema . integer ( . init( format: . unspecified, required: true , allowedValues: [ 5 ] ) , . init( ) )
@@ -1329,7 +1329,7 @@ final class SchemaObjectTests: XCTestCase {
13291329
13301330 XCTAssertEqual ( null. allowedValues ? [ 0 ] . description, " nil " )
13311331 XCTAssertEqual ( boolean. allowedValues, [ false ] )
1332- XCTAssertEqual ( object. allowedValues, [ . init( [ : ] ) ] )
1332+ XCTAssertEqual ( object. allowedValues, [ . init( emptyStringDict ) ] )
13331333 XCTAssertEqual ( array. allowedValues ? [ 0 ] . value as! [ Bool ] , [ false ] )
13341334 XCTAssertEqual ( number. allowedValues, [ 2.5 ] )
13351335 XCTAssertEqual ( integer. allowedValues, [ 5 ] )
@@ -1342,7 +1342,7 @@ final class SchemaObjectTests: XCTestCase {
13421342 let boolean = JSONSchema . boolean ( . init( format: . unspecified, required: true ) )
13431343 . with ( allowedValues: [ false ] )
13441344 let object = JSONSchema . object ( . init( format: . unspecified, required: true ) , . init( properties: [ : ] ) )
1345- . with ( allowedValues: [ . init( [ : ] ) ] )
1345+ . with ( allowedValues: [ . init( emptyStringDict ) ] )
13461346 let array = JSONSchema . array ( . init( format: . unspecified, required: true ) , . init( items: . boolean( . init( format: . unspecified, required: true ) ) ) )
13471347 . with ( allowedValues: [ . init( [ false ] ) ] )
13481348 let number = JSONSchema . number ( . init( format: . unspecified, required: true ) , . init( ) )
@@ -1384,7 +1384,7 @@ final class SchemaObjectTests: XCTestCase {
13841384 func test_withInitalDefaultValue( ) {
13851385 let null = JSONSchema . null ( . init( defaultValue: nil ) )
13861386 let boolean = JSONSchema . boolean ( . init( format: . unspecified, required: true , defaultValue: false ) )
1387- let object = JSONSchema . object ( . init( format: . unspecified, required: true , defaultValue: . init( [ : ] ) ) , . init( properties: [ : ] ) )
1387+ let object = JSONSchema . object ( . init( format: . unspecified, required: true , defaultValue: . init( emptyStringDict ) ) , . init( properties: [ : ] ) )
13881388 let array = JSONSchema . array ( . init( format: . unspecified, required: true , defaultValue: . init( [ false ] ) ) , . init( items: . boolean( . init( format: . unspecified, required: true ) ) ) )
13891389 let number = JSONSchema . number ( . init( format: . unspecified, required: true , defaultValue: 2.5 ) , . init( ) )
13901390 let integer = JSONSchema . integer ( . init( format: . unspecified, required: true , defaultValue: 5 ) , . init( ) )
@@ -1393,7 +1393,7 @@ final class SchemaObjectTests: XCTestCase {
13931393
13941394 XCTAssertNil ( null. defaultValue)
13951395 XCTAssertEqual ( boolean. defaultValue, false )
1396- XCTAssertEqual ( object. defaultValue, . init( [ : ] ) )
1396+ XCTAssertEqual ( object. defaultValue, . init( emptyStringDict ) )
13971397 XCTAssertEqual ( array. defaultValue, . init( [ false ] ) )
13981398 XCTAssertEqual ( number. defaultValue, 2.5 )
13991399 XCTAssertEqual ( integer. defaultValue, 5 )
@@ -1406,7 +1406,7 @@ final class SchemaObjectTests: XCTestCase {
14061406 let boolean = JSONSchema . boolean ( . init( format: . unspecified, required: true ) )
14071407 . with ( defaultValue: false )
14081408 let object = JSONSchema . object ( . init( format: . unspecified, required: true ) , . init( properties: [ : ] ) )
1409- . with ( defaultValue: . init( [ : ] ) )
1409+ . with ( defaultValue: . init( emptyStringDict ) )
14101410 let array = JSONSchema . array ( . init( format: . unspecified, required: true ) , . init( items: . boolean( . init( format: . unspecified, required: true ) ) ) )
14111411 . with ( defaultValue: . init( [ false ] ) )
14121412 let number = JSONSchema . number ( . init( format: . unspecified, required: true ) , . init( ) )
@@ -1447,7 +1447,7 @@ final class SchemaObjectTests: XCTestCase {
14471447 }
14481448
14491449 func test_withInitialExample( ) {
1450- let object = JSONSchema . object ( . init( format: . unspecified, required: true , examples: [ . init( [ : ] ) ] ) , . init( properties: [ : ] ) )
1450+ let object = JSONSchema . object ( . init( format: . unspecified, required: true , examples: [ . init( emptyStringDict ) ] ) , . init( properties: [ : ] ) )
14511451 let fragment = JSONSchema . fragment ( . init( examples: [ " hi " ] ) )
14521452 let null = JSONSchema . null ( . init( examples: [ " null " ] ) )
14531453
0 commit comments