-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
116 lines (114 loc) · 2.65 KB
/
openapi.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
openapi: 3.0.1
info:
title: Mockser API
description: API for configuring mock responses
license:
name: MIT
url: https://en.wikipedia.org/wiki/MIT_License
version: 0.1.6
servers:
- url: /
paths:
/configure:
post:
summary: Configure mock response
operationId: updateConfig
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigureRequest'
responses:
'201':
description: Created
'400':
description: Bad Request
/delete:
post:
summary: Delete mock response configuration
operationId: deleteConfig
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteRequest'
responses:
'204':
description: No Content
'400':
description: Bad Request
/clear:
post:
summary: Delete all mock response configurations
operationId: clearAll
security: []
responses:
'204':
description: No Content
'400':
description: Bad Request
components:
schemas:
Request:
type: object
required:
- path
- method
- query
properties:
path:
type: string
example: "/test"
method:
type: string
example: "POST"
body:
type: string
example: "{\"result\": \"ok\"}"
query:
type: string
example: "param1=value1¶m2=value2"
headers:
type: object
additionalProperties:
type: string
example:
content-type: "application/json"
ConfigureRequest:
type: object
required:
- request
- response
properties:
name:
type: string
example: "Test request"
request:
$ref: '#/components/schemas/Request'
response:
type: object
properties:
code:
type: integer
example: 201
body:
type: string
example: "{\"name\":\"Test response\"}"
headers:
type: object
additionalProperties:
type: string
example:
content-type: "application/json"
x-custom-header: "custom-value"
DeleteRequest:
type: object
required:
- request
properties:
request:
$ref: '#/components/schemas/Request'