-
Notifications
You must be signed in to change notification settings - Fork 109
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
include
missing from FHIRAbstractModel.dict()
#90
Comments
@RafaelWO sorry to hear about your problem. Can you please describe your usecase of using 'include'. If it is not conflict with fhir specification, we could our best try to keep this parameter. |
Understand that part. Let's see, I have an idea like this 1.) dict() method could accept any pydantic related arguments with doing no action of those extra arguments. 2.) we could do some warning log instead for those extra arguments. |
Sounds good! A warning would be very helpful indeed because it took me a while to figure out what the cause of this error was 🧐 So am I right that it is intended that the resources do not support those pydantic features, e.g. |
|
…pydnatic specific extra argument has been provided) is neutralized.
The new release v6.2.1 should solve this issue. |
@nazrulworld sorry to bother you again but I experience a ton of the new warnings in my application:
As outlined above, the reason for this is getting those is using the FHIR models as Do you think this can be "fixed" from your side? E.g. issuing the warning only once? Or do you not see this issue being within the scope for this package? For now my workaround is setting the loglevel to error for the corresponding logger:
|
I understand the problem, One thing I could do is that instead of a warning log, do debug log. But also can possible to find a way to warn one time. |
Thanks! I would prefer a one-time warning ;)
Sure, I understand that! What is the default log level? Maybe logging it as INFO is also an option? |
Hi @nazrulworld - just came across this in a new FastAPI service I'm working on, using these models as the model responses. To avoid spamming our logs I've had to disable loggers coming from |
Hey @nazrulworld is there any update on this where the warning can be made only once ? Also, I'm not using FastAPI response models. The logs can be seen just by calling |
I fully agree with your concerns. I am thinking, maybe is good if we change the log from a warning to debug level. |
Re-opening this issue: the change of log level was only applied to the |
Additional libraries
Description
I use the pydantic model from
fhir.resources
as response models in FastAPI endpoints, e.g.What I Did
After upgrading to fhir.resources version 6.2, I get the following error at this endpoint
Click for full stack trace
I guess this is related to the 6.2.0b1 release:
Relates to #89
The text was updated successfully, but these errors were encountered: