feat: 接入swagger功能
This commit is contained in:
274
swagger2docs/swagger.json
Normal file
274
swagger2docs/swagger.json
Normal file
@@ -0,0 +1,274 @@
|
||||
{
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "OMC Service Interface Info",
|
||||
"title": "OMC Swagger API",
|
||||
"contact": {},
|
||||
"version": "1.0.5"
|
||||
},
|
||||
"host": "127.0.0.1:33040",
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/": {
|
||||
"get": {
|
||||
"description": "Root Route",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"common"
|
||||
],
|
||||
"summary": "Root Route",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "data",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/chart/graph": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Getting Relationship Map Data",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"chart"
|
||||
],
|
||||
"summary": "Getting Relationship Map Data",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Group",
|
||||
"name": "group",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"node",
|
||||
"edge",
|
||||
"combo"
|
||||
],
|
||||
"type": "string",
|
||||
"description": "Type oneof=node edge combo",
|
||||
"name": "type",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "data",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/chart/graph/": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Saving Relationship Diagram Data",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"chart"
|
||||
],
|
||||
"summary": "Saving Relationship Diagram Data",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "{group:'',data:{nodes:[],edges:[],combos:[]}}",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "data",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/chart/graph/:group": {
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Deleting Relationship Diagram Data",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"chart"
|
||||
],
|
||||
"summary": "Deleting Relationship Diagram Data",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Group",
|
||||
"name": "group",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "data",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/chart/graph/groups": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Get relationship graph group name",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"chart"
|
||||
],
|
||||
"summary": "Get relationship graph group name",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "data",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/ne/action/pushFile": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Sending files from local to network elements",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"network_element"
|
||||
],
|
||||
"summary": "Sending files from local to network elements",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "data",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"ApiKeyAuth": {
|
||||
"description": "Get the key through the login interface, fill in e.g. Bearer \u003caccess_token\u003e",
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"description": "chart interface",
|
||||
"name": "chart"
|
||||
},
|
||||
{
|
||||
"description": "common interface",
|
||||
"name": "common"
|
||||
},
|
||||
{
|
||||
"description": "monitor interface",
|
||||
"name": "monitor"
|
||||
},
|
||||
{
|
||||
"description": "network data interface",
|
||||
"name": "network_data"
|
||||
},
|
||||
{
|
||||
"description": "network element interface",
|
||||
"name": "network_element"
|
||||
},
|
||||
{
|
||||
"description": "system interface",
|
||||
"name": "system"
|
||||
},
|
||||
{
|
||||
"description": "tool interface",
|
||||
"name": "tool"
|
||||
},
|
||||
{
|
||||
"description": "trace interface",
|
||||
"name": "trace"
|
||||
},
|
||||
{
|
||||
"description": "ws interface",
|
||||
"name": "ws"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user