OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
vendor
/
zircote
/
swagger-php
/
Examples
/
using-interfaces
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:50 AM
rwxr-xr-x
📄
ColorInterface.php
273 bytes
08/07/2024 04:34:26 AM
rw-r--r--
📄
GreenProduct.php
295 bytes
08/07/2024 04:34:26 AM
rw-r--r--
📄
OpenApiSpec.php
654 bytes
08/07/2024 04:34:26 AM
rw-r--r--
📄
Product.php
445 bytes
08/07/2024 04:34:26 AM
rw-r--r--
📄
ProductController.php
1.43 KB
08/07/2024 04:34:26 AM
rw-r--r--
📄
ProductInterface.php
272 bytes
08/07/2024 04:34:26 AM
rw-r--r--
📄
using-interfaces.yaml
2.17 KB
08/07/2024 04:34:26 AM
rw-r--r--
Editing: ProductController.php
Close
<?php namespace OpenApi\Examples\UsingInterfaces; use OpenApi\Annotations as OA; class ProductController { /** * @OA\Get( * tags={"Products"}, * path="/products/{id}", * description="Get product in any colour for id", * tags={"api"}, * @OA\Parameter( * description="ID of product to return", * in="path", * name="id", * required=true, * @OA\Schema( * type="string" * ) * ), * @OA\Response( * response="200", * description="successful operation", * @OA\JsonContent(ref="#/components/schemas/Product") * ) * ) */ public function getProduct($id) { } /** * @OA\Get( * tags={"Products"}, * path="/products/green/{id}", * description="Get green products", * tags={"api"}, * @OA\Parameter( * description="ID of product to return", * in="path", * name="id", * required=true, * @OA\Schema( * type="string" * ) * ), * @OA\Response( * response="200", * description="successful operation", * @OA\JsonContent(ref="#/components/schemas/GreenProduct") * ) * ) */ public function getGreenProduct($id) { } }