Download the PHP package algirdasc/laravel-openapi-tools without Composer

On this page you can find all versions of the php package algirdasc/laravel-openapi-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-openapi-tools

Laravel OpenAPI toolkit

This toolkit provides rules for PHPStan and utilities for working with OpenAPI specifications in Laravel framework.

It should help you maintain documentation of your codebase more easily and lower data duplication as much as possible.

Toolkit uses PHPStan to statically check code for errors, leading to Swagger/OpenAPI specification errors.

!! Only OpenApi attributes with named arguments is supported and checked !!

Requirements

Installation

Install the package via composer:

Add rules to phpstan.neon config:

Run phpstan to analyze your project:

Helper classes

Toolkit includes helper class to ease and minimize duplication while defining API documentation in Laravel framework. Usage of them is completely optional, although is recomended.

Rules

Quick overview of rules provided in toolkit and their functions. List of incomplete and suspect for changes.

Schemas - OA\Schema

Operation - OA\Get, OA\Post,OA\Put,OA\Patch,OA\Delete

Form Request - Illuminate\Foundation\Http\FormRequest

Json Resource - Illuminate\Http\Resources\Json\JsonResource

Customizations

Ignoring rules

You can ignore a specific rule one time, all you need to do is to add a doc comment where this error happens. Example how to ignore openApiTools.missingRequestSchemaAttribute in a specific file:

If you want to ignore rules to specific files or file pattern, add ignoreErrors to your phpstan.neon. Example, how to ignore openApiTools.missingRequestSchemaAttribute errors:

More on error ignoring - PHPStan documentation

Schema naming rule override

By default, schema names should be named by namespaces separated by dot, for example Laravel resource App\Http\Resources\SomeController\SomeResource should be named Resources.SomeController.SomeResource, but if you want to change to your customized rule, you can do so by specifying class, implementing SchemaNameGeneratorInterface in your phpstan.neon. For example:

Property naming rule override

By default, property names should be named using snake_case naming convention, but if you want to change to camelCase or your customized rule, you can do so by specifying class, implementing PropertyNameGeneratorInterface in your phpstan.neon. For example:


All versions of laravel-openapi-tools with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
phpstan/phpstan Version ^2.1
zircote/swagger-php Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package algirdasc/laravel-openapi-tools contains the following files

Loading the files please wait ...