Commit 488d1da4 authored by Manuel's avatar Manuel

semanticLinking: major cleanup of swagger files

parent fc73e600
...@@ -4,6 +4,10 @@ info: ...@@ -4,6 +4,10 @@ info:
description: This is the documentation for the semantic linking microservice. description: This is the documentation for the semantic linking microservice.
version: "1.0.0" version: "1.0.0"
# Import security definitions from global security definition
securityDefinitions:
$ref: '../security/security.yml#securityDefinitions'
consumes: consumes:
- "application/json" - "application/json"
produces: produces:
...@@ -14,6 +18,8 @@ basePath: "/api" ...@@ -14,6 +18,8 @@ basePath: "/api"
paths: paths:
/debug: /debug:
post: post:
security:
- JwtRegular: []
operationId: "routes.debug.echo" operationId: "routes.debug.echo"
tags: tags:
- "Echo" - "Echo"
...@@ -32,6 +38,8 @@ paths: ...@@ -32,6 +38,8 @@ paths:
# nodes region # nodes region
/use-cases/{use_case}/layers/{layer_name}/nodes: /use-cases/{use_case}/layers/{layer_name}/nodes:
get: get:
security:
- JwtRegular: []
operationId: "routes.nodes.nodes_for_use_case_and_layer" operationId: "routes.nodes.nodes_for_use_case_and_layer"
tags: tags:
- "Nodes" - "Nodes"
...@@ -54,63 +62,11 @@ paths: ...@@ -54,63 +62,11 @@ paths:
$ref: "#/definitions/Node" $ref: "#/definitions/Node"
# endregion nodes # endregion nodes
#Raw_dataset region # Layers region
/raw_dataset:
post:
operationId: "routes.raw-dataset.post"
tags:
- "Raw_Dataset"
summary: "Add a new dataset [TODO: or overwrite an existing one]"
parameters:
- in: body
name: "raw_dataset"
description: "The raw dataset to be added"
required: true
schema:
$ref: "#/definitions/Dataset"
responses:
'201':
description: "Successful operation"
'400':
description: "Invalid input"
get:
operationId: "routes.raw-dataset.get"
tags:
- "raw_dataset"
summary: "Get all datasets"
parameters: []
responses:
'200':
description: "Successful operation"
schema:
$ref: "#/definitions/DatasetCollection"
/raw_dataset/{name}:
get:
operationId: "routes.raw-dataset.get_by_usecase"
tags:
- "raw_dataset"
summary: "Get single usecase dataset"
parameters:
- name: "name"
in: "path"
description: "Name of the requested usecase dataset"
required: true
type: "string"
responses:
'200':
description: "Successful operation"
schema:
$ref: "#/definitions/Dataset"
'404':
description: "dataset not found"
#end region
#region Layers
/layers: /layers:
get: get:
security:
- JwtRegular: []
operationId: "routes.layers.get" operationId: "routes.layers.get"
tags: tags:
- "Layers" - "Layers"
...@@ -124,6 +80,8 @@ paths: ...@@ -124,6 +80,8 @@ paths:
/use-cases/{use_case}/layers/{name}: /use-cases/{use_case}/layers/{name}:
get: get:
security:
- JwtRegular: []
operationId: "routes.layers.get_by_name_and_use_case" operationId: "routes.layers.get_by_name_and_use_case"
tags: tags:
- "Layers" - "Layers"
...@@ -147,6 +105,8 @@ paths: ...@@ -147,6 +105,8 @@ paths:
/use-cases/{use_case}/layers: /use-cases/{use_case}/layers:
get: get:
security:
- JwtRegular: []
operationId: "routes.layers.get_by_use_case" operationId: "routes.layers.get_by_use_case"
tags: tags:
- "Layers" - "Layers"
...@@ -162,85 +122,7 @@ paths: ...@@ -162,85 +122,7 @@ paths:
description: "Successful operation" description: "Successful operation"
schema: schema:
$ref: "#/definitions/Layer" $ref: "#/definitions/Layer"
# endregion layers
/layers/{name}:
get:
operationId: "routes.layers.get_by_name"
tags:
- "Layers"
summary: "Get single layer data"
parameters:
- name: "name"
in: "path"
description: "Name of the requested layer"
required: true
type: "string"
responses:
'200':
description: "Successful operation"
schema:
$ref: "#/definitions/Layer"
'404':
description: "Layer not found"
/layers/{name}/nodes:
get:
operationId: "routes.layers.get_nodes"
tags:
- "Layers"
summary: "Get all individual nodes for the layer"
parameters:
- name: "name"
in: "path"
description: "Name of the layer"
required: true
type: "string"
responses:
'200':
description: "Successful operation"
schema:
$ref: "#/definitions/NodeCollection"
'404':
description: "Layer not found"
/multilayer:
get:
operationId: "routes.multilayer.test_multilayer_get_function"
tags:
- "Multilayer"
summary: "some demo testing"
parameters: []
responses:
'200':
description: "Successful echo of request data"
/agi/multilayer/multilayer.png:
get:
operationId: "routes.multilayer.get_image"
tags:
- "Multilayer"
summary: "Returning the multilayer created from AGI data"
parameters: []
produces:
- "image/png"
responses:
'200':
description: "Successful echo of request data"
/graphinfo:
get:
operationId: "routes.graphinfo.get"
tags:
- "GraphInfo"
summary: "Get info about clustered nodes"
description: "Returns multiple metrics for all nodes created by analyzing and clustering the blockchain traces"
parameters: []
responses:
'200':
description: "Successful operation"
schema:
$ref: "#/definitions/NodeInfo"
definitions: definitions:
NodeInfo: NodeInfo:
...@@ -266,13 +148,18 @@ definitions: ...@@ -266,13 +148,18 @@ definitions:
Layer: Layer:
type: object type: object
properties: properties:
use_case:
type: string
layer_name: layer_name:
type: string type: string
properties: properties:
type: array type: array
items: items:
type: string type: string
total_properties:
type: array
items:
type: string
LayerCollection: LayerCollection:
type: array type: array
items: items:
......
...@@ -54,61 +54,7 @@ paths: ...@@ -54,61 +54,7 @@ paths:
$ref: "#/definitions/Node" $ref: "#/definitions/Node"
# endregion nodes # endregion nodes
#Raw_dataset region # Layers region
/raw_dataset:
post:
operationId: "routes.raw-dataset.post"
tags:
- "Raw_Dataset"
summary: "Add a new dataset [TODO: or overwrite an existing one]"
parameters:
- in: body
name: "raw_dataset"
description: "The raw dataset to be added"
required: true
schema:
$ref: "#/definitions/Dataset"
responses:
'201':
description: "Successful operation"
'400':
description: "Invalid input"
get:
operationId: "routes.raw-dataset.get"
tags:
- "raw_dataset"
summary: "Get all datasets"
parameters: []
responses:
'200':
description: "Successful operation"
schema:
$ref: "#/definitions/DatasetCollection"
/raw_dataset/{name}:
get:
operationId: "routes.raw-dataset.get_by_usecase"
tags:
- "raw_dataset"
summary: "Get single usecase dataset"
parameters:
- name: "name"
in: "path"
description: "Name of the requested usecase dataset"
required: true
type: "string"
responses:
'200':
description: "Successful operation"
schema:
$ref: "#/definitions/Dataset"
'404':
description: "dataset not found"
#end region
#region Layers
/layers: /layers:
get: get:
operationId: "routes.layers.get" operationId: "routes.layers.get"
...@@ -162,85 +108,7 @@ paths: ...@@ -162,85 +108,7 @@ paths:
description: "Successful operation" description: "Successful operation"
schema: schema:
$ref: "#/definitions/Layer" $ref: "#/definitions/Layer"
# endregion layers
/layers/{name}:
get:
operationId: "routes.layers.get_by_name"
tags:
- "Layers"
summary: "Get single layer data"
parameters:
- name: "name"
in: "path"
description: "Name of the requested layer"
required: true
type: "string"
responses:
'200':
description: "Successful operation"
schema:
$ref: "#/definitions/Layer"
'404':
description: "Layer not found"
/layers/{name}/nodes:
get:
operationId: "routes.layers.get_nodes"
tags:
- "Layers"
summary: "Get all individual nodes for the layer"
parameters:
- name: "name"
in: "path"
description: "Name of the layer"
required: true
type: "string"
responses:
'200':
description: "Successful operation"
schema:
$ref: "#/definitions/NodeCollection"
'404':
description: "Layer not found"
/multilayer:
get:
operationId: "routes.multilayer.test_multilayer_get_function"
tags:
- "Multilayer"
summary: "some demo testing"
parameters: []
responses:
'200':
description: "Successful echo of request data"
/agi/multilayer/multilayer.png:
get:
operationId: "routes.multilayer.get_image"
tags:
- "Multilayer"
summary: "Returning the multilayer created from AGI data"
parameters: []
produces:
- "image/png"
responses:
'200':
description: "Successful echo of request data"
/graphinfo:
get:
operationId: "routes.graphinfo.get"
tags:
- "GraphInfo"
summary: "Get info about clustered nodes"
description: "Returns multiple metrics for all nodes created by analyzing and clustering the blockchain traces"
parameters: []
responses:
'200':
description: "Successful operation"
schema:
$ref: "#/definitions/NodeInfo"
definitions: definitions:
NodeInfo: NodeInfo:
...@@ -266,13 +134,18 @@ definitions: ...@@ -266,13 +134,18 @@ definitions:
Layer: Layer:
type: object type: object
properties: properties:
use_case:
type: string
layer_name: layer_name:
type: string type: string
properties: properties:
type: array type: array
items: items:
type: string type: string
total_properties:
type: array
items:
type: string
LayerCollection: LayerCollection:
type: array type: array
items: items:
......
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