Commit cd64b728 authored by metacertain's avatar metacertain Committed by GitHub

Openapi update (#998)

* add `/bzz/ref` endpoint
* add content-type header in `/files/` endpoint
parent 7f933676
openapi: 3.0.0 openapi: 3.0.0
info: info:
version: 0.3.0 version: 0.4.0
title: Swarm API title: Swarm API
description: 'A list of the currently provided Interfaces to interact with the swarm, implementing file operations' description: 'A list of the currently provided Interfaces to interact with the swarm, implementing file operations'
...@@ -208,6 +208,11 @@ paths: ...@@ -208,6 +208,11 @@ paths:
type: boolean type: boolean
required: false required: false
description: Represents the encrypting state of the file description: Represents the encrypting state of the file
- in: header
name: Content-Type
schema:
type: string
description: The specified content-type is preserved for download of the asset
requestBody: requestBody:
content: content:
multipart/form-data: multipart/form-data:
...@@ -258,7 +263,6 @@ paths: ...@@ -258,7 +263,6 @@ paths:
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':
...@@ -305,7 +309,7 @@ paths: ...@@ -305,7 +309,7 @@ paths:
type: string type: string
example: error.html example: error.html
required: false required: false
description: Configure custom error document to be returned when an error occurs while fetching path from collection description: Configure custom error document to be returned when a specified path can not be found in collection
requestBody: requestBody:
content: content:
application/x-tar: application/x-tar:
...@@ -328,6 +332,42 @@ paths: ...@@ -328,6 +332,42 @@ paths:
default: default:
description: Default response description: Default response
'/bzz/{reference}':
get:
summary: 'Get index document from a collection of files'
tags:
- Collection
parameters:
- in: path
name: reference
schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmReference'
required: true
description: Swarm address of content
- in: query
name: targets
schema:
type: string
required: false
description: Global pinning targets prefix
responses:
'200':
description: Ok
content:
application/octet-stream:
schema:
type: string
format: binary
'400':
$ref: 'SwarmCommon.yaml#/components/responses/400'
'404':
$ref: 'SwarmCommon.yaml#/components/responses/404'
'500':
$ref: 'SwarmCommon.yaml#/components/responses/500'
default:
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'
...@@ -375,15 +415,14 @@ paths: ...@@ -375,15 +415,14 @@ paths:
summary: 'Create Tag' summary: 'Create Tag'
tags: tags:
- Tag - Tag
parameters: requestBody:
- in: query required: true
name: name content:
schema: application/json:
$ref: 'SwarmCommon.yaml#/components/schemas/TagName' schema:
required: true $ref: 'SwarmCommon.yaml#/components/schemas/NewTagRequest'
description: Tagname
responses: responses:
'200': '201':
description: New Tag Info description: New Tag Info
content: content:
application/json: application/json:
......
openapi: 3.0.0 openapi: 3.0.0
info: info:
version: '0.3.0' version: 0.4.0
title: 'Common Data Types' title: Common Data Types
description: | description: |
\*****bzzz***** \*****bzzz*****
...@@ -163,6 +163,14 @@ components: ...@@ -163,6 +163,14 @@ components:
MultiAddress: MultiAddress:
type: string type: string
NewTagRequest:
type: object
properties:
Name:
type: string
Address:
type: '#/components/schemas/SwarmAddress'
NewTagResponse: NewTagResponse:
type: object type: object
properties: properties:
......
openapi: 3.0.0 openapi: 3.0.0
info: info:
version: 0.3.0 version: 0.4.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'
......
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