Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit d8a6b94

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents f45c18c + 50f5983 commit d8a6b94

7 files changed

+13
-4
lines changed

src/main/scala/ScalatraBootstrap.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import org.scalatra._
1111
* This class provides all runtime information for Scalatra. Servlets are mounted here.
1212
*/
1313
class ScalatraBootstrap extends LifeCycle {
14-
val apiVersion = "3.0.0-2"
14+
val apiVersion = "3.0.0-3"
1515
implicit val swagger: CodeOverflowSwagger = new CodeOverflowSwagger(apiVersion)
1616

1717
override def init(context: ServletContext) {

src/main/scala/org/codeoverflow/chatoverflow/ui/web/rest/config/ConfigController.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ class ConfigController(implicit val swagger: Swagger) extends JsonServlet with C
9090
} else if (chatOverflow.isLoaded) {
9191
ResultMessage(success = false, "Framework already loaded.")
9292

93+
} else if (password == "") {
94+
ResultMessage(success = false, "Password must not be empty.")
95+
9396
} else {
9497
chatOverflow.credentialsService.setPassword(password.toCharArray)
9598

src/main/scala/org/codeoverflow/chatoverflow/ui/web/rest/config/ConfigControllerDefinition.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ trait ConfigControllerDefinition extends SwaggerSupport with TagSupport with Aut
5151
summary "Registers the user with the given password. Can only be called if there is no credentials file."
5252
description "Creates a credentials file with the given password. Acts like post(login) after this (returning an auth key)."
5353
tags controllerTag
54-
parameter bodyParam[Password]("body").description("Requires the user framework password. The auth key is based on this input."))
54+
parameter bodyParam[Password]("body").description("Requires the user framework password (must not be empty). The auth key is based on this input."))
5555

5656
override def controllerTag: String = "config"
5757

src/main/scala/org/codeoverflow/chatoverflow/ui/web/rest/connector/ConnectorController.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ class ConnectorController(implicit val swagger: Swagger) extends JsonServlet wit
4747
if (connectorClass.isEmpty) {
4848
ResultMessage(success = false, "Connector type not found.")
4949

50+
} else if (sourceIdentifier == "") {
51+
ResultMessage(success = false, "Source identifier must not be empty.")
52+
5053
} else if (!ConnectorRegistry.addConnector(sourceIdentifier, uniqueTypeString)) {
5154
ResultMessage(success = false, "Unable to add connector.")
5255

src/main/scala/org/codeoverflow/chatoverflow/ui/web/rest/connector/ConnectorControllerDefinition.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ trait ConnectorControllerDefinition extends SwaggerSupport with TagSupport with
2828
description "Creates a connector with given sourceIdentifier and connector type."
2929
tags controllerTag
3030
parameter authHeader
31-
parameter bodyParam[ConnectorRef]("body").description("Requires platform specific source identifier and connector type."))
31+
parameter bodyParam[ConnectorRef]("body").description("Requires platform specific source identifier (must not be empty) and connector type."))
3232
val deleteConnector: OperationBuilder =
3333
(apiOperation[ResultMessage]("deleteConnector")
3434
summary "Deletes a specific connector."

src/main/scala/org/codeoverflow/chatoverflow/ui/web/rest/plugin/PluginInstanceController.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ class PluginInstanceController(implicit val swagger: Swagger) extends JsonServle
228228
} else if (!chatOverflow.pluginFramework.pluginExists(pluginName, pluginAuthor)) {
229229
ResultMessage(success = false, "Plugin type does not exist.")
230230

231+
} else if (instanceName == "") {
232+
ResultMessage(success = false, "Instance name must not be empty.")
233+
231234
} else {
232235
val pluginType = chatOverflow.pluginFramework.getPlugin(pluginName, pluginAuthor)
233236

src/main/scala/org/codeoverflow/chatoverflow/ui/web/rest/plugin/PluginInstanceControllerDefinition.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ trait PluginInstanceControllerDefinition extends SwaggerSupport with TagSupport
6666
description "Creates a new plugin instance with given name and plugin type."
6767
tags controllerTag
6868
parameter authHeader
69-
parameter bodyParam[PluginInstanceRef]("body").description("Requires new instance name and PluginType (name and author)."))
69+
parameter bodyParam[PluginInstanceRef]("body").description("Requires new instance name (must not be empty) and PluginType (name and author)."))
7070
val deleteInstance: OperationBuilder =
7171
(apiOperation[ResultMessage]("deleteInstance")
7272
summary "Removes a plugin instance."

0 commit comments

Comments
 (0)