From eb0f09480cac06deb19721de04b92520415c1ce0 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Sat, 16 Jul 2022 14:48:07 -0600 Subject: [PATCH 1/3] feat: Update web-server.json --- docs/swagger/reference/web-server.json | 128 ++++++++----------------- 1 file changed, 41 insertions(+), 87 deletions(-) diff --git a/docs/swagger/reference/web-server.json b/docs/swagger/reference/web-server.json index 2c8b03fc41..321cc2a7bf 100644 --- a/docs/swagger/reference/web-server.json +++ b/docs/swagger/reference/web-server.json @@ -3,7 +3,6 @@ "info": { "title": "web server", "version": "1.0", - "summary": "HELICS web server API", "description": "Description of the services from a Helics web server for broker management", "contact": { "name": "Philip Top" @@ -24,16 +23,6 @@ "summary": "Get Index page", "operationId": "index", "description": "Get the index page no properties", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, "responses": { "200": { "description": "OK", @@ -51,11 +40,11 @@ }, "/{broker_id}": { "post": { - "summary": "Create New Broker", + "summary": "Create New User", "operationId": "post-broker", "responses": { "200": { - "description": "Broker Created", + "description": "User Created", "content": { "application/json": { "schema": { @@ -83,9 +72,20 @@ "examples": {} } }, - "description": "Post the necessary fields for the API to create a new broker." + "description": "Post the necessary fields for the API to create a new user." }, - "description": "Create a new broker" + "description": "Create a new broker", + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "broker_id", + "in": "path", + "required": true, + "description": "name of the broker" + } + ] }, "get": { "summary": "run a query on a broker", @@ -118,41 +118,13 @@ "schema": { "type": "string" }, - "in": "query", - "name": "target", - "description": "query target" - }, - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "query", - "description": "name of the query" + "name": "broker_id", + "in": "path", + "required": true, + "description": "name of the broker" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "../models/webQueryInfo.yaml" - } - } - }, - "description": "additional information including targets and query string for the target" - } + ] }, - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "broker_id", - "in": "path", - "required": true, - "description": "name of the broker" - } - ], "delete": { "summary": "", "operationId": "delete-broker_id", @@ -161,7 +133,18 @@ "description": "OK" } }, - "description": "remove a broker" + "description": "remove a broker", + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "broker_id", + "in": "path", + "required": true, + "description": "name of the broker" + } + ] } }, "/{broker_id}/{target_id}/{query}": { @@ -307,16 +290,6 @@ }, "operationId": "get-broker_id-query", "description": "make a query on a specific broker or target on the default broker equivalent to broker/target, target/query", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "../models/webQueryInfo.yaml" - } - } - }, - "description": "This is supplying 2 parameters in the address, the parameters can also be supplied as a qeury parameter or in the body" - }, "parameters": [ { "schema": { @@ -390,16 +363,7 @@ } }, "operationId": "get-search-target_id", - "description": "search for a specific object or broker and get its information", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "../models/webQueryInfo.yaml" - } - } - } - } + "description": "search for a specific object or broker and get its information" } }, "/{broker_id}/barrier": { @@ -509,7 +473,10 @@ "minLength": 1 } }, - "required": ["status", "error"], + "required": [ + "status", + "error" + ], "x-examples": { "example-1": { "status": 400, @@ -777,22 +744,7 @@ "name": "uuid", "description": "uuid of the broker" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "../models/webQueryInfo.yaml" - } - }, - "application/xml": { - "schema": { - "$ref": "" - } - } - }, - "description": "" - } + ] } }, "/healthcheck": { @@ -811,7 +763,9 @@ "type": "boolean" } }, - "required": ["success"], + "required": [ + "success" + ], "x-examples": { "example-1": { "success": true From 48e922091fbf88bf7e43f1c7fcaf59436436cbe0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 16 Jul 2022 21:01:56 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/swagger/reference/web-server.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/swagger/reference/web-server.json b/docs/swagger/reference/web-server.json index 321cc2a7bf..185d3f1cc5 100644 --- a/docs/swagger/reference/web-server.json +++ b/docs/swagger/reference/web-server.json @@ -473,10 +473,7 @@ "minLength": 1 } }, - "required": [ - "status", - "error" - ], + "required": ["status", "error"], "x-examples": { "example-1": { "status": 400, @@ -763,9 +760,7 @@ "type": "boolean" } }, - "required": [ - "success" - ], + "required": ["success"], "x-examples": { "example-1": { "success": true From 8bb2d96a51f7388af35ed0897e9ce7c899ef2860 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Sat, 16 Jul 2022 15:03:03 -0600 Subject: [PATCH 3/3] fix: Update docstring --- docs/swagger/reference/web-server.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/swagger/reference/web-server.json b/docs/swagger/reference/web-server.json index 185d3f1cc5..989ad1f796 100644 --- a/docs/swagger/reference/web-server.json +++ b/docs/swagger/reference/web-server.json @@ -40,11 +40,11 @@ }, "/{broker_id}": { "post": { - "summary": "Create New User", + "summary": "Create New Broker", "operationId": "post-broker", "responses": { "200": { - "description": "User Created", + "description": "Broker Created", "content": { "application/json": { "schema": { @@ -72,7 +72,7 @@ "examples": {} } }, - "description": "Post the necessary fields for the API to create a new user." + "description": "Post the necessary fields for the API to create a new broker." }, "description": "Create a new broker", "parameters": [