Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Swagger Php Laravel Package

zircote/swagger-php

swagger-php generates OpenAPI 3.0/3.1/3.2 documentation from your PHP 8.2+ code using attributes (preferred) or optional Doctrine annotations. Use it via CLI or programmatically, with helpful error reporting and a full documentation site.

View on GitHub
Deep Wiki
Context7

Installation

Per project

We recommend adding swagger-php to your project using Composer

> composer require zircote/swagger-php

Globally

Alternatively, use the composer global argument to install swagger-php globally.

> composer global require zircote/swagger-php

::: warning PATH variables Remember to add the ~/.composer/vendor/bin directory to the PATH in your environment. :::

Type resolvers

swagger-php version 5.5 introduces a new type resolver used internally to determine the schema type of properties (and other elements with a schema).

By default, a custom LegacyTypeResolver is used. If you are on PHP 8.2 or higher, the TypeInfoTypeResolver can be used instead. For this the radebatz/type-info-extras package is required.

Since it is optional, it needs to be installed manually:

composer require radebatz/type-info-extras

::: warning Additional dependencies Installing radebatz/type-info-extras will also add symfony/type-info as a dependency. :::

Using doctrine annotations

As of version 4.8 the doctrine annotations library is optional and no longer installed by default.

If your code uses doctrine annotations, you will need to install that library manually:

composer require doctrine/annotations
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport