diff --git a/Package.resolved b/Package.resolved index ac2140923..8ea187bda 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/jpsim/Yams.git", "state" : { - "revision" : "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa", - "version" : "4.0.6" + "revision" : "8a835d918245ca22f36663dd3862138805d7f707", + "version" : "5.1.0" } } ], diff --git a/Package.swift b/Package.swift index 8402adb61..03e1cfd05 100644 --- a/Package.swift +++ b/Package.swift @@ -21,7 +21,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), - .package(url: "https://github.com/jpsim/Yams.git", "4.0.0"..<"6.0.0") // just for tests + .package(url: "https://github.com/jpsim/Yams.git", "5.1.0"..<"6.0.0") // just for tests ], targets: [ .target( diff --git a/Tests/OpenAPIKitTests/Schema Object/SchemaObjectYamsTests.swift b/Tests/OpenAPIKitTests/Schema Object/SchemaObjectYamsTests.swift index 12c7c10cd..1d32f5d72 100644 --- a/Tests/OpenAPIKitTests/Schema Object/SchemaObjectYamsTests.swift +++ b/Tests/OpenAPIKitTests/Schema Object/SchemaObjectYamsTests.swift @@ -16,6 +16,20 @@ import OpenAPIKit import Yams final class SchemaObjectYamsTests: XCTestCase { + func test_nullTypeDecode() throws { + let nullString = + """ + type: 'null' + """ + + let null = try YAMLDecoder().decode(JSONSchema.self, from: nullString) + + XCTAssertEqual( + null, + JSONSchema.null() + ) + } + func test_floatingPointWholeNumberIntegerDecode() throws { let integerString = """