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: using-interfaces.yaml
Close
openapi: 3.0.0 info: title: 'Example of using interfaces in swagger-php' description: 'Using interfaces' contact: name: 'Swagger API Team' version: 1.0.0 servers: - url: 'https://example.localhost' description: 'API server' paths: '/products/{id}': get: tags: - api description: 'Get product in any colour for id' operationId: fef5577fd78858297fd2e4291598d8d0 parameters: - name: id in: path description: 'ID of product to return' required: true schema: type: string responses: '200': description: 'successful operation' content: application/json: schema: $ref: '#/components/schemas/Product' '/products/green/{id}': get: tags: - api description: 'Get green products' operationId: d6617b71407f39c923d01fe82bb4ed65 parameters: - name: id in: path description: 'ID of product to return' required: true schema: type: string responses: '200': description: 'successful operation' content: application/json: schema: $ref: '#/components/schemas/GreenProduct' components: schemas: GreenProduct: title: GreenProduct type: object allOf: - $ref: '#/components/schemas/Product' - properties: color: description: 'The product color.' example: blue type: object Product: title: 'Product model' type: object allOf: - $ref: '#/components/schemas/ProductInterface' - properties: id: description: 'The unique identifier of a product in our catalog.' type: integer format: int64 example: 1 type: object ProductInterface: properties: name: description: 'The product name.' example: toaster type: object tags: - name: api description: 'API operations'