-
Notifications
You must be signed in to change notification settings - Fork 6
/
openapi.yaml
122 lines (113 loc) · 2.51 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
117
118
119
120
121
122
# This code is copied from https://github.com/rootless-containers/rootlesskit/blob/master/pkg/api/openapi.yaml v0.14.6
# The code is licensed under Apache-2.0
openapi: 3.0.3
info:
title: bypass4netnsd API
version: 0.0.1
servers:
- url: 'http://bypass4netnsd/v1'
paths:
/bypass:
get:
responses:
'200':
description: An array of BypassStatus
content:
application/json:
schema:
$ref: '#/components/schemas/BypassStatuses'
post:
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BypassSpec'
responses:
'201':
description: BypassStatus
content:
application/json:
schema:
$ref: '#/components/schemas/BypassStatus'
/bypass/{id}:
delete:
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Null response
components:
schemas:
Proto:
type: string
description: "protocol for listening. Corresponds to Go's net.Listen."
enum:
- tcp
- tcp4
- tcp6
- udp
- udp4
- udp6
- sctp
- sctp4
- sctp6
BypassStatuses:
type: array
items:
$ref: '#/components/schemas/BypassStatus'
BypassStatus:
required:
- id
- pid
properties:
id:
type: string
pid:
type: integer
spec:
$ref: '#/components/schemas/BypassSpec'
BypassSpec:
required:
- id
properties:
id:
type: string
socketPath:
type: string
pidFilePath:
type: string
logFilePath:
type: string
portMapping:
type: array
items:
$ref: '#/components/schemas/PortSpec'
ignoreSubnets:
type: array
items:
type: string
PortSpec:
properties:
protos:
type: array
items:
$ref: '#/components/schemas/Proto'
parentIP:
type: string
parentPort:
type: integer
format: int32
minimum: 1
maximum: 65535
childIP:
type: string
childPort:
type: integer
format: int32
minimum: 1
maximum: 65535