nazrulworld / fhir.resources

FHIR Resources https://www.hl7.org/fhir/resourcelist.html
https://pypi.org/project/fhir.resources/
Other
365 stars 104 forks source link

Use warnings.warn() instead of logging the warning about the ignored extra parameters passed to json() and dict() #140

Open janwijbrand opened 11 months ago

janwijbrand commented 11 months ago

Description

When using fhir.resources in a Fastapi context, there're many many log lines warning about Fastapi passing in "extra" parameters to (amongst others) dict() that is part of the Pydantic API, but overridden in this library. I'd like to propose to use warnings.warn instead.

I realize this issue was covered in #89 and #90 before, however the proposed fix was not applied to the dict() function. Instead I'd propose the approach in https://github.com/nazrulworld/fhir.resources/pull/138