laravel-json-api / laravel

JSON:API for Laravel applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Package development plan

lindyhopchris opened this issue · comments

Many of you may have noticed I haven't been doing a lot of work on this project recently since v3 (Laravel 10) dropped earlier this year. To explain, open source time for me is limited at the moment - I've moved to a job that doesn't use this package plus I've had a lot going on outside of work. The combination means I haven't really been keeping on top of things!

The good news is from the middle of May 2023 I will have more time available to look at the new features that need adding to this package.

I wanted to share here what my priorities are. I.e. what is in-scope for v4. My hit-list of features are as follows:

  • Update package to JSON:API v1.1
  • Support the Atomic Operations Extension - #39
  • Use SELECT statements to retrieve only the fields that are actually needed in responses - #146
  • Consume the JSON:API implementation programmatically i.e. without a HTTP request - #144
  • Add resource events - #87
  • Support async processing - #10
  • Document how to represent pivot tables as intermediary resources, and add any tooling needed to make it easier to do.
  • Make validating resource IDs in query parameters a lot easier - #237
  • Improve authorizers to support policy responses - #70
  • Support "aggregate attributes" - #194
  • Remove existing countable implementation, replace with draft extension.

It's a long list, so it's possible I might spread this over a few major releases, rather than just doing it all for v4.

It's worth noting that this is a big set of work, and will be breaking. To support Atomic Operations and allow the implementation to be consumed programmatically, I need to decouple the implementation from Laravel's form requests. This will be a big step forward, especially as Atomic Operations is one of the big features lots of us want. But it does mean there will be some refactoring when upgrading an application that uses Laravel JSON:API.

Finally I want to mention OpenAPI documentation. I know a lot of people want this. I do want to add it at some point. However, the above list provides a number of features I need in my production APIs. So for me, they are higher priority - and as the creator of this open source project, the reality is I have to prioritise my time on things that are priorities for my projects.

However, the good news is that if I clear the above list, OpenAPI documentation would most likely be the next highest priority to solve.

@lindyhopchris Just one suggestion here. pestphp is really cool tool for writing testcase. Can we use it as a defacto standard for testing?

@lindyhopchris Regarding API documentation, I think this is the most current option which was forked from my original effort https://github.com/swisnl/openapi-spec-generator.

Would it make sense to review and perhaps bring the package into the organisation so it is more official and can be pushed forward?

@glennjacobs I've not had time to look through that yet, but yeah it's likely to be a good starting point when I get to the documentation