Open fmiqbal opened 1 month ago
Having the same issue.
What's the use case for using those operations? Isn't it easier and more stable to fetch the identity and then apply a replace
operation?
I'm trying to migrate schemas with copy
and move
ops.
I need to rename some fields.
Trying to do that with Postman requests.
Without copy
and move
, I'll have to copy and paste values or write a client (migrator tool).
Preflight checklist
Ory Network Project
No response
Describe the bug
As per API docs on https://www.ory.sh/docs/kratos/reference/api#tag/identity/operation/patchIdentity, there is list of jsonpatch available op, stated as
But I can't actually do "move", "copy", or "test",
just borrowing from https://jsonpatch.com/
response
Looking at the code, the error thrown possibly from this
https://github.com/ory/kratos/blob/4f4394c1d0e2322a687520a31a25fc309f2229f3/identity/handler.go#L869-L877
and I notice that it use
ory/x/jsonx
, from which I foundhttps://github.com/ory/x/blob/52f7d778c2eea02e3e5bcf638c590c533127baa8/jsonx/patch.go#L17-L21
So at least for now I think the documentation is wrong
Reproducing the bug
From docker quickstart,
Relevant log output
No response
Relevant configuration
No response
Version
1.2.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker Compose
Additional Context
No response