phenotips / remote-matching

Patient matching across applications
2 stars 2 forks source link

Check parsing of the genetic section of incoming request JSONs #34

Closed allasm closed 9 years ago

allasm commented 9 years ago

According to @buske:


the "genes" property is allowed to be a string, rather than enforcing it as an object. E.g., the following is currently tolerated: { "gene": "SRCAP" }

while the following is currently required by the v1.0 spec: { "gene": {"id": "SRCAP"} }

This caused confusion while trying to test a request against another service. It validated against localhost, but caused errors against the other service.

allasm commented 9 years ago

Before the fix misformatted genes were just dropped and an error was printed to the log. Now an error should be returned to the requestor.