Hello,
I’m current developing a Dolibarr module for my ERP subject at the high-degree.
The module is working with four objects with some relations between them. I created some examples and they work without problem. I want a rest service to work with a java interface that access to this module objects.
I’m trying to follow this post of the documentation.
In first I create with Dolibarr option “CREATE” a api file called “api_module.class.php”. And It start working a service with the object tab you where. But It doesn’t allow to create another file for the others objects keeping this.
Then I tried to change the name of this file to “api_object.class.php” like the post I shared before explains.
But when doing this after going to api rest explorer and “fetching resource list: http://localhost/dolibarr/api/index.php/explorer/swagger.json; Please wait.” It gives this error “failed to parse JSON/YAML response”.
Then I understood that only one rest service is allowed per module.
But If Dolibarr allows to create a service individual per object. The only solution I’ve in mind is to make only one file with all the services, but I think this will be too complicated. I don’t undestand why i couldn’t use more than once.
I’m using Dolibarr 10.0.0.6.
Anyone know about this?
Thanks in advance!