-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdreame_swagger.yaml
100 lines (97 loc) · 3.17 KB
/
dreame_swagger.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
openapi: 3.0.3
info:
title: The Dreame Pied team- OpenAPI 3.0
description: |-
This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about
Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!
You can now help us improve the API whether it's by making changes to the definition itself or to the code.
That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
_If you're looking for the Swagger 2.0/OAS 2.0 version of Petstore, then click [here](https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml). Alternatively, you can load via the `Edit > Load Petstore OAS 2.0` menu option!_
Some useful links:
- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
termsOfService: http://swagger.io/terms/
contact:
email: [email protected]
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.11
externalDocs:
description: Find out more about Swagger
url: http://swagger.io
servers:
- url: https://localhost:4000
description: Development server
tags:
- name: product
description: Everything about shop's product
externalDocs:
description: Find out more
url: http://swagger.io
- name: user
description: Operations about user
paths:
/product/getProductById:
get:
tags:
- product
summary: Select product
description: Select product by ID
operationId: getProductById
requestBody:
description: Update an existent pet in the store
content:
application/json:
schema:
$ref: '#/components/schemas/ProductById'
required: true
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: 'Product found'
result:
$ref: '#/components/schemas/SuccessProduct'
'400':
description: Invalid ID supplied
'404':
description: Pet not found
'422':
description: Validation exception
security:
- petstore_auth:
- write:pets
- read:pets
components:
schemas:
ProductById:
type: object
properties:
id:
type: integer
format: int64
example: 1
SuccessProduct:
type: object
properties:
product_id:
type: integer
format: int64
example: 1
product_name:
type: string
example: 'Dreame V11'
product_price:
type: number
format: float
example: 299.99
product_description:
type: string
example: 'Dreame V11 is a cordless vacuum cleaner'