-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.yaml
107 lines (100 loc) · 2.23 KB
/
api.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
openapi: "3.0.0"
info:
title: My calculator
version: "0.1.0"
description: My awesome calc!
paths:
"/add/{n1}/{n2}":
get:
operationId: AddGet
summary: Adds two numbers
x-cli-name: add-get
x-cli-group: ops
x-cli-aliases:
- ag
parameters:
- name: n1
required: true
in: path
description: The first number
schema:
type: integer
- name: n2
required: true
in: path
description: The second number
schema:
type: integer
post:
operationId: AddPost
summary: Adds two numbers via POST
x-cli-name: add-post
x-cli-group: ops
x-cli-aliases:
- ap
requestBody:
description: The numbers map
required: true
x-cli-name: nmap
content:
application/json:
schema:
$ref: "#/components/schemas/NumbersMap"
"/health":
get:
operationId: HealthCheck
summary: Returns Ok if all is well
x-cli-name: ping
"/meta":
get:
operationId: GetMeta
summary: Returns meta
x-cli-ignored: true
"/info":
get:
operationId: GetInfo
summary: Returns info
x-cli-group: info
parameters:
- name: p1
required: true
in: path
description: The first param
schema:
type: integer
- name: p2
required: true
in: query
description: The second param
schema:
type: string
- name: p3
required: true
in: header
description: The third param
schema:
type: number
- name: p4
required: true
in: cookie
description: The fourth param
schema:
type: boolean
requestBody:
description: The requestBody
required: true
x-cli-name: req-body
components:
schemas:
NumbersMap:
type: object
required:
- n1
- n2
properties:
n1:
type: integer
description: The first number
n2:
type: integer
description: The second number