Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

leostereo's avatar

openapi for laravel

Hi guys: I need to implement openapi ver3 on my existing laravel ver 8 application. Could you please provide some light about existing packages? So far , I found those:

OpenAPI Initializer

vyuldashev/laravel-openapi

DarkaOnLine/L5-Swagger

could you provide some feedback from them? and .... ... would you please explain how to add new lines when posting here?

thanks!

0 likes
3 replies
automica's avatar

vyuldashev/laravel-openapi is the most recent of packages so i'd start with that.

1 like
automica's avatar

Easiest way to decide is to create a couple of new project and test install both.

Aside though, whats your intent for generating openapi spec? are you intending to get your openapi spec to follow your codebase or your codebase to follow your openapi spec?

The reason I ask, is really you should define your spec first and then develop your api to match your specification. Otherwise your spec will change frequently as you modify your code and so you could break contracts for people using your api.

For a means to test your api against the specification you should look at

https://packagist.org/packages/ensi/laravel-openapi-testing

1 like

Please or to participate in this conversation.