Hello there,
I’m trying to add a default response to each path of the API schema but whenever I tried to update it, it doesn’t get updated, it only shows a 200 response.
but in the console it shows an updated schema.
I did like this.
const apiUpdateSchemaRequest = {
url: postman_schema_url,
method: 'PUT',
header: 'x-api-key:' + postman_api_key,
body: {
mode: 'raw',
raw: JSON.stringify(openapi)
}
};
pm.sendRequest(apiUpdateSchemaRequest, function (err, res) {
if (err) {
console.log(err);
} else {
console.log(res);
}
});
}
I don’t know where I’m making mistake.
Here is my collection link
Anyone Please help me with this.