为API文档增加部分描述信息

This commit is contained in:
brightestboy 2019-03-20 15:07:43 +08:00
parent 286a8b593a
commit 588848d630

View File

@ -17,7 +17,7 @@
package rep.api package rep.api
import com.github.swagger.akka.SwaggerHttpService import com.github.swagger.akka.SwaggerHttpService
import com.github.swagger.akka.model.Info import com.github.swagger.akka.model.{Info, License}
import rep.api.rest._ import rep.api.rest._
import io.swagger.models.ExternalDocs import io.swagger.models.ExternalDocs
import io.swagger.models.auth.BasicAuthDefinition import io.swagger.models.auth.BasicAuthDefinition
@ -37,7 +37,11 @@ object SwaggerDocService extends SwaggerHttpService {
classOf[TransactionService], classOf[TransactionService],
classOf[LogMgrService] classOf[LogMgrService]
) )
override val info = Info(version = "1.0") override val info = Info(
description = "RepChian API Doc",
version = "1.0.0",
title = "RepChain",
license = Some(License("Apache 2.0","http://www.apache.org/licenses/LICENSE-2.0.html")))
override val externalDocs = Some(new ExternalDocs("Developers Guide", "https://repchaindoc.readthedocs.io/zh/latest/index.html")) override val externalDocs = Some(new ExternalDocs("Developers Guide", "https://repchaindoc.readthedocs.io/zh/latest/index.html"))
override val securitySchemeDefinitions = Map("basicAuth" -> new BasicAuthDefinition()) override val securitySchemeDefinitions = Map("basicAuth" -> new BasicAuthDefinition())
} }