-
Notifications
You must be signed in to change notification settings - Fork 4
/
swagger.json
executable file
·187 lines (187 loc) · 6.47 KB
/
swagger.json
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Polygon DID-Method Demo",
"description": "A NodeJs application to polygon demo",
"license": {
"name": "MIT"
}
},
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/create-did": {
"post": {
"tags": [
"Create polygon DID"
],
"summary": "API Endpoint for create polygon DID",
"parameters": [{
"name": "body",
"in": "body",
"description": "Create polygon DID",
"required": true,
"type": "string",
"schema": {
"properties": {
"networkType": {
"type": "string",
"example": "testnet"
}
}
}
}],
"responses": {
"201": {
"description": "New Create polygon DID"
}
}
}
},
"/register-did": {
"post": {
"tags": [
"Register polygon DID"
],
"summary": "API Endpoint for register polygon DID",
"description": "Register polygon DID",
"parameters": [{
"in": "body",
"name": "body",
"description": "Register new polygon DID",
"required": true,
"schema": {
"type": "string",
"properties": {
"did": {
"type": "string",
"example": "did:polygon:testnet:0x794b781493AeD65b9ceBD680716fec257e118993"
},
"privateKey": {
"type": "string",
"example": "0xd922b5e24ab1132f68d8c3a3e758d6814f71d5b1acffdffa6a19b8f8d55db507"
}
}
}
}],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "New register polygon DID"
}
}
}
},
"/resolve-did/{did}": {
"get": {
"tags": [
"Resolve polygon DID"
],
"summary": "API Endpoint for resolve polygon DID",
"description": "Resolve polygon DID",
"parameters": [{
"in": "path",
"name": "did",
"required": true
}],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "New resolve polygon DID"
}
}
}
},
"/update-did/{did}/{privateKey}": {
"patch": {
"tags": [
"Update polygon DID"
],
"summary": "API Endpoint for update polygon DID",
"description": "Update polygon DID",
"parameters": [{
"name": "did",
"in": "path",
"required": true
}, {
"name": "privateKey",
"in": "path",
"required": true
}, {
"in": "body",
"name": "body",
"description": "Register new polygon DID",
"required": true,
"schema": {
"type": "string",
"properties": {
"didDoc": {
"type": "object",
"example": {
"@context": "https://w3id.org/did/v1",
"id": "did:polygon:testnet:0x794b781493AeD65b9ceBD680716fec257e118993",
"verificationMethod": [{
"id": "did:polygon:testnet:0x794b781493AeD65b9ceBD680716fec257e118993",
"type": "EcdsaSecp256k1VerificationKey2019",
"controller": [
"did:polygon:testnet:0x794b781493AeD65b9ceBD680716fec257e118993",
"did:polygon:0x794b781493AeD65b9ceBD680716fec257e118993"
],
"publicKeyBase58": "7Lnm1ZnseKDkH1baAb1opREfAU4MPY7zCdUDSrWSm9NxNTQmy4neU9brFUYnEcyy7CwFKjD11ikyP9J8cf6zEaAKrEzzp"
}]
}
}
}
}
}],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "New update polygon DID"
}
}
}
},
"/delete-did/{did}/{privateKey}": {
"delete": {
"tags": [
"Delete polygon DID"
],
"summary": "API Endpoint for delete polygon DID",
"description": "Update polygon DID",
"parameters": [{
"name": "did",
"in": "path",
"required": true
}, {
"name": "privateKey",
"in": "path",
"required": true
}],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Delete polygon DID"
}
}
}
}
}
}