Download the PHP package fillincode/swagger without Composer
On this page you can find all versions of the php package fillincode/swagger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download fillincode/swagger
More information about fillincode/swagger
Files in fillincode/swagger
Download fillincode/swagger
More information about fillincode/swagger
Files in fillincode/swagger
Vendor fillincode
Package swagger
Short Description Package for generating OpenApi documentation
License MIT
Package swagger
Short Description Package for generating OpenApi documentation
License MIT
Please rate this library. Is it a good library?
Informations about the package swagger
Swagger-parser
Installation
Публикация конфигурации
Config
OpenApi version
Block configuration with information about your Api. You can define the title, description, version, terms of use, contact details and license
Ready-made authorization schemes
Information on the server to which requests will be sent
Server authorization configuration
- It is necessary to determine whether there are requests that require authorization
- Middleware, which checks authorization
- Select the desired authorization scheme
- You need to define a function or Invokable class that will return the authorization token(s). You can return an array with a description of the token and its value or just a string token
An example of such a class
`
public function __invoke(): string|array
{
$user = User::whereEmail('[email protected]')->first();
$admin = User::whereEmail('[email protected]')->first();
return [
'user' => $user?->createToken('user-token')->accessToken,
'admin' => $admin?->createToken('admin-token')->accessToken
];
}
shell php artisan swagger:destroy shell php artisan swagger:parse shell php artisan swagger:generate
FormRequest
The attribute is needed to indicate the FormRequest class by which data will be collected to describe the parameters passed in the request
Applicable:
- Controller method
The parameter accepts:
- Class (string). Required
Example:
Property
The attribute describes the parameter that is passed in the request or returned in the response
Applicable:
- FormRequest class
- Resource class
The parameter accepts:
- Name (string). Required
- Type (string). Required
- Description (string).
- In (string|array). Available values, parameter needed only for enum type
- is_required (bool). Default true
Example:
`
[Property('age', 'integer', 'student age')]
class ProjectResource extends JsonResource
{
//
}
## Additionally
An example when a resource has an array whose keys need to be documented
All versions of swagger with dependencies
PHP Build Version
Package Version
The package fillincode/swagger contains the following files
Loading the files please wait ....