clerk / clerk-sdk-python

52 stars 15 forks source link

private_metadata not being passed back in User #43

Closed agoddijn-fern closed 1 month ago

agoddijn-fern commented 1 month ago

I'm using the .users.get() method to get the User object but it's not returning the private_metadata. I checked the raw response and the private_metadata is in there, so I think it's a problem with the unmarshalling with pydantic...

agoddijn-fern commented 1 month ago

I managed to resolve this by setting

class PrivateMetadata(BaseModel):
    class Config:
        extra = "allow"
    pass

I'm assuming private_metadata should be allowed to be an arbitrary JSON? So I think the PrivateMetadata type should reflect that

agoddijn-fern commented 1 month ago

It looks like you're using speakeasy for that, so could be a speakeasy configuration issues

speakeasybot commented 1 month ago

Hi @agoddijn-fern thanks for the report. The API has been updated to allow for arbitrary metadata fields. Please try out https://github.com/clerk/clerk-sdk-python/tree/v1.1.0 and let us know if you run into further issues. Thanks !

speakeasybot commented 1 month ago

Closing out, but please feel free to re-open if the issue persists!