@@ -1302,45 +1302,39 @@ final class SnippetBasedReferenceTests: XCTestCase {
13021302 }
13031303
13041304 func testResponseWithExampleWithOnlyValue( ) throws {
1305- // This test currently throws because the parsing of ExampleObject is too strict:
1306- // https://github.com/mattpolzin/OpenAPIKit/issues/286.
1307- XCTAssertThrowsError (
1308- try self . assertResponsesTranslation (
1309- """
1310- responses:
1311- MyResponse:
1312- description: Some response
1313- content:
1305+ try self . assertResponsesTranslation (
1306+ """
1307+ responses:
1308+ MyResponse:
1309+ description: Some response
1310+ content:
1311+ application/json:
1312+ schema:
1313+ type: string
1314+ examples:
13141315 application/json:
1315- schema:
1316- type: string
1317- examples:
1318- application/json:
1319- summary: " a hello response "
1320- """ ,
1321- """
1322- public enum Responses {
1323- public struct MyResponse: Sendable, Equatable, Hashable {
1324- public struct Headers: Sendable, Equatable, Hashable { public init() {} }
1325- public var headers: Components.Responses.MyResponse.Headers
1326- @frozen public enum Body: Sendable, Equatable, Hashable {
1327- case json(Swift.String)
1328- }
1329- public var body: Components.Responses.MyResponse.Body
1330- public init(
1331- headers: Components.Responses.MyResponse.Headers = .init(),
1332- body: Components.Responses.MyResponse.Body
1333- ) {
1334- self.headers = headers
1335- self.body = body
1336- }
1316+ summary: " a hello response "
1317+ """ ,
1318+ """
1319+ public enum Responses {
1320+ public struct MyResponse: Sendable, Hashable {
1321+ public struct Headers: Sendable, Hashable { public init() {} }
1322+ public var headers: Components.Responses.MyResponse.Headers
1323+ @frozen public enum Body: Sendable, Hashable {
1324+ case json(Swift.String)
1325+ }
1326+ public var body: Components.Responses.MyResponse.Body
1327+ public init(
1328+ headers: Components.Responses.MyResponse.Headers = .init(),
1329+ body: Components.Responses.MyResponse.Body
1330+ ) {
1331+ self.headers = headers
1332+ self.body = body
13371333 }
13381334 }
1339- """
1340- )
1341- ) { error in
1342- XCTAssert ( error is DecodingError )
1343- }
1335+ }
1336+ """
1337+ )
13441338 }
13451339
13461340 func testRequestWithQueryItems( ) throws {
0 commit comments