You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have setup my models with getResourcKey() for both models:
NelitiVolume.php
. . .
public function getResourceKey(): string {
return 'neliti-volumes';
}
. . .
NelitiPublication.php
. . .
public function getResourceKey(): string {
return 'neliti-publications';
}
. . .
When I try to get the result from the url using /neliti-volumes?include=neliti-publication, I get the type is using camel-case; not using the kebab-case that I already defined in the models:
{
"data": [
{
"type": "neliti-volumes",
"id": "088f4670-8993-4ffc-86e4-58036442cebe",
"attributes": {
"volume": "BB",
"number": "3",
},
"relationships": {
"neliti-publication": { // this one is from the url that mapped with the transformers
"data": {
"type": "nelitiPublication", // this one should be neliti-publications that get from getResourceKey()
"id": "39676c75-6e03-11ea-9660-ed7fb61131c5"
}
}
}
},
. . .
]
}
Btw, I am using JSON API Serializer from PHP League...
Did I miss something?
The text was updated successfully, but these errors were encountered:
Hi @flugg ,
I have setup my models with getResourcKey() for both models:
NelitiVolume.php
NelitiPublication.php
When I try to get the result from the url using
/neliti-volumes?include=neliti-publication
, I get thetype
is using camel-case; not using the kebab-case that I already defined in the models:Btw, I am using JSON API Serializer from PHP League...
Did I miss something?
The text was updated successfully, but these errors were encountered: