Download the PHP package waffler/waffler-laravel without Composer
On this page you can find all versions of the php package waffler/waffler-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download waffler/waffler-laravel
More information about waffler/waffler-laravel
Files in waffler/waffler-laravel
Package waffler-laravel
Short Description Laravel wrapper for waffler/waffler
License MIT
Informations about the package waffler-laravel
Waffler for Laravel
This package is a fancy wrapper for the Laravel Framework. You must know the basics of the waffler/waffler and guzzlehttp/guzzle packages.
Installation
How to configure:
This package exposes a waffler.php
config file to register your
client interfaces into the application service container.
The clients
array:
Register your clients in the service container.
The aliases
array:
Give an alias to your clients.
The global_options
array:
An array of guzzle http options to be used in all client instances.
The singletons
array:
An array of clients to be registered as singletons.
The auto_generated_clients
array:
An array of auto generated classes. Do not modify it, the contents of this array is auto-generated when you run
the waffler:generate-code
command.
The code_generation
option:
This package also can generate the client interfaces if you have a swagger or another open-api spec file.
The code_generation.namespace
option:
The base namespace where all interfaces will be generated.
This namespace will be auto converted to a path relative to the app/
folder.
The code_generation.openapi_files
array:
Path to openapi files to generate the code. You can specify just the path to the openapi file, or provide an array of generation options. See example 1 and example 2 below.
The code_generation.openapi_files.*.namespace
option:
The generated clients will be put inside code_generation.namespace
plus this option value.
The code_generation.openapi_files.*.spec_type
option:
Indicates the specification file schema type. It can be either openapi
or swagger
.
The default value is openapi
The code_generation.openapi_files.*.namespace_options
option:
The generated clients under the configured namespace will share this guzzle configurations.
This can be useful, for instance, when clients share the same options, like base_uri
.
The code_generation.openapi_files.*.ignore
option:
This option still under development, but here you can ignore the generation of some method parameters. In the future, this will allow more configuration.
In the example below, a HeaderParam
with the name of Authorization
will not be included in
the generated method parameters.
Example code:
Before ignoring:
After ignoring:
Ignorable parameter types are:
- header
- path
- query
- body
- formData
The code_generation.openapi_files.*.auto_bind
option:
Automatic register the generated interfaces in the service container.
Default value is true
.
Contributions:
Work in progress.
All versions of waffler-laravel with dependencies
waffler/waffler Version ^1.0.0
illuminate/support Version ^6.0 || ^7.0 || ^8.0 || ^9.0
waffler/opengen Version ^0.7.4