OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
vendor
/
zircote
/
swagger-php
/
Examples
/
using-refs
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:50 AM
rwxr-xr-x
📄
Model.php
207 bytes
08/07/2024 04:34:27 AM
rw-r--r--
📄
OpenApiSpec.php
2.65 KB
08/07/2024 04:34:27 AM
rw-r--r--
📄
Product.php
754 bytes
08/07/2024 04:34:27 AM
rw-r--r--
📄
ProductController.php
910 bytes
08/07/2024 04:34:27 AM
rw-r--r--
📄
PropertyRefController.php
481 bytes
08/07/2024 04:34:27 AM
rw-r--r--
📄
StockLevel.php
222 bytes
08/07/2024 04:34:27 AM
rw-r--r--
📄
using-refs.yaml
2.46 KB
08/07/2024 04:34:27 AM
rw-r--r--
Editing: using-refs.yaml
Close
openapi: 3.0.0 info: title: 'Example of using references in swagger-php' version: 1.0.0 paths: '/products/{product_id}': get: tags: - Products operationId: 9801cc0b0fc7a19fed854ffe6f29ae72 responses: default: $ref: '#/components/responses/product' patch: tags: - Products operationId: f66c51dd13f8079f836728c177bc5a64 requestBody: $ref: '#/components/requestBodies/product_in_body' responses: default: $ref: '#/components/responses/product' parameters: - $ref: '#/components/parameters/product_id_in_path_required' '/products/{product_id}/do-other-stuff': get: tags: - Products operationId: d358e9376f913a26873e8579fc33a043 parameters: - $ref: '#/components/schemas/Product/allOf/1/properties/id' responses: default: $ref: '#/components/responses/todo' components: schemas: Model: description: 'A model' product_status: description: 'The status of a product' type: string default: available enum: - available - discontinued Product: title: 'Product model' description: 'Product model' type: object allOf: - $ref: '#/components/schemas/Model' - properties: id: description: 'The unique identifier of a product in our catalog.' type: integer format: int64 example: 1 status: $ref: '#/components/schemas/product_status' stockLevel: $ref: '#/components/schemas/StockLevel' type: object StockLevel: type: string enum: - AVAILABLE - SOLD_OUT - BACK_ORDER responses: product: description: 'All information about a product' content: application/json: schema: $ref: '#/components/schemas/Product' todo: description: 'This API call has no documentated response (yet)' parameters: product_id_in_path_required: name: product_id in: path description: 'The ID of the product' required: true schema: type: integer format: int64 requestBodies: product_in_body: description: product_request required: true content: application/json: schema: $ref: '#/components/schemas/Product'