Make Swagger API support optional, so that consumers can define their own

OpenShift would like to also enable swagger, but we need to register our
services as swagger services prior to the SwaggerAPI being started. I've
added a bool (default false) to master.Config to enable swagger, and split
the method in master out so that a downstream consumer can call it.
This commit is contained in:
Clayton Coleman
2014-12-15 15:29:55 -05:00
parent e37e25807c
commit cd4135666e
3 changed files with 49 additions and 23 deletions

View File

@@ -171,6 +171,7 @@ func main() {
PortalNet: &n,
EnableLogsSupport: *enableLogsSupport,
EnableUISupport: true,
EnableSwaggerSupport: true,
APIPrefix: *apiPrefix,
CorsAllowedOriginList: corsAllowedOriginList,
ReadOnlyPort: *readOnlyPort,