Yes, you are right in that the request body attribute ‘username’ is not following pattern defined in API schema. I can change the value to a string with the right format and the validation passes. This is good.
The problem that I see when I set the ‘username’ JSON body attribute value to reference an Environment variable “{{USER_NAME}}”. the validation fails with the same message. This issue has been reported in this post. Collection Validation errors when request contains variables
Reset Password Request Body:
{
"username": "{{USER_NAME}}",
"oldPassword": "{{PASSWORD}}",
"newPassword": "{{NEW_PASSWORD}}"
}
I click validate on the collection in the API Designer and receive this message.