diff options
author | vlad <vlad@drivergrp.com> | 2016-09-27 11:45:08 -0700 |
---|---|---|
committer | vlad <vlad@drivergrp.com> | 2016-09-27 11:45:08 -0700 |
commit | 472037994434e58def0c594e141703240a4e6c2a (patch) | |
tree | 22fa5721b7c0fe5a0bd80bf6ed7c23fe48081633 /src/main/scala | |
parent | e60d70fc01371f2f8ea27596ea91019cdc236994 (diff) | |
download | driver-core-0.8.9.tar.gz driver-core-0.8.9.tar.bz2 driver-core-0.8.9.zip |
Api version to Swagger from the buildv0.8.9
Diffstat (limited to 'src/main/scala')
-rw-r--r-- | src/main/scala/com/drivergrp/core/app.scala | 2 | ||||
-rw-r--r-- | src/main/scala/com/drivergrp/core/rest.scala | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/scala/com/drivergrp/core/app.scala b/src/main/scala/com/drivergrp/core/app.scala index 17c63f5..a1e1082 100644 --- a/src/main/scala/com/drivergrp/core/app.scala +++ b/src/main/scala/com/drivergrp/core/app.scala @@ -57,7 +57,7 @@ object app { protected def bindHttp(modules: Seq[Module]): Unit = { val serviceTypes = modules.flatMap(_.routeTypes) - val swaggerService = new Swagger(baseUrl, actorSystem, serviceTypes, config) + val swaggerService = new Swagger(baseUrl, version, actorSystem, serviceTypes, config) val swaggerRoutes = swaggerService.routes ~ swaggerService.swaggerUI val versionRt = versionRoute(version, gitHash, time.currentTime()) diff --git a/src/main/scala/com/drivergrp/core/rest.scala b/src/main/scala/com/drivergrp/core/rest.scala index 89a0c75..0d718c9 100644 --- a/src/main/scala/com/drivergrp/core/rest.scala +++ b/src/main/scala/com/drivergrp/core/rest.scala @@ -89,6 +89,7 @@ object rest { import scala.reflect.runtime.universe._ class Swagger(override val host: String, + version: String, override val actorSystem: ActorSystem, override val apiTypes: Seq[Type], val config: Config) extends SwaggerHttpService with HasActorSystem { @@ -100,7 +101,7 @@ object rest { override val info = Info( config.getString("swagger.apiInfo.description"), - config.getString("swagger.apiVersion"), + version, config.getString("swagger.apiInfo.title"), config.getString("swagger.apiInfo.termsOfServiceUrl"), contact = Some(Contact( |