Skip to content

Commit 7d10cf8

Browse files
committed
update expectations for new better error messages
1 parent d1ba30b commit 7d10cf8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/OpenAPIKit30Tests/Schema Object/SchemaObjectYamsTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class SchemaObjectYamsTests: XCTestCase {
4040
"""
4141

4242
XCTAssertThrowsError(try YAMLDecoder().decode(JSONSchema.self, from: integerString)) { error in
43-
XCTAssertEqual(OpenAPI.Error(from: error).localizedDescription, "Inconsistency encountered when parsing `maximum`: Expected an Integer literal but found a floating point value.")
43+
XCTAssertEqual(OpenAPI.Error(from: error).localizedDescription, "Inconsistency encountered when parsing `maximum`: Expected an Integer literal but found a floating point value (10.2).")
4444
}
4545

4646
let integerString2 =
@@ -50,7 +50,7 @@ final class SchemaObjectYamsTests: XCTestCase {
5050
"""
5151

5252
XCTAssertThrowsError(try YAMLDecoder().decode(JSONSchema.self, from: integerString2)) { error in
53-
XCTAssertEqual(OpenAPI.Error(from: error).localizedDescription, "Inconsistency encountered when parsing `minimum`: Expected an Integer literal but found a floating point value.")
53+
XCTAssertEqual(OpenAPI.Error(from: error).localizedDescription, "Inconsistency encountered when parsing `minimum`: Expected an Integer literal but found a floating point value (1.1).")
5454
}
5555
}
5656
}

Tests/OpenAPIKitTests/Schema Object/SchemaObjectYamsTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class SchemaObjectYamsTests: XCTestCase {
4040
"""
4141

4242
XCTAssertThrowsError(try YAMLDecoder().decode(JSONSchema.self, from: integerString)) { error in
43-
XCTAssertEqual(OpenAPI.Error(from: error).localizedDescription, "Inconsistency encountered when parsing `maximum`: Expected an Integer literal but found a floating point value.")
43+
XCTAssertEqual(OpenAPI.Error(from: error).localizedDescription, "Inconsistency encountered when parsing `maximum`: Expected an Integer literal but found a floating point value (10.2).")
4444
}
4545

4646
let integerString2 =
@@ -50,7 +50,7 @@ final class SchemaObjectYamsTests: XCTestCase {
5050
"""
5151

5252
XCTAssertThrowsError(try YAMLDecoder().decode(JSONSchema.self, from: integerString2)) { error in
53-
XCTAssertEqual(OpenAPI.Error(from: error).localizedDescription, "Inconsistency encountered when parsing `minimum`: Expected an Integer literal but found a floating point value.")
53+
XCTAssertEqual(OpenAPI.Error(from: error).localizedDescription, "Inconsistency encountered when parsing `minimum`: Expected an Integer literal but found a floating point value (1.1).")
5454
}
5555
}
5656
}

0 commit comments

Comments
 (0)