This repository has been archived by the owner on Feb 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 89
Error on generate api #72
Labels
Comments
Hey @m33ch, Unfortunately, you are missing something in the |
Hi @pksunkara, thank you for your reply. This is my api.json { "base":"http://local.dev", "version":"1", "authorization":{ "need_auth":true, "header":true }, "request":{ "formats":{ "default":"json", "form":false, "json":true } }, "response":{ "formats":{ "default":"json", "json":true }, "suffix":true }, "error":{ "message":"error" }, "classes":[ { "name":"discounts", "args":[ "id" ], "functions":[ { "name":"index", "method":"get", "path":"/discounts" }, { "name":"show", "method":"get", "path":"/discounts/:id" }, { "name":"store", "path":"/discounts/", "method":"post", "params":[ { "name":"name", "required":true }, { "name":"value" }, { "name":"value_type" }, { "name":"status" } ] }, { "name":"update", "path":"/discounts/:id", "method":"post", "params":[ { "name":"name", "required":true }, { "name":"value" }, { "name":"value_type" }, { "name":"status" } ] }, { "name":"destroy", "method":"delete", "path":"/discounts/:id" } ] } ] } And this is doc.json { "discounts":{ "title":"Discount", "desc":"Returns discount api instance", "args":{ "id":{ "desc":"Id of discount", "value":"1" } }, "functions" : { "index":{ "title":"Get user discounts", "desc":"Retrieve created user discounts" }, "store":{ "title":"Create new discount", "desc":"Create new discount", "params":{ "name":{ "desc":"Name on discount", "value":"Sold Out 50%!" }, "value":{ "desc":"Value of discount", "value":"20" }, "value_type":{ "desc":"Type of discount : absolute or percentage", "value":"absolute" }, "status":{ "desc":"Active discount? (enabled, disabled)", "value":"disabled" } } }, "show":{ "title":"Get a user discount", "desc":"Retrieve one discount" }, "destroy":{ "title":"Delete a user discount", "desc":"Delete one discount" } } } } That json files are created based on your example. Thank you very much! |
Also having this same issue with both of the examples provided in this repo.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
thank you for this package.
I got an error when i try to generate a php api. This is error
Thank you
The text was updated successfully, but these errors were encountered: