Skip to content

Commit

Permalink
fix(server): api specification Jigsaw-Code#1499 (Jigsaw-Code#1503)
Browse files Browse the repository at this point in the history
  • Loading branch information
murka committed Feb 12, 2024
1 parent 88cee12 commit 9779f5d
Showing 1 changed file with 25 additions and 27 deletions.
52 changes: 25 additions & 27 deletions src/shadowbox/server/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,30 @@ paths:
'1':
value: >-
{"id":"1","name":"Second","password":"xXxXxX","port":9795,"method":"chacha20-ietf-poly1305","accessUrl":"ss://ASDFHAKSDFSDAKFJ@0.0.0.0:9795/?outline=1"}
get:
description: Lists the access keys
tags:
- Access Key
responses:
'200':
description: List of access keys
content:
application/json:
schema:
type: object
properties:
accessKeys:
type: array
items:
$ref: "#/components/schemas/AccessKey"
examples:
'0':
value: >-
{"accessKeys":[
{"id":"0","name":"Admin","password":"XxXxXx","port":18162,"method":"chacha20-ietf-poly1305","accessUrl":"ss://SADFJSKADFJAKSD@0.0.0.0:18162/?outline=1"},
{"id":"1","name":"First","password":"xXxXxX","port":4410,"method":"chacha20-ietf-poly1305","accessUrl":"ss://ASDFSADJFKAS=@0.0.0.0:4410/?outline=1"},
{"id":"2","name":"SecondWithCustomDataLimit","password":"XxXxXx","port":25424,"method":"chacha20-ietf-poly1305","dataLimit":{"bytes":8589934592},"accessUrl":"ss://ASDFHAKSDFSDAKFJ@0.0.0.0:25424/?outline=1"}]}
/access-keys/{id}:
put:
description: Creates a new access key with a specific identifer
tags:
Expand All @@ -186,8 +210,6 @@ paths:
schema:
type: object
properties:
id:
type: string
name:
type: string
method:
Expand All @@ -200,7 +222,7 @@ paths:
$ref: "#/components/schemas/DataLimit"
examples:
'0':
value: '{"id":"123","method":"aes-192-gcm","name":"First","password":"8iu8V8EeoFVpwQvQeS9wiD","port": 12345,"limit":{"bytes":10000}}'
value: '{"method":"aes-192-gcm","name":"First","password":"8iu8V8EeoFVpwQvQeS9wiD","port": 12345,"limit":{"bytes":10000}}'
responses:
'201':
description: The newly created access key
Expand All @@ -212,30 +234,6 @@ paths:
'0':
value: >-
{"id":"my-identifier","name":"First","password":"XxXxXx","port":9795,"method":"chacha20-ietf-poly1305","accessUrl":"ss://SADFJSKADFJAKSD@0.0.0.0:9795/?outline=1"}
get:
description: Lists the access keys
tags:
- Access Key
responses:
'200':
description: List of access keys
content:
application/json:
schema:
type: object
properties:
accessKeys:
type: array
items:
$ref: "#/components/schemas/AccessKey"
examples:
'0':
value: >-
{"accessKeys":[
{"id":"0","name":"Admin","password":"XxXxXx","port":18162,"method":"chacha20-ietf-poly1305","accessUrl":"ss://SADFJSKADFJAKSD@0.0.0.0:18162/?outline=1"},
{"id":"1","name":"First","password":"xXxXxX","port":4410,"method":"chacha20-ietf-poly1305","accessUrl":"ss://ASDFSADJFKAS=@0.0.0.0:4410/?outline=1"},
{"id":"2","name":"SecondWithCustomDataLimit","password":"XxXxXx","port":25424,"method":"chacha20-ietf-poly1305","dataLimit":{"bytes":8589934592},"accessUrl":"ss://ASDFHAKSDFSDAKFJ@0.0.0.0:25424/?outline=1"}]}
/access-keys/{id}:
get:
description: Get an access key
tags:
Expand Down

0 comments on commit 9779f5d

Please sign in to comment.