-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateType OperationParam contains time #4798
Comments
I'm not sure I follow this, would you be able to provide a code snippet showing how this is happening? |
Ah, I see, so an OperationParam of type DateType where the client has incorrectly supplied a value with too much precision. To make the test you linked to pass, we would have to silently drop data which I don't believe is a safe solution. I could see us increasing strictness so that this returns HTTP 400 though.. This would probably have to be a config item though, as we do try to honour Postel's Law in the server and try to be lenient in what we accept by default. |
Hi, I think the culprit lies in the wrong parsing of the json. The parser does not call any of the DateType constructor. Instead, the value is written in the DateType object via |
This is roughly deliberate - As I say, we do try to be lenient by default with user supplied input especially when the error is something like the user providing too much precision. Obviously silently allowing this isn't ideal (I'd be much happier if we logged a warning here) but I think the current behaviour is better than silently dropping the extra precision. Certainly I think if we had configuration on the RestfulServer to enable strict validation of URL parameters this would be nice though. |
@OperationParam
of typeorg.hl7.fhir.r4.model.DateType
Expected behavior
Actual behavior
The text was updated successfully, but these errors were encountered: