forked from zircote/swagger-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
using-interfaces-merge.yaml
40 lines (40 loc) · 983 Bytes
/
using-interfaces-merge.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
openapi: 3.0.0
info:
title: 'Example of using interfaces in swagger-php'
version: 1.0.0
paths:
'/products/{id}':
get:
tags:
- Products
operationId: 'UsingInterfaces\ProductController::getProduct'
parameters:
-
name: id
in: path
description: 'ID of product to return'
required: true
schema:
type: string
responses:
default:
description: 'successful operation'
content:
application/json:
schema:
$ref: '#/components/schemas/Product'
components:
schemas:
Product:
title: 'Product model'
properties:
name:
description: 'The product name.'
example: toaster
id:
description: 'The unique identifier of a product in our catalog.'
type: integer
format: int64
example: 1
type: object
ProductInterface: { }