Add swagger (OpenAPI 2.0) support (#1245)

* Add swagger (OpenAPI 2.0) support
* Gererate swagger_doc before building bundle image
This commit is contained in:
Ta-Ching Chen
2019-08-21 15:49:41 +08:00
committed by GitHub
parent 9c63975497
commit b9997b2ece
27 changed files with 1710 additions and 659 deletions
+2
View File
@@ -270,6 +270,8 @@ func (api *API) Serve(port int) {
r.HandleFunc("/proxy/workflows-apiserver/{path:.*}", api.WorkflowApiserverProxy)
r.HandleFunc("/proxy/svcname", api.GetSvcName).Queries("application", "").Methods("GET")
r.Handle("/v2/apidocs.json", openAPI()).Methods("GET")
address := fmt.Sprintf(":%v", port)
api.logger.Info("server started", zap.Int("port", port))