Closed Fitch24 closed 1 week ago
I'm not sure, but it looks like it can be pretty hard to fix. It's a part of URL, so next API route is catching it as a separate routes and is looking for handlers for foo(it's an ID for API) and bar(it's a separate route inside foo).
It's kind of agains REST API rules to have any ID's for routes with /
when it is not the last route.
Maybe you could try to rewrite your logic to use underscore or hyphen with a help of a conversion util.
Thanks for your reply.
I'm not using /
in id. I just find out it accidentally when create element with /
in id via admin UI and then got NotFound page. So I created the issue because it's unexpected and undocumented behavior.
I agree, it's hard to fix (and unnecessary). You can close this issue.
And may be, you can add a note to the cusmozible id documentation (about some symbols in id can break some REST-api operations).
Thanks both! We'll make sure this is documented for v2 and v3
Link to reproduction
No response
Describe the Bug
When custom id contains
/
symbol all id-specified operations/api/{collection-slug}/{id}
throwsNotFound
error in REST-api.To Reproduce
type
istext
id
containing/
symbol. Likefoo/bar
Find By ID
,Update By ID
orDelete by ID
operationPayload Version
2.23.1
Adapters and Plugins
db-mongodb