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
In general, it is not clear what parts of jsonapi standard is covered by the extension and what is left for the implementor or maybe will be included in future updates of the extension.
There are two areas in specific that are not covered by the readme:
resources and sub-resources
For example, the readme says nothing that it uses eaxtraFields() in the parent model to allow the use of ?include=child. I had to extract it from the sources.
i.e in Countries.php
public function extraFields()
{
return ['cities']
}
public function getCities()
{
return $this->hasMany(Cities::className(), ['country_id' => 'id']);
}
and in Cities.php
public function getLinks()
{
return [
Url::home(true) . 'v1/cities/' . $this->id,
];
}
to be able to use something like v1/countries/10?include=cities
Relationships
It is not clear how they work and how to use them. What is covered? just serializing the output? or more than that since the source have UpdateRelationshipAction.php?
In short, some more info with usage examples would be much welcomed
The text was updated successfully, but these errors were encountered:
Almost everything from jsonapi standard is covered in this extension, except for filtering and sorting. Mostly because JSON API is agnostic about the strategies supported by a server. It only requires using the filter, sort query parameters for filtering/sorting operations.
But despite that, I am currently working on those 2 parts, in order to provide support of some basic operations.
I was thinking about forking ember's rental store and make Yii2 API as BE.
unfortunately I don't have any time in hand currently. But someone can pick that and make it a reality. It will serve as good example
Almost everything from jsonapi standard is covered in this extension, except for filtering and sorting. Mostly because JSON API is agnostic about the strategies supported by a server. It only requires using the filter, sort query parameters for filtering/sorting operations.
But despite that, I am currently working on those 2 parts, in order to provide support of some basic operations.
Great, waiting for it. It's much better to have it as part of the extension rather than individual implementations in several places.
In general, it is not clear what parts of jsonapi standard is covered by the extension and what is left for the implementor or maybe will be included in future updates of the extension.
There are two areas in specific that are not covered by the readme:
For example, the readme says nothing that it uses eaxtraFields() in the parent model to allow the use of
?include=child
. I had to extract it from the sources.i.e in Countries.php
and in Cities.php
to be able to use something like
v1/countries/10?include=cities
It is not clear how they work and how to use them. What is covered? just serializing the output? or more than that since the source have
UpdateRelationshipAction.php
?In short, some more info with usage examples would be much welcomed
The text was updated successfully, but these errors were encountered: