-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Nested Resource foreign key parsed as string #925
Comments
b4dnewz
pushed a commit
to codekraft-studio/json-server
that referenced
this issue
Mar 9, 2019
Threat the request param as integer closes typicode#925, closes typicode#396
b4dnewz
pushed a commit
to codekraft-studio/json-server
that referenced
this issue
Mar 19, 2019
Threat the request param as integer closes typicode#925, closes typicode#396
Can this one be merged? We suffer from the same problem! |
Same here. It's kind of a blocker when you are trying to mock POST methods. |
Hoping this could get merged as well! |
Would be great if we could get this merged. |
Any update on this? |
No....
Le dim. 21 nov. 2021 à 12:03 PM, Alessandro Mancini <
***@***.***> a écrit :
… Any update on this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#925 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATW2M4WFJWDNJVMZFSJ67SDUNDGYJANCNFSM4G3IWOCA>
.
|
any update with this? |
@typicode three years are passed and this issue is still not fixed :( . Can you merg this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When doing a
POST
request to create a new nested resource, its foreign key is parsed as string, as opposed to integer. This causes the parent to not recognize its child resource.For example
would yield a response
So, when doing a GET request
GET /posts/1?_embed=images
, the response is as followsEssentially, the post doesn’t recognize the image attached to it, because the foreign key is parsed as string.
Manually changing the foreign key into integer data type will work.
Any suggestion? Is this how it’s supposed to work?
The text was updated successfully, but these errors were encountered: