mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-13 05:00:50 +00:00
* 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>
146 lines
3.4 KiB
PHP
146 lines
3.4 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/
|
|
*/
|
|
|
|
|
|
namespace OpenAPI\Server\Api;
|
|
|
|
|
|
interface UserApiInterface {
|
|
|
|
|
|
/**
|
|
* Operation createUser
|
|
*
|
|
* Create user
|
|
* @param \OpenAPI\Server\Model\User $user
|
|
* @return \OpenAPI\Server\Model\NoContentDefault
|
|
*/
|
|
public function createUser(
|
|
\OpenAPI\Server\Model\User $user,
|
|
):
|
|
\OpenAPI\Server\Model\NoContentDefault
|
|
;
|
|
|
|
|
|
/**
|
|
* Operation createUsersWithArrayInput
|
|
*
|
|
* Creates list of users with given input array
|
|
* @param \OpenAPI\Server\Model\User[] $user
|
|
* @return \OpenAPI\Server\Model\NoContentDefault
|
|
*/
|
|
public function createUsersWithArrayInput(
|
|
array $user,
|
|
):
|
|
\OpenAPI\Server\Model\NoContentDefault
|
|
;
|
|
|
|
|
|
/**
|
|
* Operation createUsersWithListInput
|
|
*
|
|
* Creates list of users with given input array
|
|
* @param \OpenAPI\Server\Model\User[] $user
|
|
* @return \OpenAPI\Server\Model\NoContentDefault
|
|
*/
|
|
public function createUsersWithListInput(
|
|
array $user,
|
|
):
|
|
\OpenAPI\Server\Model\NoContentDefault
|
|
;
|
|
|
|
|
|
/**
|
|
* Operation deleteUser
|
|
*
|
|
* Delete user
|
|
* @param string $username
|
|
* @return \OpenAPI\Server\Model\NoContent400 | \OpenAPI\Server\Model\NoContent404
|
|
*/
|
|
public function deleteUser(
|
|
string $username,
|
|
):
|
|
\OpenAPI\Server\Model\NoContent400 |
|
|
\OpenAPI\Server\Model\NoContent404
|
|
;
|
|
|
|
|
|
/**
|
|
* Operation getUserByName
|
|
*
|
|
* Get user by user name
|
|
* @param string $username
|
|
* @return \OpenAPI\Server\Model\User | \OpenAPI\Server\Model\NoContent400 | \OpenAPI\Server\Model\NoContent404
|
|
*/
|
|
public function getUserByName(
|
|
string $username,
|
|
):
|
|
\OpenAPI\Server\Model\User |
|
|
\OpenAPI\Server\Model\NoContent400 |
|
|
\OpenAPI\Server\Model\NoContent404
|
|
;
|
|
|
|
|
|
/**
|
|
* Operation loginUser
|
|
*
|
|
* Logs user into the system
|
|
* @param string $username
|
|
* @param string $password
|
|
* @return string | \OpenAPI\Server\Model\NoContent400
|
|
*/
|
|
public function loginUser(
|
|
string $username,
|
|
string $password,
|
|
):
|
|
string |
|
|
\OpenAPI\Server\Model\NoContent400
|
|
;
|
|
|
|
|
|
/**
|
|
* Operation logoutUser
|
|
*
|
|
* Logs out current logged in user session
|
|
* @return \OpenAPI\Server\Model\NoContentDefault
|
|
*/
|
|
public function logoutUser(
|
|
):
|
|
\OpenAPI\Server\Model\NoContentDefault
|
|
;
|
|
|
|
|
|
/**
|
|
* Operation updateUser
|
|
*
|
|
* Updated user
|
|
* @param string $username
|
|
* @param \OpenAPI\Server\Model\User $user
|
|
* @return \OpenAPI\Server\Model\NoContent400 | \OpenAPI\Server\Model\NoContent404
|
|
*/
|
|
public function updateUser(
|
|
string $username,
|
|
\OpenAPI\Server\Model\User $user,
|
|
):
|
|
\OpenAPI\Server\Model\NoContent400 |
|
|
\OpenAPI\Server\Model\NoContent404
|
|
;
|
|
|
|
}
|