diff --git a/controllers/files.go b/controllers/files.go index 0422ba54..536484ae 100644 --- a/controllers/files.go +++ b/controllers/files.go @@ -1,10 +1,19 @@ package controller import ( - "github.com/gorilla/mux" "net/http" + + "github.com/gorilla/mux" ) func fileHandlers(r *mux.Router) { + // swagger:route GET /meshclient/files/{filename} meshclient fileServer + // + // Retrieve a file from the file server + // + // Schemes: https + // + // Security: + // oauth r.PathPrefix("/meshclient/files").Handler(http.StripPrefix("/meshclient/files", http.FileServer(http.Dir("./meshclient/files")))) } diff --git a/swagger.yaml b/swagger.yaml index 45670c96..0abb3720 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -1,7 +1,6 @@ basePath: / consumes: - application/json -host: netmaker.io info: description: |- API Usage @@ -455,6 +454,14 @@ paths: - https tags: - nodes + /meshclient/files/{filename}: + get: + description: Retrieve a file from the file server + operationId: fileServer + schemes: + - https + tags: + - meshclient produces: - application/json schemes: