-
Notifications
You must be signed in to change notification settings - Fork 123
RPC end points not being created #77
Comments
It looks like this is the Ajax call that is listing the RPC points:
And it's definitely returning empty: {"_links":{"self":{"href":"http://127.0.0.1:8080/apigility/api/module/Guru/rpc?version=1"}},"_embedded":{"rpc":[]},"total_items":0} |
I think possibly the issue is due to some 'zf-rpc' and 'zf-rest' entries not being generated in the a config file somewhere. Looking in the function ZF\Apigility\Admin\Model\ModuleModel::getServicesByModule it's trying to figure out what RPC and Rest endpoints exist by trying to match the API name to the string at position 0 for each of the entries in that bit of config - so for me it's trying to match 'Guru' and failing to find it in the entries that it is searching:
My config file is above. Comparing it to the Apigility one at https://github.com/zfcampus/zf-apigility-example/blob/master/config/module.config.php it is clear that the example one does have entries for 'zf-rest' and 'zf-rpc', but the config file generated for me doesn't have them... So it looks like they just haven't been generated correctly. |
Actually the current generated config is different - it has many more entries, but still not the zf-rest or zf-rpc ones. <?php
return array(
'controllers' => array(
'factories' => array(
'Guru\\V1\\Rpc\\Test\\Controller' => 'Guru\\V1\\Rpc\\Test\\TestControllerFactory',
'Guru\\V1\\Rpc\\Blah\\Controller' => 'Guru\\V1\\Rpc\\Blah\\BlahControllerFactory',
),
),
'zf-content-negotiation' => array(
'controllers' => array(
'Guru\\V1\\Rpc\\Test\\Controller' => 'Json',
'Guru\\V1\\Rpc\\Blah\\Controller' => 'Json',
),
'accept_whitelist' => array(
'Guru\\V1\\Rpc\\Test\\Controller' => array(
0 => 'application/vnd.guru.v1+json',
1 => 'application/json',
2 => 'application/*+json',
),
'Guru\\V1\\Rpc\\Blah\\Controller' => array(
0 => 'application/vnd.guru.v1+json',
1 => 'application/json',
2 => 'application/*+json',
),
),
'content_type_whitelist' => array(
'Guru\\V1\\Rpc\\Test\\Controller' => array(
0 => 'application/vnd.guru.v1+json',
1 => 'application/json',
),
'Guru\\V1\\Rpc\\Blah\\Controller' => array(
0 => 'application/vnd.guru.v1+json',
1 => 'application/json',
),
),
),
'router' => array(
'routes' => array(
'guru.rest.test-reset' => array(
'type' => 'Segment',
'options' => array(
'route' => '/test-reset[/:test_reset_id]',
'defaults' => array(
'controller' => 'Guru\\V1\\Rest\\TestReset\\Controller',
),
),
),
'guru.rest.test2' => array(
'type' => 'Segment',
'options' => array(
'route' => '/test2[/:test2_id]',
'defaults' => array(
'controller' => 'Guru\\V1\\Rest\\Test2\\Controller',
),
),
),
),
),
'zf-versioning' => array(
'uri' => array(
0 => 'guru.rest.test-reset',
1 => 'guru.rest.test2',
),
),
'zf-hal' => array(
'metadata_map' => array(
'Guru\\V1\\Rest\\Test2\\Test2Entity' => array(
'entity_identifier_name' => 'id',
'route_name' => 'guru.rest.test2',
'route_identifier_name' => 'test2_id',
'hydrator' => 'Zend\\Stdlib\\Hydrator\\ArraySerializable',
),
'Guru\\V1\\Rest\\Test2\\Test2Collection' => array(
'entity_identifier_name' => 'id',
'route_name' => 'guru.rest.test2',
'route_identifier_name' => 'test2_id',
'is_collection' => true,
),
),
),
); |
This repository has been closed and moved to laminas-api-tools/api-tools-skeleton; a new issue has been opened at laminas-api-tools/api-tools-skeleton#19. |
Hi,
I'm trying to create an API with an RPC end point, and it doesn't seem to be happy.
I installed from https://github.com/zfcampus/zf-apigility-skeleton/releases/download/1.0.4/zf-apigility-skeleton-1.0.4.zip
I created an api called Guru - then clicked on "RPC services" => "Create New RPC Service". I set the service name to be "Accounts" and then added the end-point "/accounts" and clicked submit.
There was no error message, but the next screen said "No RPC services defined." and clicking around the interface there are no RPC endpoints listed.
Some files have been created; below is a screenshot of them as well as the contents of one of them:
But the RPC endpoint is definitely not shown in the admin screens.
This is testing on OSX with:
I have also have the same result when downloading the master from https://github.com/zfcampus/zf-apigility-skeleton
The text was updated successfully, but these errors were encountered: