Enables your PHP application to expose its entities as REST resources using the feature rich JSON:API specification as API. How and to whom your entities are exposed is highly customizable while minimizing boilerplate code.
MIT License
2
stars
1
forks
source link
Automatically register resource types for sparse fieldset validation #166
Currently when registering resource types as readable/updatable/… in the Manager it is also necessary to register resource types that are not directly accessible but can still be used for filtering/sorting/includes/….
This is because to validate a sparse fieldset request there is no information in the request how a resource type corresponding to the fieldset can be reached if it was not specifically registered (i.e. added to a dictionary) and all types would need to be traversed to find it.
However, a better approach is it to automatically traverse the relationships of directly accessible resource types when they are registered, and automatically register them for fieldset usage.
Currently when registering resource types as readable/updatable/… in the
Manager
it is also necessary to register resource types that are not directly accessible but can still be used for filtering/sorting/includes/…. This is because to validate a sparse fieldset request there is no information in the request how a resource type corresponding to the fieldset can be reached if it was not specifically registered (i.e. added to a dictionary) and all types would need to be traversed to find it.However, a better approach is it to automatically traverse the relationships of directly accessible resource types when they are registered, and automatically register them for fieldset usage.