Assertion Error

I am trying to retrieve an Order ID with its details, out of the 4 test results, the below is the 4/4 with this error of Assertion. Uploaded an image

Error as [GET]::/api/oms/pvt/orders/:orderId - Schema is valid | AssertionError: expected data to satisfy schema but found following errors: data.merchantName should be string, data.checkedInPickupPointId should be string, data.itemMetadata.Items[0].Ean should be string, data.itemMetadata.Items[1].Ean should be string, data.itemMetadata.Items[2].Ean should be string, data.itemMetadata.Items[3].RefId should be string, data.changesAttachment should be object, data.paymentData.transactions[0].payments[0].giftCardProvider should be string, data.paymentData.transactions[0].payments[0].giftCardAsDiscount should be boolean, data.paymentData.transactions[0].payments[0].accountId should be string, data.shippingData.address.number should be string, data.shippingData.address.neighborhood should be string, data.shippingData.address.complement should be string, data.shippingData.logisticsInfo[0].slas[0].pickupPointId should be string, data.shippingData.logisticsInfo[1].slas[0].pickupPointId should be string, data.shippingData.logisticsInfo[2].slas[0].pickupPointId should be string, data.shippingData.logisticsInfo[3].slas[0].pickupPointId should be string, data.shippingData.selectedAddresses[0].number should be string, data.shippingData.selectedAddresses[0].complement should be string, data.shippingData.selectedAddresses[0].neighborhood should be string, data.items[0].refId should be string

Script:

// Validate if response matches JSON schema
pm.test(“[GET]::/api/oms/pvt/orders/:orderId - Schema is valid”, function() {
pm.response.to.have.jsonSchema(schema,{unknownFormats: [“int32”, “int64”, “float”, “double”]});
});

Hey @joseph2joseph :wave:t2:

Welcome to the Postman Community :postman:

Without any further context or information, this is just a guessing game. :sweat_smile:

I can see that it relates to validating a schema but that’s it.

Can you edit your question and provide more details that help to describe the problem to someone, who is not sat in front of your screen and can see with you can see. :pray:t2:

Thank you Danny, I just edited and provided details.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.