Swagger to deploy

master
Bel LaPointe 2020-07-24 23:41:33 -06:00
parent 663579aeae
commit 4069fd822f
3 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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 {