Gijs Blanken 65df3c22b9
Rewrite the PHP Laravel generator (#20526)
* remove legacy laravel generator

* initial setup of my vision for the laravel generator

* update the php laravel samples

* update php laravel docs

* moved api validation into controller and handle edge cases presented by sample generation

* updated samples

* added php-laravel to github workflow php8 and removed php7 workflow as it only contained old laravel

* preemptive work to support union types as soon as php serde supports them

* updated samples

* update templates in accordance to samples output

* fix pipelines and update samples

* correct serde version

* fixed phpunit execution and updated samples

* added named routes

* remove

* readd samples

---------

Co-authored-by: gijs.blanken@futureof.finance <gijs.blanken@finly.nl>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-02-17 21:50:13 +08:00

106 lines
2.2 KiB
PHP

<?php declare(strict_types=1);
/**
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* PHP version 8.1
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI-Generator
* https://openapi-generator.tech
* Do not edit the class manually.
*
* Source files are located at:
*
* > https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/php-laravel/
*/
/**
* FormatTest
*/
namespace OpenAPI\Server\Model;
/**
* FormatTest
*/
use Crell\Serde\Renaming\Cases;
use Crell\Serde\Attributes as Serde;
#[Serde\ClassSettings(renameWith: Cases::snake_case)]
class FormatTest
{
/**
*
*
* @param int $integer
*
*
* @param int $int32
*
*
* @param int $int64
*
*
* @param float $number
*
*
* @param float $float
*
*
* @param float $double
*
*
* @param float $decimal
*
*
* @param string $string
*
*
* @param string $byte
*
*
* @param \Illuminate\Http\UploadedFile $binary
*
*
* @param \DateTime $date
*
*
* @param \DateTime $dateTime
*
*
* @param string $uuid
*
*
* @param string $password
*
* A string that is a 10 digit number. Can have leading zeros.
* @param string $patternWithDigits
*
* A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01.
* @param string $patternWithDigitsAndDelimiter
*/
public function __construct(
public int $integer,
public int $int32,
public int $int64,
public float $number,
public float $float,
public float $double,
public float $decimal,
public string $string,
public string $byte,
public \Illuminate\Http\UploadedFile $binary,
public \DateTime $date,
public \DateTime $dateTime,
public string $uuid,
public string $password,
public string $patternWithDigits,
public string $patternWithDigitsAndDelimiter,
) {}
}