Commit 1f76b641 authored by acud's avatar acud Committed by GitHub

lint openapi spec (#1209)

parent 1dc35eab
...@@ -3,46 +3,45 @@ openapi: 3.0.3 ...@@ -3,46 +3,45 @@ openapi: 3.0.3
info: info:
version: 0.5.0 version: 0.5.0
title: Swarm API title: Swarm API
description: 'A list of the currently provided Interfaces to interact with the swarm, implementing file operations and sending messages' description: "A list of the currently provided Interfaces to interact with the swarm, implementing file operations and sending messages"
security: security:
- {} - {}
externalDocs: externalDocs:
description: Browse the documentation @ the Swarm Docs description: Browse the documentation @ the Swarm Docs
url: 'https://docs.swarm.eth' url: "https://docs.swarm.eth"
servers: servers:
- url: "http://{apiRoot}:{port}/v1"
- url: 'http://{apiRoot}:{port}/v1'
variables: variables:
apiRoot: apiRoot:
default: 'localhost' default: "localhost"
description: Base address of the local bee node main API description: Base address of the local bee node main API
port: port:
default: 1633 default: 1633
description: Service port provided in bee node config description: Service port provided in bee node config
- url: 'http://{apiRoot}:{port}' - url: "http://{apiRoot}:{port}"
variables: variables:
apiRoot: apiRoot:
default: 'localhost' default: "localhost"
description: Base address of the local bee node main API description: Base address of the local bee node main API
port: port:
default: 1633 default: 1633
description: Service port provided in bee node config description: Service port provided in bee node config
paths: paths:
'/bytes': "/bytes":
post: post:
summary: 'Upload data' summary: "Upload data"
tags: tags:
- Bytes - Bytes
parameters: parameters:
- in: header - in: header
name: swarm-tag name: swarm-tag
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Uid' $ref: "SwarmCommon.yaml#/components/schemas/Uid"
required: false required: false
description: Associate upload with an existing Tag UID description: Associate upload with an existing Tag UID
- in: header - in: header
...@@ -64,87 +63,87 @@ paths: ...@@ -64,87 +63,87 @@ paths:
type: string type: string
format: binary format: binary
responses: responses:
'200': "200":
description: Ok description: Ok
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/ReferenceResponse' $ref: "SwarmCommon.yaml#/components/schemas/ReferenceResponse"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/bytes/{reference}': "/bytes/{reference}":
get: get:
summary: 'Get referenced data' summary: "Get referenced data"
tags: tags:
- Bytes - Bytes
parameters: parameters:
- in: path - in: path
name: reference name: reference
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmReference' $ref: "SwarmCommon.yaml#/components/schemas/SwarmReference"
required: true required: true
description: Swarm address reference to content description: Swarm address reference to content
responses: responses:
'200': "200":
description: Retrieved content specified by reference description: Retrieved content specified by reference
content: content:
application/octet-stream: application/octet-stream:
schema: schema:
type: string type: string
format: binary format: binary
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/chunks/{reference}': "/chunks/{reference}":
get: get:
summary: 'Get Chunk' summary: "Get Chunk"
tags: tags:
- Chunk - Chunk
parameters: parameters:
- in: path - in: path
name: reference name: reference
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmReference' $ref: "SwarmCommon.yaml#/components/schemas/SwarmReference"
required: true required: true
description: Swarm address of chunk description: Swarm address of chunk
responses: responses:
'200': "200":
description: Retrieved chunk content description: Retrieved chunk content
content: content:
application/octet-stream: application/octet-stream:
schema: schema:
type: string type: string
format: binary format: binary
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/chunks': "/chunks":
post: post:
summary: 'Upload Chunk' summary: "Upload Chunk"
tags: tags:
- Chunk - Chunk
parameters: parameters:
- in: header - in: header
name: swarm-tag name: swarm-tag
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Uid' $ref: "SwarmCommon.yaml#/components/schemas/Uid"
required: false required: false
description: Associate upload with an existing Tag UID description: Associate upload with an existing Tag UID
- in: header - in: header
...@@ -160,35 +159,35 @@ paths: ...@@ -160,35 +159,35 @@ paths:
type: string type: string
format: binary format: binary
responses: responses:
'200': "200":
description: Ok description: Ok
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Status' $ref: "SwarmCommon.yaml#/components/schemas/Status"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/files': "/files":
post: post:
summary: 'Upload file' summary: "Upload file"
tags: tags:
- File - File
parameters: parameters:
- in: query - in: query
name: name name: name
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/FileName' $ref: "SwarmCommon.yaml#/components/schemas/FileName"
required: false required: false
description: Filename description: Filename
- in: header - in: header
name: swarm-tag name: swarm-tag
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Uid' $ref: "SwarmCommon.yaml#/components/schemas/Uid"
required: false required: false
description: Associate upload with an existing Tag UID description: Associate upload with an existing Tag UID
- in: header - in: header
...@@ -223,60 +222,60 @@ paths: ...@@ -223,60 +222,60 @@ paths:
type: string type: string
format: binary format: binary
responses: responses:
'200': "200":
description: Ok description: Ok
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/ReferenceResponse' $ref: "SwarmCommon.yaml#/components/schemas/ReferenceResponse"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/files/{reference}': "/files/{reference}":
get: get:
summary: 'Get referenced file' summary: "Get referenced file"
tags: tags:
- File - File
parameters: parameters:
- in: path - in: path
name: reference name: reference
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmReference' $ref: "SwarmCommon.yaml#/components/schemas/SwarmReference"
required: true required: true
description: Swarm address of content description: Swarm address of content
responses: responses:
'200': "200":
description: Ok description: Ok
content: content:
application/octet-stream: application/octet-stream:
schema: schema:
type: string type: string
format: binary format: binary
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/dirs': "/dirs":
post: post:
summary: 'Upload a collection' summary: "Upload a collection"
tags: tags:
- Collection - Collection
parameters: parameters:
- in: header - in: header
name: swarm-tag name: swarm-tag
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Uid' $ref: "SwarmCommon.yaml#/components/schemas/Uid"
required: false required: false
description: Associate upload with an existing Tag UID description: Associate upload with an existing Tag UID
- in: header - in: header
...@@ -312,31 +311,31 @@ paths: ...@@ -312,31 +311,31 @@ paths:
type: string type: string
format: binary format: binary
responses: responses:
'200': "200":
description: Ok description: Ok
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/ReferenceResponse' $ref: "SwarmCommon.yaml#/components/schemas/ReferenceResponse"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/bzz/{reference}': "/bzz/{reference}":
get: get:
summary: 'Get index document from a collection of files' summary: "Get index document from a collection of files"
tags: tags:
- Collection - Collection
parameters: parameters:
- in: path - in: path
name: reference name: reference
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmReference' $ref: "SwarmCommon.yaml#/components/schemas/SwarmReference"
required: true required: true
description: Swarm address of content description: Swarm address of content
- in: query - in: query
...@@ -346,7 +345,7 @@ paths: ...@@ -346,7 +345,7 @@ paths:
required: false required: false
description: Global pinning targets prefix description: Global pinning targets prefix
responses: responses:
'200': "200":
description: Ok description: Ok
content: content:
application/octet-stream: application/octet-stream:
...@@ -354,25 +353,25 @@ paths: ...@@ -354,25 +353,25 @@ paths:
type: string type: string
format: binary format: binary
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/bzz/{reference}/{path}': "/bzz/{reference}/{path}":
get: get:
summary: 'Get referenced file from a collection of files' summary: "Get referenced file from a collection of files"
tags: tags:
- Collection - Collection
parameters: parameters:
- in: path - in: path
name: reference name: reference
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmReference' $ref: "SwarmCommon.yaml#/components/schemas/SwarmReference"
required: true required: true
description: Swarm address of content description: Swarm address of content
- in: path - in: path
...@@ -388,7 +387,7 @@ paths: ...@@ -388,7 +387,7 @@ paths:
required: false required: false
description: Global pinning targets prefix description: Global pinning targets prefix
responses: responses:
'200': "200":
description: Ok description: Ok
content: content:
application/octet-stream: application/octet-stream:
...@@ -396,35 +395,35 @@ paths: ...@@ -396,35 +395,35 @@ paths:
type: string type: string
format: binary format: binary
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/tags': "/tags":
get: get:
summary: Get list of tags summary: Get list of tags
tags: tags:
- Tag - Tag
responses: responses:
'200': "200":
description: List of tags description: List of tags
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/TagsList' $ref: "SwarmCommon.yaml#/components/schemas/TagsList"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
post: post:
summary: 'Create Tag' summary: "Create Tag"
tags: tags:
- Tag - Tag
requestBody: requestBody:
...@@ -432,81 +431,81 @@ paths: ...@@ -432,81 +431,81 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/NewTagRequest' $ref: "SwarmCommon.yaml#/components/schemas/NewTagRequest"
responses: responses:
'201': "201":
description: New Tag Info description: New Tag Info
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/NewTagResponse' $ref: "SwarmCommon.yaml#/components/schemas/NewTagResponse"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/tags/{uid}': "/tags/{uid}":
get: get:
summary: 'Get Tag information using Uid' summary: "Get Tag information using Uid"
tags: tags:
- Tag - Tag
parameters: parameters:
- in: path - in: path
name: uid name: uid
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Uid' $ref: "SwarmCommon.yaml#/components/schemas/Uid"
required: true required: true
description: Uid description: Uid
responses: responses:
'200': "200":
description: Tag info description: Tag info
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/NewTagResponse' $ref: "SwarmCommon.yaml#/components/schemas/NewTagResponse"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
delete: delete:
summary: 'Delete Tag information using Uid' summary: "Delete Tag information using Uid"
tags: tags:
- Tag - Tag
parameters: parameters:
- in: path - in: path
name: uid name: uid
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Uid' $ref: "SwarmCommon.yaml#/components/schemas/Uid"
required: true required: true
description: Uid description: Uid
responses: responses:
'204': "204":
$ref: 'SwarmCommon.yaml#/components/responses/204' $ref: "SwarmCommon.yaml#/components/responses/204"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
patch: patch:
summary: 'Update Total Count and swarm hash for a tag of an input stream of unknown size using Uid' summary: "Update Total Count and swarm hash for a tag of an input stream of unknown size using Uid"
tags: tags:
- Tag - Tag
parameters: parameters:
- in: path - in: path
name: uid name: uid
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Uid' $ref: "SwarmCommon.yaml#/components/schemas/Uid"
required: true required: true
description: Uid description: Uid
requestBody: requestBody:
...@@ -515,48 +514,48 @@ paths: ...@@ -515,48 +514,48 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Address' $ref: "SwarmCommon.yaml#/components/schemas/Address"
responses: responses:
'200': "200":
description: Ok description: Ok
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Status' $ref: "SwarmCommon.yaml#/components/schemas/Status"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/pin/chunks/{address}': "/pin/chunks/{address}":
parameters: parameters:
- in: path - in: path
name: address name: address
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of chunk description: Swarm address of chunk
post: post:
summary: Pin chunk with given address summary: Pin chunk with given address
tags: tags:
- Chunk pinning - Chunk pinning
responses: responses:
'200': "200":
description: Pinning chunk with address description: Pinning chunk with address
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Response' $ref: "SwarmCommon.yaml#/components/schemas/Response"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
default: default:
description: Default response description: Default response
delete: delete:
...@@ -564,18 +563,18 @@ paths: ...@@ -564,18 +563,18 @@ paths:
tags: tags:
- Chunk pinning - Chunk pinning
responses: responses:
'200': "200":
description: Unpinning chunk with address description: Unpinning chunk with address
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Response' $ref: "SwarmCommon.yaml#/components/schemas/Response"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
default: default:
description: Default response description: Default response
get: get:
...@@ -583,16 +582,16 @@ paths: ...@@ -583,16 +582,16 @@ paths:
tags: tags:
- Chunk pinning - Chunk pinning
responses: responses:
'200': "200":
description: Pinning state of chunk with address description: Pinning state of chunk with address
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/PinningState' $ref: "SwarmCommon.yaml#/components/schemas/PinningState"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
put: put:
...@@ -600,65 +599,65 @@ paths: ...@@ -600,65 +599,65 @@ paths:
tags: tags:
- Chunk pinning - Chunk pinning
responses: responses:
'200': "200":
description: Pinning state of chunk with address description: Pinning state of chunk with address
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/PinningState' $ref: "SwarmCommon.yaml#/components/schemas/PinningState"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
default: default:
description: Default response description: Default response
'/pin/chunks': "/pin/chunks":
get: get:
summary: Get list of pinned chunks summary: Get list of pinned chunks
tags: tags:
- Chunk pinning - Chunk pinning
responses: responses:
'200': "200":
description: List of pinned chunks description: List of pinned chunks
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/BzzChunksPinned' $ref: "SwarmCommon.yaml#/components/schemas/BzzChunksPinned"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/pin/bytes/{address}': "/pin/bytes/{address}":
parameters: parameters:
- in: path - in: path
name: address name: address
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of the bytes description: Swarm address of the bytes
post: post:
summary: Pin bytes with given address summary: Pin bytes with given address
tags: tags:
- Bytes pinning - Bytes pinning
responses: responses:
'200': "200":
description: Pinning bytes chunks with address description: Pinning bytes chunks with address
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Response' $ref: "SwarmCommon.yaml#/components/schemas/Response"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
default: default:
description: Default response description: Default response
delete: delete:
...@@ -666,46 +665,46 @@ paths: ...@@ -666,46 +665,46 @@ paths:
tags: tags:
- Bytes pinning - Bytes pinning
responses: responses:
'200': "200":
description: Unpinning chunk with address description: Unpinning chunk with address
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Response' $ref: "SwarmCommon.yaml#/components/schemas/Response"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
default: default:
description: Default response description: Default response
'/pin/files/{address}': "/pin/files/{address}":
parameters: parameters:
- in: path - in: path
name: address name: address
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of the file description: Swarm address of the file
post: post:
summary: Pin file with given address summary: Pin file with given address
tags: tags:
- File pinning - File pinning
responses: responses:
'200': "200":
description: Pinning file chunks with address description: Pinning file chunks with address
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Response' $ref: "SwarmCommon.yaml#/components/schemas/Response"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
default: default:
description: Default response description: Default response
delete: delete:
...@@ -713,46 +712,46 @@ paths: ...@@ -713,46 +712,46 @@ paths:
tags: tags:
- File pinning - File pinning
responses: responses:
'200': "200":
description: Unpinning file chunks with address description: Unpinning file chunks with address
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Response' $ref: "SwarmCommon.yaml#/components/schemas/Response"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
default: default:
description: Default response description: Default response
'/pin/bzz/{address}': "/pin/bzz/{address}":
parameters: parameters:
- in: path - in: path
name: address name: address
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of the collection description: Swarm address of the collection
post: post:
summary: Pin collection with given address summary: Pin collection with given address
tags: tags:
- Collection pinning - Collection pinning
responses: responses:
'200': "200":
description: Pinning collection chunks (and all referenced files) with address description: Pinning collection chunks (and all referenced files) with address
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Response' $ref: "SwarmCommon.yaml#/components/schemas/Response"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
default: default:
description: Default response description: Default response
delete: delete:
...@@ -760,22 +759,22 @@ paths: ...@@ -760,22 +759,22 @@ paths:
tags: tags:
- Collection pinning - Collection pinning
responses: responses:
'200': "200":
description: Unpinning collection chunks (and all referenced files) with address description: Unpinning collection chunks (and all referenced files) with address
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Response' $ref: "SwarmCommon.yaml#/components/schemas/Response"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
default: default:
description: Default response description: Default response
'/pss/send/{topic}/{targets}': "/pss/send/{topic}/{targets}":
post: post:
summary: Send to recipient or target with Postal Service for Swarm summary: Send to recipient or target with Postal Service for Swarm
tags: tags:
...@@ -784,32 +783,32 @@ paths: ...@@ -784,32 +783,32 @@ paths:
- in: path - in: path
name: topic name: topic
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/PssTopic' $ref: "SwarmCommon.yaml#/components/schemas/PssTopic"
required: true required: true
description: Topic name description: Topic name
- in: path - in: path
name: targets name: targets
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/PssTargets' $ref: "SwarmCommon.yaml#/components/schemas/PssTargets"
required: true required: true
description: Target message address prefix. If multiple targets are specified, only one would be matched. description: Target message address prefix. If multiple targets are specified, only one would be matched.
- in: query - in: query
name: recipient name: recipient
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/PssRecipient' $ref: "SwarmCommon.yaml#/components/schemas/PssRecipient"
required: false required: false
description: Recipient publickey description: Recipient publickey
responses: responses:
'200': "200":
description: Subscribed to topic description: Subscribed to topic
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/pss/subscribe/{topic}': "/pss/subscribe/{topic}":
get: get:
summary: Subscribe for messages on the given topic. summary: Subscribe for messages on the given topic.
tags: tags:
...@@ -818,18 +817,18 @@ paths: ...@@ -818,18 +817,18 @@ paths:
- in: path - in: path
name: topic name: topic
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/PssTopic' $ref: "SwarmCommon.yaml#/components/schemas/PssTopic"
required: true required: true
description: Topic name description: Topic name
responses: responses:
'200': "200":
description: Returns a WebSocket with a subscription for incoming message data on the requested topic. description: Returns a WebSocket with a subscription for incoming message data on the requested topic.
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/soc/{owner}/{id}': "/soc/{owner}/{id}":
post: post:
summary: Upload single owner chunk summary: Upload single owner chunk
tags: tags:
...@@ -838,38 +837,38 @@ paths: ...@@ -838,38 +837,38 @@ paths:
- in: path - in: path
name: owner name: owner
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/EthereumAddress' $ref: "SwarmCommon.yaml#/components/schemas/EthereumAddress"
required: true required: true
description: Owner description: Owner
- in: path - in: path
name: id name: id
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/HexString' $ref: "SwarmCommon.yaml#/components/schemas/HexString"
required: true required: true
description: Id description: Id
- in: query - in: query
name: sig name: sig
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/HexString' $ref: "SwarmCommon.yaml#/components/schemas/HexString"
required: true required: true
description: Signature description: Signature
responses: responses:
'201': "201":
description: Created description: Created
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/ReferenceResponse' $ref: "SwarmCommon.yaml#/components/schemas/ReferenceResponse"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'401': "401":
$ref: 'SwarmCommon.yaml#/components/responses/401' $ref: "SwarmCommon.yaml#/components/responses/401"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/feeds/{owner}/{topic}': "/feeds/{owner}/{topic}":
post: post:
summary: Create an initial feed root manifest summary: Create an initial feed root manifest
tags: tags:
...@@ -878,34 +877,34 @@ paths: ...@@ -878,34 +877,34 @@ paths:
- in: path - in: path
name: owner name: owner
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/EthereumAddress' $ref: "SwarmCommon.yaml#/components/schemas/EthereumAddress"
required: true required: true
description: Owner description: Owner
- in: path - in: path
name: topic name: topic
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/HexString' $ref: "SwarmCommon.yaml#/components/schemas/HexString"
required: true required: true
description: Topic description: Topic
- in: query - in: query
name: type name: type
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/FeedType' $ref: "SwarmCommon.yaml#/components/schemas/FeedType"
required: false required: false
description: "Feed indexing scheme (default: sequence)" description: "Feed indexing scheme (default: sequence)"
responses: responses:
'201': "201":
description: Created description: Created
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/ReferenceResponse' $ref: "SwarmCommon.yaml#/components/schemas/ReferenceResponse"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'401': "401":
$ref: 'SwarmCommon.yaml#/components/responses/401' $ref: "SwarmCommon.yaml#/components/responses/401"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
get: get:
...@@ -916,19 +915,19 @@ paths: ...@@ -916,19 +915,19 @@ paths:
- in: path - in: path
name: owner name: owner
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/EthereumAddress' $ref: "SwarmCommon.yaml#/components/schemas/EthereumAddress"
required: true required: true
description: Owner description: Owner
- in: path - in: path
name: topic name: topic
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/HexString' $ref: "SwarmCommon.yaml#/components/schemas/HexString"
required: true required: true
description: Topic description: Topic
- in: query - in: query
name: index name: index
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/HexString' $ref: "SwarmCommon.yaml#/components/schemas/HexString"
required: false required: false
description: Feed update index description: Feed update index
- in: query - in: query
...@@ -940,28 +939,26 @@ paths: ...@@ -940,28 +939,26 @@ paths:
- in: query - in: query
name: type name: type
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/FeedType' $ref: "SwarmCommon.yaml#/components/schemas/FeedType"
required: false required: false
description: "Feed indexing scheme (default: sequence)" description: "Feed indexing scheme (default: sequence)"
responses: responses:
'200': "200":
description: Latest feed update description: Latest feed update
headers: headers:
'swarm-feed-index': "swarm-feed-index":
$ref: 'SwarmCommon.yaml#/components/headers/SwarmFeedIndex' $ref: "SwarmCommon.yaml#/components/headers/SwarmFeedIndex"
'swarm-feed-index-next': "swarm-feed-index-next":
$ref: 'SwarmCommon.yaml#/components/headers/SwarmFeedIndexNext' $ref: "SwarmCommon.yaml#/components/headers/SwarmFeedIndexNext"
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/ReferenceResponse' $ref: "SwarmCommon.yaml#/components/schemas/ReferenceResponse"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'401': "401":
$ref: 'SwarmCommon.yaml#/components/responses/401' $ref: "SwarmCommon.yaml#/components/responses/401"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
...@@ -7,39 +7,38 @@ info: ...@@ -7,39 +7,38 @@ info:
externalDocs: externalDocs:
description: Browse the documentation @ the Swarm Docs description: Browse the documentation @ the Swarm Docs
url: 'https://docs.swarm.eth' url: "https://docs.swarm.eth"
paths: {} paths: {}
components: components:
schemas: schemas:
Address: Address:
type: object type: object
properties: properties:
address: address:
$ref: '#/components/schemas/SwarmAddress' $ref: "#/components/schemas/SwarmAddress"
Addresses: Addresses:
type: object type: object
properties: properties:
overlay: overlay:
$ref: '#/components/schemas/SwarmAddress' $ref: "#/components/schemas/SwarmAddress"
underlay: underlay:
type: array type: array
items: items:
$ref: '#/components/schemas/P2PUnderlay' $ref: "#/components/schemas/P2PUnderlay"
ethereum: ethereum:
$ref: '#/components/schemas/EthereumAddress' $ref: "#/components/schemas/EthereumAddress"
public_key: public_key:
$ref: '#/components/schemas/PublicKey' $ref: "#/components/schemas/PublicKey"
pss_public_key: pss_public_key:
$ref: '#/components/schemas/PublicKey' $ref: "#/components/schemas/PublicKey"
Balance: Balance:
type: object type: object
properties: properties:
peer: peer:
$ref: '#/components/schemas/SwarmAddress' $ref: "#/components/schemas/SwarmAddress"
balance: balance:
type: integer type: integer
...@@ -49,7 +48,7 @@ components: ...@@ -49,7 +48,7 @@ components:
balances: balances:
type: array type: array
items: items:
$ref: '#/components/schemas/Balance' $ref: "#/components/schemas/Balance"
BzzChunksPinned: BzzChunksPinned:
type: object type: object
...@@ -68,7 +67,7 @@ components: ...@@ -68,7 +67,7 @@ components:
type: object type: object
properties: properties:
baseAddr: baseAddr:
$ref: '#/components/schemas/SwarmAddress' $ref: "#/components/schemas/SwarmAddress"
population: population:
type: integer type: integer
connected: connected:
...@@ -97,9 +96,9 @@ components: ...@@ -97,9 +96,9 @@ components:
type: object type: object
properties: properties:
beneficiary: beneficiary:
$ref: '#/components/schemas/EthereumAddress' $ref: "#/components/schemas/EthereumAddress"
chequebook: chequebook:
$ref: '#/components/schemas/EthereumAddress' $ref: "#/components/schemas/EthereumAddress"
payout: payout:
type: integer type: integer
...@@ -109,17 +108,17 @@ components: ...@@ -109,17 +108,17 @@ components:
lastcheques: lastcheques:
type: array type: array
items: items:
$ref: '#/components/schemas/ChequePeerResponse' $ref: "#/components/schemas/ChequePeerResponse"
ChequePeerResponse: ChequePeerResponse:
type: object type: object
properties: properties:
peer: peer:
$ref: '#/components/schemas/SwarmAddress' $ref: "#/components/schemas/SwarmAddress"
lastreceived: lastreceived:
$ref: '#/components/schemas/Cheque' $ref: "#/components/schemas/Cheque"
lastsent: lastsent:
$ref: '#/components/schemas/Cheque' $ref: "#/components/schemas/Cheque"
ChequebookBalance: ChequebookBalance:
type: object type: object
...@@ -133,7 +132,7 @@ components: ...@@ -133,7 +132,7 @@ components:
type: object type: object
properties: properties:
chequebookaddress: chequebookaddress:
$ref: '#/components/schemas/EthereumAddress' $ref: "#/components/schemas/EthereumAddress"
DateTime: DateTime:
type: string type: string
...@@ -148,7 +147,7 @@ components: ...@@ -148,7 +147,7 @@ components:
EthereumAddress: EthereumAddress:
type: string type: string
pattern: '^[A-Fa-f0-9]{40}$' pattern: "^[A-Fa-f0-9]{40}$"
example: "36b7efd913ca4cf880b8eeac5093fa27b0825906" example: "36b7efd913ca4cf880b8eeac5093fa27b0825906"
FileName: FileName:
...@@ -158,11 +157,11 @@ components: ...@@ -158,11 +157,11 @@ components:
type: object type: object
properties: properties:
hash: hash:
$ref: '#/components/schemas/SwarmAddress' $ref: "#/components/schemas/SwarmAddress"
HexString: HexString:
type: string type: string
pattern: '^([A-Fa-f0-9]+)$' pattern: "^([A-Fa-f0-9]+)$"
example: "cf880b8eeac5093fa27b0825906c600685" example: "cf880b8eeac5093fa27b0825906c600685"
MultiAddress: MultiAddress:
...@@ -172,15 +171,15 @@ components: ...@@ -172,15 +171,15 @@ components:
type: object type: object
properties: properties:
address: address:
$ref: '#/components/schemas/SwarmAddress' $ref: "#/components/schemas/SwarmAddress"
NewTagResponse: NewTagResponse:
type: object type: object
properties: properties:
uid: uid:
$ref: '#/components/schemas/Uid' $ref: "#/components/schemas/Uid"
startedAt: startedAt:
$ref: '#/components/schemas/DateTime' $ref: "#/components/schemas/DateTime"
total: total:
type: integer type: integer
processed: processed:
...@@ -204,11 +203,11 @@ components: ...@@ -204,11 +203,11 @@ components:
synced: synced:
type: integer type: integer
uid: uid:
$ref: '#/components/schemas/Uid' $ref: "#/components/schemas/Uid"
address: address:
$ref: '#/components/schemas/SwarmAddress' $ref: "#/components/schemas/SwarmAddress"
startedAt: startedAt:
$ref: '#/components/schemas/DateTime' $ref: "#/components/schemas/DateTime"
TagsList: TagsList:
type: object type: object
...@@ -216,7 +215,7 @@ components: ...@@ -216,7 +215,7 @@ components:
tags: tags:
type: array type: array
items: items:
$ref: '#/components/schemas/NewTagResponse' $ref: "#/components/schemas/NewTagResponse"
P2PUnderlay: P2PUnderlay:
type: string type: string
...@@ -228,13 +227,13 @@ components: ...@@ -228,13 +227,13 @@ components:
peers: peers:
type: array type: array
items: items:
$ref: '#/components/schemas/Address' $ref: "#/components/schemas/Address"
PinningState: PinningState:
type: object type: object
properties: properties:
address: address:
$ref: '#/components/schemas/SwarmAddress' $ref: "#/components/schemas/SwarmAddress"
pinCounter: pinCounter:
type: integer type: integer
...@@ -254,7 +253,7 @@ components: ...@@ -254,7 +253,7 @@ components:
type: object type: object
properties: properties:
reference: reference:
$ref: '#/components/schemas/SwarmReference' $ref: "#/components/schemas/SwarmReference"
Response: Response:
type: object type: object
...@@ -268,7 +267,7 @@ components: ...@@ -268,7 +267,7 @@ components:
type: object type: object
properties: properties:
rtt: rtt:
$ref: '#/components/schemas/Duration' $ref: "#/components/schemas/Duration"
Status: Status:
type: object type: object
...@@ -296,21 +295,21 @@ components: ...@@ -296,21 +295,21 @@ components:
settlements: settlements:
type: array type: array
items: items:
$ref: '#/components/schemas/Settlement' $ref: "#/components/schemas/Settlement"
SwarmAddress: SwarmAddress:
type: string type: string
pattern: '^[A-Fa-f0-9]{64}$' pattern: "^[A-Fa-f0-9]{64}$"
example: "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f" example: "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"
PublicKey: PublicKey:
type: string type: string
pattern: '^[A-Fa-f0-9]{66}$' pattern: "^[A-Fa-f0-9]{66}$"
example: "02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4" example: "02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4"
SwarmEncryptedReference: SwarmEncryptedReference:
type: string type: string
pattern: '^[A-Fa-f0-9]{128}$' pattern: "^[A-Fa-f0-9]{128}$"
example: "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f2d2810619d29b5dbefd5d74abce25d58b81b251baddb9c3871cf0d6967deaae2" example: "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f2d2810619d29b5dbefd5d74abce25d58b81b251baddb9c3871cf0d6967deaae2"
DomainName: DomainName:
...@@ -320,20 +319,20 @@ components: ...@@ -320,20 +319,20 @@ components:
SwarmOnlyReference: SwarmOnlyReference:
oneOf: oneOf:
- $ref: '#/components/schemas/SwarmAddress' - $ref: "#/components/schemas/SwarmAddress"
- $ref: '#/components/schemas/SwarmEncryptedReference' - $ref: "#/components/schemas/SwarmEncryptedReference"
SwarmReference: SwarmReference:
oneOf: oneOf:
- $ref: '#/components/schemas/SwarmAddress' - $ref: "#/components/schemas/SwarmAddress"
- $ref: '#/components/schemas/SwarmEncryptedReference' - $ref: "#/components/schemas/SwarmEncryptedReference"
- $ref: '#/components/schemas/DomainName' - $ref: "#/components/schemas/DomainName"
SwapCashoutResult: SwapCashoutResult:
type: object type: object
properties: properties:
recipient: recipient:
$ref: '#/components/schemas/EthereumAddress' $ref: "#/components/schemas/EthereumAddress"
lastPayout: lastPayout:
type: integer type: integer
bounced: bounced:
...@@ -343,31 +342,31 @@ components: ...@@ -343,31 +342,31 @@ components:
type: object type: object
properties: properties:
peer: peer:
$ref: '#/components/schemas/SwarmAddress' $ref: "#/components/schemas/SwarmAddress"
chequebook: chequebook:
$ref: '#/components/schemas/EthereumAddress' $ref: "#/components/schemas/EthereumAddress"
cumulativePayout: cumulativePayout:
type: integer type: integer
beneficiary: beneficiary:
$ref: '#/components/schemas/EthereumAddress' $ref: "#/components/schemas/EthereumAddress"
transactionHash: transactionHash:
$ref: '#/components/schemas/TransactionHash' $ref: "#/components/schemas/TransactionHash"
result: result:
$ref: '#/components/schemas/SwapCashoutResult' $ref: "#/components/schemas/SwapCashoutResult"
TagName: TagName:
type: string type: string
TransactionHash: TransactionHash:
type: string type: string
pattern: '^[A-Fa-f0-9]{64}$' pattern: "^[A-Fa-f0-9]{64}$"
example: "e28a34ffe7b1710c1baf97ca6d71d81b7f159a9920910876856c8d94dd7be4ae" example: "e28a34ffe7b1710c1baf97ca6d71d81b7f159a9920910876856c8d94dd7be4ae"
TransactionResponse: TransactionResponse:
type: object type: object
properties: properties:
transactionHash: transactionHash:
$ref: '#/components/schemas/TransactionHash' $ref: "#/components/schemas/TransactionHash"
Uid: Uid:
type: integer type: integer
...@@ -380,52 +379,48 @@ components: ...@@ -380,52 +379,48 @@ components:
FeedType: FeedType:
type: string type: string
pattern: '^(sequence|epoch)$' pattern: "^(sequence|epoch)$"
headers: headers:
SwarmFeedIndex: SwarmFeedIndex:
description: 'The index of the found update' description: "The index of the found update"
schema: schema:
$ref: '#/components/schemas/HexString' $ref: "#/components/schemas/HexString"
SwarmFeedIndexNext: SwarmFeedIndexNext:
description: 'The index of the next possible update' description: "The index of the next possible update"
schema: schema:
$ref: '#/components/schemas/HexString' $ref: "#/components/schemas/HexString"
responses: responses:
"204":
'204':
description: The resource was deleted successfully. description: The resource was deleted successfully.
'400': "400":
description: Bad request description: Bad request
content: content:
application/problem+json: application/problem+json:
schema: schema:
$ref: '#/components/schemas/ProblemDetails' $ref: "#/components/schemas/ProblemDetails"
'401': "401":
description: Unauthorized description: Unauthorized
content: content:
application/problem+json: application/problem+json:
schema: schema:
$ref: '#/components/schemas/ProblemDetails' $ref: "#/components/schemas/ProblemDetails"
'403': "403":
description: Forbidden description: Forbidden
content: content:
application/problem+json: application/problem+json:
schema: schema:
$ref: '#/components/schemas/ProblemDetails' $ref: "#/components/schemas/ProblemDetails"
'404': "404":
description: Not Found description: Not Found
content: content:
application/problem+json: application/problem+json:
schema: schema:
$ref: '#/components/schemas/ProblemDetails' $ref: "#/components/schemas/ProblemDetails"
'500': "500":
description: Internal Server Error description: Internal Server Error
content: content:
application/problem+json: application/problem+json:
schema: schema:
$ref: '#/components/schemas/ProblemDetails' $ref: "#/components/schemas/ProblemDetails"
...@@ -2,62 +2,61 @@ openapi: 3.0.3 ...@@ -2,62 +2,61 @@ openapi: 3.0.3
info: info:
version: 0.5.0 version: 0.5.0
title: Bee Debug API title: Bee Debug API
description: 'A list of the currently provided debug interfaces to interact with the bee node' description: "A list of the currently provided debug interfaces to interact with the bee node"
security: security:
- {} - {}
externalDocs: externalDocs:
description: Browse the documentation @ the Swarm Docs description: Browse the documentation @ the Swarm Docs
url: 'https://docs.swarm.eth' url: "https://docs.swarm.eth"
servers: servers:
- url: "http://{apiRoot}:{port}"
- url: 'http://{apiRoot}:{port}'
variables: variables:
apiRoot: apiRoot:
default: 'localhost' default: "localhost"
description: Base address of the local bee node debug API description: Base address of the local bee node debug API
port: port:
default: 1635 default: 1635
description: Service port provided in bee node config description: Service port provided in bee node config
paths: paths:
'/addresses': "/addresses":
get: get:
summary: Get overlay and underlay addresses of the node summary: Get overlay and underlay addresses of the node
tags: tags:
- Connectivity - Connectivity
responses: responses:
'200': "200":
description: Own node underlay and overlay addresses description: Own node underlay and overlay addresses
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Addresses' $ref: "SwarmCommon.yaml#/components/schemas/Addresses"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/balances': "/balances":
get: get:
summary: Get the balances with all known peers including prepaid services summary: Get the balances with all known peers including prepaid services
tags: tags:
- Balance - Balance
responses: responses:
'200': "200":
description: Own balances with all known peers description: Own balances with all known peers
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Balances' $ref: "SwarmCommon.yaml#/components/schemas/Balances"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/balances/{address}': "/balances/{address}":
get: get:
summary: Get the balances with a specific peer including prepaid services summary: Get the balances with a specific peer including prepaid services
tags: tags:
...@@ -66,58 +65,58 @@ paths: ...@@ -66,58 +65,58 @@ paths:
- in: path - in: path
name: address name: address
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of peer description: Swarm address of peer
responses: responses:
'200': "200":
description: Balance with the specific peer description: Balance with the specific peer
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Balance' $ref: "SwarmCommon.yaml#/components/schemas/Balance"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/blocklist': "/blocklist":
get: get:
summary: Get a list of blocklisted peers summary: Get a list of blocklisted peers
tags: tags:
- Connectivity - Connectivity
responses: responses:
'200': "200":
description: Returns overlay addresses of blocklisted peers description: Returns overlay addresses of blocklisted peers
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Peers' $ref: "SwarmCommon.yaml#/components/schemas/Peers"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/consumed': "/consumed":
get: get:
summary: Get the past due consumption balances with all known peers summary: Get the past due consumption balances with all known peers
tags: tags:
- Balance - Balance
responses: responses:
'200': "200":
description: Own past due consumption balances with all known peers description: Own past due consumption balances with all known peers
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Balances' $ref: "SwarmCommon.yaml#/components/schemas/Balances"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/consumed/{address}': "/consumed/{address}":
get: get:
summary: Get the past due consumption balance with a specific peer summary: Get the past due consumption balance with a specific peer
tags: tags:
...@@ -126,54 +125,54 @@ paths: ...@@ -126,54 +125,54 @@ paths:
- in: path - in: path
name: address name: address
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of peer description: Swarm address of peer
responses: responses:
'200': "200":
description: Past-due consumption balance with the specific peer description: Past-due consumption balance with the specific peer
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Balance' $ref: "SwarmCommon.yaml#/components/schemas/Balance"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/chequebook/address': "/chequebook/address":
get: get:
summary: Get the address of the chequebook contract used summary: Get the address of the chequebook contract used
tags: tags:
- Chequebook - Chequebook
responses: responses:
'200': "200":
description: Ethereum address of chequebook contract description: Ethereum address of chequebook contract
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/ChequebookAddress' $ref: "SwarmCommon.yaml#/components/schemas/ChequebookAddress"
'/chequebook/balance': "/chequebook/balance":
get: get:
summary: Get the balance of the chequebook summary: Get the balance of the chequebook
tags: tags:
- Chequebook - Chequebook
responses: responses:
'200': "200":
description: Balance of the chequebook description: Balance of the chequebook
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/ChequebookBalance' $ref: "SwarmCommon.yaml#/components/schemas/ChequebookBalance"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/chunks/{address}': "/chunks/{address}":
get: get:
summary: Check if chunk at address exists locally summary: Check if chunk at address exists locally
tags: tags:
...@@ -182,20 +181,20 @@ paths: ...@@ -182,20 +181,20 @@ paths:
- in: path - in: path
name: address name: address
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of chunk description: Swarm address of chunk
responses: responses:
'200': "200":
description: Chunk exists description: Chunk exists
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Response' $ref: "SwarmCommon.yaml#/components/schemas/Response"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
default: default:
description: Default response description: Default response
delete: delete:
...@@ -206,24 +205,24 @@ paths: ...@@ -206,24 +205,24 @@ paths:
- in: path - in: path
name: address name: address
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of chunk description: Swarm address of chunk
responses: responses:
'200': "200":
description: Chunk exists description: Chunk exists
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Response' $ref: "SwarmCommon.yaml#/components/schemas/Response"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
default: default:
description: Default response description: Default response
'/connect/{multiAddress}': "/connect/{multiAddress}":
post: post:
summary: Connect to address summary: Connect to address
tags: tags:
...@@ -233,54 +232,54 @@ paths: ...@@ -233,54 +232,54 @@ paths:
allowReserved: true allowReserved: true
name: multiAddress name: multiAddress
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/MultiAddress' $ref: "SwarmCommon.yaml#/components/schemas/MultiAddress"
required: true required: true
description: Underlay address of peer description: Underlay address of peer
responses: responses:
'200': "200":
description: Returns overlay address of connected peer description: Returns overlay address of connected peer
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Address' $ref: "SwarmCommon.yaml#/components/schemas/Address"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/health': "/health":
get: get:
summary: Get health of node summary: Get health of node
tags: tags:
- Status - Status
responses: responses:
'200': "200":
description: Health State of node description: Health State of node
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Status' $ref: "SwarmCommon.yaml#/components/schemas/Status"
default: default:
description: Default response description: Default response
'/peers': "/peers":
get: get:
summary: Get a list of peers summary: Get a list of peers
tags: tags:
- Connectivity - Connectivity
responses: responses:
'200': "200":
description: Returns overlay addresses of connected peers description: Returns overlay addresses of connected peers
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Peers' $ref: "SwarmCommon.yaml#/components/schemas/Peers"
default: default:
description: Default response description: Default response
'/peers/{address}': "/peers/{address}":
delete: delete:
summary: Remove peer summary: Remove peer
tags: tags:
...@@ -289,24 +288,24 @@ paths: ...@@ -289,24 +288,24 @@ paths:
- in: path - in: path
name: address name: address
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of peer description: Swarm address of peer
responses: responses:
'200': "200":
description: Disconnected peer description: Disconnected peer
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Response' $ref: "SwarmCommon.yaml#/components/schemas/Response"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/pingpong/{peer-id}': "/pingpong/{peer-id}":
post: post:
summary: Try connection to node summary: Try connection to node
tags: tags:
...@@ -315,41 +314,41 @@ paths: ...@@ -315,41 +314,41 @@ paths:
- in: path - in: path
name: peer-id name: peer-id
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of peer description: Swarm address of peer
responses: responses:
'200': "200":
description: Returns round trip time for given peer description: Returns round trip time for given peer
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/RttMs' $ref: "SwarmCommon.yaml#/components/schemas/RttMs"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/readiness': "/readiness":
get: get:
summary: Get readiness state of node summary: Get readiness state of node
tags: tags:
- Status - Status
responses: responses:
'200': "200":
description: Health State of node description: Health State of node
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Status' $ref: "SwarmCommon.yaml#/components/schemas/Status"
default: default:
description: Default response description: Default response
'/settlements/{address}': "/settlements/{address}":
get: get:
summary: Get amount of sent and received from settlements with a peer summary: Get amount of sent and received from settlements with a peer
tags: tags:
...@@ -358,67 +357,67 @@ paths: ...@@ -358,67 +357,67 @@ paths:
- in: path - in: path
name: address name: address
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of peer description: Swarm address of peer
responses: responses:
'200': "200":
description: Amount of sent or received from settlements with a peer description: Amount of sent or received from settlements with a peer
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Settlement' $ref: "SwarmCommon.yaml#/components/schemas/Settlement"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/settlements': "/settlements":
get: get:
summary: Get settlements with all known peers and total amount sent or received summary: Get settlements with all known peers and total amount sent or received
tags: tags:
- Settlements - Settlements
responses: responses:
'200': "200":
description: Settlements with all known peers and total amount sent or received description: Settlements with all known peers and total amount sent or received
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Settlements' $ref: "SwarmCommon.yaml#/components/schemas/Settlements"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/topology': "/topology":
get: get:
description: Get topology of known network description: Get topology of known network
tags: tags:
- Connectivity - Connectivity
responses: responses:
'200': "200":
description: Swarm topology of the bee node description: Swarm topology of the bee node
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/BzzTopology' $ref: "SwarmCommon.yaml#/components/schemas/BzzTopology"
'/welcome-message': "/welcome-message":
get: get:
summary: Get configured P2P welcome message summary: Get configured P2P welcome message
tags: tags:
- Connectivity - Connectivity
responses: responses:
'200': "200":
description: Welcome message description: Welcome message
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/WelcomeMessage' $ref: "SwarmCommon.yaml#/components/schemas/WelcomeMessage"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
post: post:
...@@ -429,44 +428,44 @@ paths: ...@@ -429,44 +428,44 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/WelcomeMessage' $ref: "SwarmCommon.yaml#/components/schemas/WelcomeMessage"
responses: responses:
'200': "200":
description: OK description: OK
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Status' $ref: "SwarmCommon.yaml#/components/schemas/Status"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/chequebook/cashout/{peer-id}': "/chequebook/cashout/{peer-id}":
get: get:
summary: Get last cashout action for the peer summary: Get last cashout action for the peer
parameters: parameters:
- in: path - in: path
name: peer-id name: peer-id
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of peer description: Swarm address of peer
tags: tags:
- Chequebook - Chequebook
responses: responses:
'200': "200":
description: Cashout status description: Cashout status
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwapCashoutStatus' $ref: "SwarmCommon.yaml#/components/schemas/SwapCashoutStatus"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
post: post:
...@@ -475,71 +474,71 @@ paths: ...@@ -475,71 +474,71 @@ paths:
- in: path - in: path
name: peer-id name: peer-id
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of peer description: Swarm address of peer
tags: tags:
- Chequebook - Chequebook
responses: responses:
'200': "200":
description: OK description: OK
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/TransactionResponse' $ref: "SwarmCommon.yaml#/components/schemas/TransactionResponse"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/chequebook/cheque/{peer-id}': "/chequebook/cheque/{peer-id}":
get: get:
summary: Get last cheques for the peer summary: Get last cheques for the peer
parameters: parameters:
- in: path - in: path
name: peer-id name: peer-id
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress' $ref: "SwarmCommon.yaml#/components/schemas/SwarmAddress"
required: true required: true
description: Swarm address of peer description: Swarm address of peer
tags: tags:
- Chequebook - Chequebook
responses: responses:
'200': "200":
description: Last cheques description: Last cheques
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/ChequePeerResponse' $ref: "SwarmCommon.yaml#/components/schemas/ChequePeerResponse"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/chequebook/cheque': "/chequebook/cheque":
get: get:
summary: Get last cheques for all peers summary: Get last cheques for all peers
tags: tags:
- Chequebook - Chequebook
responses: responses:
'200': "200":
description: Last cheques description: Last cheques
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/ChequeAllPeersResponse' $ref: "SwarmCommon.yaml#/components/schemas/ChequeAllPeersResponse"
'404': "404":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/chequebook/deposit': "/chequebook/deposit":
post: post:
summary: Deposit tokens from overlay address into chequebook summary: Deposit tokens from overlay address into chequebook
parameters: parameters:
...@@ -552,20 +551,20 @@ paths: ...@@ -552,20 +551,20 @@ paths:
tags: tags:
- Chequebook - Chequebook
responses: responses:
'200': "200":
description: Transaction hash of the deposit transaction description: Transaction hash of the deposit transaction
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/TransactionResponse' $ref: "SwarmCommon.yaml#/components/schemas/TransactionResponse"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/chequebook/withdraw': "/chequebook/withdraw":
post: post:
summary: Withdraw tokens from the chequebook to the overlay address summary: Withdraw tokens from the chequebook to the overlay address
parameters: parameters:
...@@ -578,43 +577,43 @@ paths: ...@@ -578,43 +577,43 @@ paths:
tags: tags:
- Chequebook - Chequebook
responses: responses:
'200': "200":
description: Transaction hash of the withdraw transaction description: Transaction hash of the withdraw transaction
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/TransactionResponse' $ref: "SwarmCommon.yaml#/components/schemas/TransactionResponse"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/404' $ref: "SwarmCommon.yaml#/components/responses/404"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
'/tags/{uid}': "/tags/{uid}":
get: get:
summary: 'Get Tag information using Uid' summary: "Get Tag information using Uid"
tags: tags:
- Tag - Tag
parameters: parameters:
- in: path - in: path
name: uid name: uid
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Uid' $ref: "SwarmCommon.yaml#/components/schemas/Uid"
required: true required: true
description: Uid description: Uid
responses: responses:
'200': "200":
description: Tag info description: Tag info
content: content:
application/json: application/json:
schema: schema:
$ref: 'SwarmCommon.yaml#/components/schemas/NewTagDebugResponse' $ref: "SwarmCommon.yaml#/components/schemas/NewTagDebugResponse"
'400': "400":
$ref: 'SwarmCommon.yaml#/components/responses/400' $ref: "SwarmCommon.yaml#/components/responses/400"
'403': "403":
$ref: 'SwarmCommon.yaml#/components/responses/403' $ref: "SwarmCommon.yaml#/components/responses/403"
'500': "500":
$ref: 'SwarmCommon.yaml#/components/responses/500' $ref: "SwarmCommon.yaml#/components/responses/500"
default: default:
description: Default response description: Default response
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment