abivia / ledger

General Ledger and Journal Accounting Package and API for Laravel
MIT License
102 stars 23 forks source link

No "R"ead All for CRUD? #13

Closed c-myers1 closed 1 year ago

c-myers1 commented 1 year ago

I note you can only get a single item (resource) using the /get API routes. Is this deliberate?

abivia commented 1 year ago

Not explicitly. Can you give me a use case?

c-myers1 commented 1 year ago

Standard CRUD. In building an admin panel around it all, you would want to see the list of resources (accounts, currencies, etc) and then edit, delete or add another.

abivia commented 1 year ago

The accountQuery request handles accounts, but yes the functionality is missing for other resources. It's really more CRUDL with L for list. I can see cases where you want to restrict access to "list" capability, which is one reason why accountQuery is a separate route. It makes sense to add this for other resources. I'll start work on that.

Thanks for pointing this out!

abivia commented 1 year ago

Code is in, hope to wrap documentation today and release.

abivia commented 1 year ago

Never say "hope to release today". Release 1.10.0 is out with a suite of query operations and improvements in existing queries. Updated documentation is available.

c-myers1 commented 1 year ago

I didn’t notice any new stuff in the json api docs. E.g. which route returns all currencies?

abivia commented 1 year ago

Nuts. Updated the messages but not everything in the API. will fix. Generally {resource}/query will do the trick.

abivia commented 1 year ago

The navigation menu for the documentation was a manual process, and I missed updating that. Now it's automatic and all the new stuff is discoverable. There is still a problem with the codeselect JSON schema, but this has no operational impact.