Closed valentinoli closed 2 months ago
Hi @valentinoli , Looks good. Thank you. I plan to merge the PR at this weekend
Great, thank you :)
Merged. It will be published today
@roman-right Thanks, I think you left this one out in the release notes, could you add it?
Simply check if
field.json_schema_extra
is adict
. That wayNone
is returned when it is aCallable
. It seems too complicated to supportCallable
, it would require calling the function with the schema as an argument. I would assume that function call is only done internally in Pydantic so there is not a clear way to do this and retrieve the modified schema after calling the function. So I propose not to support that for now. This means for instance that addingoriginal_field
to the JSON schema of abeanie.BackLink
field in a callable would not be supported...See #884