diff --git a/deploy.sh b/deploy.sh index a4575ae..d26ab22 100644 --- a/deploy.sh +++ b/deploy.sh @@ -5,8 +5,9 @@ function main() { set -e go test ./... GOOS=linux GOARCH=arm GOARM=5 CGO_ENABLED=0 go build -o $(basename "$PWD") -a -installsuffix cgo - scp ./dndex zach@192.168.1.123:./dndex/dndex.new - ssh zach@192.168.1.123 bash -c 'true; while [ -e ./dndex/dndex.new ]; do printf "."; sleep 3; done; echo' + scp ./public/swagger/* zach@tickle.lan:./dndex/files/swagger/ + scp ./dndex zach@tickle.lan:./dndex/dndex.new + ssh zach@tickle.lan bash -c 'true; while [ -e ./dndex/dndex.new ]; do printf "."; sleep 3; done; echo' } if [ "$0" == "$BASH_SOURCE" ]; then diff --git a/public/swagger/swagger-who.yaml b/public/swagger/swagger-who.yaml index edeeb6e..85f7c45 100644 --- a/public/swagger/swagger-who.yaml +++ b/public/swagger/swagger-who.yaml @@ -2,7 +2,7 @@ paths: get: tags: - who - summary: "Get an entity" + summary: "Get an entity. If ?id not provided, see TRACE" parameters: - $ref: "#/components/parameters/id" - $ref: "#/components/parameters/namespace" @@ -12,6 +12,7 @@ paths: $ref: "#/components/schemas/200" trace: + deprecated: true tags: - who summary: "List all entities" @@ -96,7 +97,6 @@ components: id: name: id in: query - required: true description: "An entity's unique name" schema: type: string diff --git a/view/who.go b/view/who.go index e4543fe..3d58dea 100644 --- a/view/who.go +++ b/view/who.go @@ -154,7 +154,7 @@ func whoDelete(namespace string, g storage.Graph, w http.ResponseWriter, r *http return err } - return json.NewEncoder(w).Encode(`{"status":"ok"}`) + return json.NewEncoder(w).Encode(map[string]string{"status": "ok"}) } func whoPatch(namespace string, g storage.Graph, w http.ResponseWriter, r *http.Request) error {