Skip to content

Commit

Permalink
resolve to Yams 5.1, add Yams-specific test that previously was not p…
Browse files Browse the repository at this point in the history
…ossible.
  • Loading branch information
mattpolzin committed Mar 31, 2024
1 parent 4a3d992 commit f8d2452
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/jpsim/Yams.git",
"state": {
"branch": null,
"revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa",
"version": "4.0.6"
"revision": "8a835d918245ca22f36663dd3862138805d7f707",
"version": "5.1.0"
}
}
]
Expand Down
10 changes: 10 additions & 0 deletions Tests/OpenAPIKitTests/Schema Object/SchemaObjectYamsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,14 @@ final class SchemaObjectYamsTests: XCTestCase {
XCTAssertEqual(OpenAPI.Error(from: error).localizedDescription, "Inconsistency encountered when parsing `minimum`: Expected an Integer literal but found a floating point value (1.1).")
}
}

func test_decodeNullType() throws {
let nullTypeData = """
type: 'null'
""".data(using: .utf8)!

let decoded = try orderStableDecode(JSONSchema.self, from: nullTypeData)

XCTAssertEqual(decoded, .null())
}
}

0 comments on commit f8d2452

Please sign in to comment.