API tools or Mezzio For Complex API system

Hi,
I am starting on a new project which will be a complex Restful API system.
It will be using a different Json standard to Json/Hal.

I am very familiar with API tools and have used it since the Apigility days, so I am very tempted to keep using it as it provides so much ‘out of the box’, but I am concerned that as API tools has taken a specific approach to how API’s should be built, and I am going to reach a point where I would have been better off using the more flexible Mezzio.

On the other hand, Mezzio does seem very lean and flexible, and doesn’t seem to have a steep learning curve. Zend expressive was supported by the open api generator, so I am hoping Mezzio is too, which would be a major plus.

So the question is should I use API tools or is it worthwhile making the change to Mezzio?
Your opinions would be most welcome.

We switched from API-Tools to Mezzio with many of our projects due to it’s flexibility and (in my opinion) smaller footprint.
Here are some of the reason (in no particular order):

  • easier to pick up by new team members
  • configuration is a breeze
  • flexibility with URL identifiers
  • CLI support to generate new endpoint skeletons
  • Smaller footprint
  • Feels faster

The only downside we found so far is the missing versioning - we haven’t discovered a solution yet, besides running different pods.

1 Like

I recommend against using api-tools as it’s future is uncertain. If there is a new major version someday, it will likely be based on Mezzio instead of MVC, making upgrading a chore. I recommend creating your API using Mezzio instead.

This version middleware is based on the technique used in api-tools. You can pass the version in the path or in the Accept header. You can then either route on the version or use the request attribute in handlers or other middleware.

1 Like

Thanks @marcguyer and @guidofaecke for the feedback. The decision to use Mezzio is now clear thanks to your comments, and its compatibility with OpenApiTools, as this will be key to this project.

Thanks also for the versioning. I will certainly be needing that.

(Also, I really hope they they continue to maintain API-Tools. It was very important to me when learning how to build good restful APIs)