Swagger for import-exoprt
This commit is contained in:
50
public/swagger/swagger-port.yaml
Normal file
50
public/swagger/swagger-port.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
paths:
|
||||
get:
|
||||
tags:
|
||||
- port
|
||||
summary: "Export entities from a namespace"
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/namespace"
|
||||
responses:
|
||||
200:
|
||||
$ref: "#/components/schemas/port"
|
||||
|
||||
post:
|
||||
tags:
|
||||
- port
|
||||
summary: "Import entities into a namespace"
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/namespace"
|
||||
requestBody:
|
||||
$ref: "#/components/schemas/port"
|
||||
responses:
|
||||
200:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
namespace:
|
||||
type: int
|
||||
example: "5"
|
||||
|
||||
components:
|
||||
parameters:
|
||||
namespace:
|
||||
$ref: "./swagger.yaml#/components/parameters/namespace"
|
||||
|
||||
schemas:
|
||||
one:
|
||||
$ref: "./swagger.yaml#/components/schemas/one"
|
||||
|
||||
port:
|
||||
description: "A {namespace:[entity]} json object"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
namespace:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/one"
|
||||
@@ -97,7 +97,7 @@ components:
|
||||
id:
|
||||
name: id
|
||||
in: query
|
||||
description: "An entity's unique name"
|
||||
description: "An entity's unique name, case insensitive for reads"
|
||||
schema:
|
||||
type: string
|
||||
|
||||
@@ -134,35 +134,7 @@ components:
|
||||
|
||||
schemas:
|
||||
one:
|
||||
title: "One entity"
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
example: "Jeff Snow"
|
||||
type:
|
||||
type: string
|
||||
example: "doggo"
|
||||
title:
|
||||
type: string
|
||||
example: "Meme Lord"
|
||||
text:
|
||||
type: string
|
||||
example: "Lorem ipsum"
|
||||
relationship:
|
||||
type: string
|
||||
example: "Good boi"
|
||||
modified:
|
||||
type: int
|
||||
example: 8675309
|
||||
attachments:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
connections:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: object
|
||||
$ref: "./swagger.yaml#/components/schemas/one"
|
||||
|
||||
200:
|
||||
content:
|
||||
|
||||
@@ -19,6 +19,8 @@ paths:
|
||||
$ref: "./swagger-who.yaml#/paths"
|
||||
/register:
|
||||
$ref: "./swagger-register.yaml#/paths"
|
||||
/port:
|
||||
$ref: "./swagger-port.yaml#/paths"
|
||||
/__files__/{path}:
|
||||
$ref: "./swagger-files.yaml#/paths"
|
||||
|
||||
@@ -43,13 +45,42 @@ components:
|
||||
ok:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
example: "ok"
|
||||
|
||||
one:
|
||||
title: "One entity"
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
example: "Jeff Snow"
|
||||
type:
|
||||
type: string
|
||||
example: "doggo"
|
||||
title:
|
||||
type: string
|
||||
example: "Meme Lord"
|
||||
text:
|
||||
type: string
|
||||
example: "Lorem ipsum"
|
||||
relationship:
|
||||
type: string
|
||||
example: "Good boi"
|
||||
modified:
|
||||
type: int
|
||||
example: 8675309
|
||||
attachments:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
connections:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: object
|
||||
|
||||
securitySchemes:
|
||||
token:
|
||||
type: apiKey
|
||||
|
||||
Reference in New Issue
Block a user