How do i add Visit Attribute

Hi guys , i have added a visit attribute type.Now i am trying to add value to it but cant able to.

http://localhost:8080/openmrs/ws/rest/v1/visit/9f11c352-b1d5-4293-a01f-5c6127a8286d/attribute { “value”:“P4”, “attributeType”:“7b0f5697-27e3-40c4-8bae-f4049abfb4ed” }

This is what i get when i post the following

Are you able to reproduce it here? demo.openmrs.org

No. Let me reproduce it and will let you know .

I reproduced it on demo.openmrs

https://demo.openmrs.org/openmrs/ws/rest/v1/visit/4a8ebb7f-c533-4d23-b1f0-2925bf5bd1eb/attribute

{

"attributeType":"707e918f-64b8-456c-933e-331041d6af88",
"value":"P4"

}

ERROR: https://pastebin.com/qm4aEqUA

This is a bug in the rest webservices module. Feel free to create a ticket.

For now, as a workaround, ensure that you have a value for Max Occurs.

That’s right, if you don’t set maxOccurs on the visit attribute type it leads to a NPE, which I agree is a bug and needs to be fixed.

Thanks guys .

Sorry for the late response , i will make a ticket for that