forked from loafle/openapi-generator-original
* [Slim] Add Basic Authentication Middleware User needs to add own implementation to verifyCredentials method in AuthBasic.php. * [Slim] Update README template I'm not sure about `middlewareSrcPath` variable. I'll fix it in following PRs if path is broken. Hope that notice in README catches attention and most of users will read it. * Revert "[Slim] Update README template" This reverts commit 204ee02fd853feb3cc19db5658348c7fee6ca3f5. * Revert "[Slim] Add Basic Authentication Middleware" This reverts commit 6a8e03079a70213797896e660b7e7fa1894da0a6. * [Slim] Add "tuupola/slim-basic-auth" package Package "tuupola/slim-basic-auth" 3.1.0 requires PHP 7, that's why I set it's version to ^3.0.0 in Composer. Minimum version will be 3.0.0-rc.1 which supports PHP 5.5. I've tested build with PHP 7, it would be nice to check build with PHP 5.5 someday. * [Slim] Update README template Not sure about forward slash in path to SlimRouter class. I will fix it in upcoming PRs if necessary. * [Slim] Refresh samples
59 lines
1.7 KiB
PHP
59 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* FakeApi
|
|
*
|
|
* PHP version 5
|
|
*
|
|
* @category Class
|
|
* @package OpenAPIServer\Api
|
|
* @author OpenAPI Generator team
|
|
* @link https://github.com/openapitools/openapi-generator
|
|
*/
|
|
|
|
/**
|
|
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
|
*
|
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
|
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
|
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
|
*/
|
|
|
|
/**
|
|
* NOTE: This class is auto generated by the openapi generator program.
|
|
* https://github.com/openapitools/openapi-generator
|
|
* Do not edit the class manually.
|
|
*/
|
|
namespace OpenAPIServer\Api;
|
|
|
|
use OpenAPIServer\AbstractApiController;
|
|
|
|
/**
|
|
* FakeApi Class Doc Comment
|
|
*
|
|
* PHP version 5
|
|
*
|
|
* @category Class
|
|
* @package OpenAPIServer\Api
|
|
* @author OpenAPI Generator team
|
|
* @link https://github.com/openapitools/openapi-generator
|
|
*/
|
|
class FakeApi extends AbstractApiController {
|
|
|
|
/**
|
|
* PUT testCodeInjectEndRnNR
|
|
* Summary: To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
|
* Notes:
|
|
*
|
|
* @param \Psr\Http\Message\ServerRequestInterface $request Request
|
|
* @param \Psr\Http\Message\ResponseInterface $response Response
|
|
* @param array|null $args Path arguments
|
|
*/
|
|
public function testCodeInjectEndRnNR($request, $response, $args) {
|
|
$body = $request->getParsedBody();
|
|
$response->write('How about implementing testCodeInjectEndRnNR as a PUT method ?');
|
|
return $response;
|
|
}
|
|
|
|
}
|