Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codegen/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
smithyVersion=1.58.0
smithyVersion=1.59.0
smithyGradleVersion=1.2.0
smithyPluginVersion=0.6.0
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,11 @@ private static boolean filterProtocolTests(
return true;
}

// TODO: https://github.com/aws/aws-sdk-js-v3/issues/7169
if (testCase.getId().equals("RestJsonHttpPayloadWithStructureAndEmptyResponseBody")) {
return true;
}

return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2785,6 +2785,40 @@ it("RestJsonHttpPayloadWithStructure:Response", async () => {
});
});

/**
* Serializes a structure in the payload
*/
it.skip("RestJsonHttpPayloadWithStructureAndEmptyResponseBody:Response", async () => {
const client = new RestJsonProtocolClient({
...clientParams,
requestHandler: new ResponseDeserializationTestHandler(true, 200, undefined, ``),
});

const params: any = {};
const command = new HttpPayloadWithStructureCommand(params);

let r: any;
try {
r = await client.send(command);
} catch (err) {
fail("Expected a valid response to be returned, got " + err);
return;
}
expect(r["$metadata"].httpStatusCode).toBe(200);
const paramsToValidate: any = [
{
nested: null,
},
][0];
Object.keys(paramsToValidate).forEach((param) => {
expect(
r[param],
`The output field ${param} should have been defined in ${JSON.stringify(r, null, 2)}`
).toBeDefined();
expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true);
});
});

/**
* Serializes a union in the payload.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2785,6 +2785,40 @@ it("RestJsonHttpPayloadWithStructure:Response", async () => {
});
});

/**
* Serializes a structure in the payload
*/
it.skip("RestJsonHttpPayloadWithStructureAndEmptyResponseBody:Response", async () => {
const client = new RestJsonProtocolClient({
...clientParams,
requestHandler: new ResponseDeserializationTestHandler(true, 200, undefined, ``),
});

const params: any = {};
const command = new HttpPayloadWithStructureCommand(params);

let r: any;
try {
r = await client.send(command);
} catch (err) {
fail("Expected a valid response to be returned, got " + err);
return;
}
expect(r["$metadata"].httpStatusCode).toBe(200);
const paramsToValidate: any = [
{
nested: null,
},
][0];
Object.keys(paramsToValidate).forEach((param) => {
expect(
r[param],
`The output field ${param} should have been defined in ${JSON.stringify(r, null, 2)}`
).toBeDefined();
expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true);
});
});

/**
* Serializes a union in the payload.
*/
Expand Down
Loading
Loading