You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XCTAssertThrowsError(try testDecoder.decode(OpenAPI.Document.self, from: documentYML)){ error in
35
+
36
+
letopenAPIError=OpenAPI.Error(from: error)
37
+
38
+
XCTAssertEqual(openAPIError.localizedDescription,"Found neither a $ref nor a JSONSchema in .content['application/json'].schema for the status code '200' response of the **GET** endpoint under `/hello/world`. \n\nJSONSchema could not be decoded because:\nInconsistency encountered when parsing `maximum`: Expected an Integer literal but found a floating point value (1.234)..")
Copy file name to clipboardexpand all lines: Tests/OpenAPIKit30Tests/Schema Object/SchemaObjectYamsTests.swift
+2-2
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ final class SchemaObjectYamsTests: XCTestCase {
40
40
"""
41
41
42
42
XCTAssertThrowsError(tryYAMLDecoder().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).")
44
44
}
45
45
46
46
letintegerString2=
@@ -50,7 +50,7 @@ final class SchemaObjectYamsTests: XCTestCase {
50
50
"""
51
51
52
52
XCTAssertThrowsError(tryYAMLDecoder().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).")
0 commit comments