This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-414
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-414 by this push:
new a246c54 Code review & fixes for NLPCRAFT-414
a246c54 is described below
commit a246c54dd33a9451aef9421222d50cb7711d9357
Author: Aaron Radzinski <[email protected]>
AuthorDate: Mon Aug 23 23:15:01 2021 -0700
Code review & fixes for NLPCRAFT-414
---
.../apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala | 12 +++++-------
.../apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala | 1 -
openapi/nlpcraft_swagger.yml | 4 ++++
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
index 2032e3a..471350f 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
@@ -623,13 +623,12 @@ private [cmdline] object NCCliCommands {
s"ID of the model element to get expanded synonyms and
values for. " +
s"In REPL mode, hit ${rv(" Tab ")} to see
auto-suggestion for possible element IDs."
),
- // TODO:
Parameter(
id = "pattern",
- names = Seq("--pattern", "-p"),
- value = Some("pattern"), // TODO:
+ names = Seq("--ptrn", "-p"),
+ value = Some("regex"),
optional = true,
- desc = s"512 length element and values synonyms patters."
+ desc = s"Optional regular expression pattern to filter the
synonyms by."
)
),
examples = Seq(
@@ -640,13 +639,12 @@ private [cmdline] object NCCliCommands {
desc =
s"Issues ${y("'model/syns'")} REST call with given
model and element IDs."
),
- // TODO:
Example(
usage = Seq(
- s"""> model-syns -m=my.model.id -e=my:elem -p=test"""
+ s"""> model-syns -m=my.model.id -e=my:elem
-p='^start.*'"""
),
desc =
- s"Issues ${y("'model/syns'")} REST call with given
model and element IDs."
+ s"Issues ${y("'model/syns'")} REST call with given
model and element IDs filtered by ${y("^start.*")} regex."
)
)
),
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
index 8d89477..02939d3 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
@@ -123,7 +123,6 @@ object NCDeployManager extends NCService {
try
lazyObj = U.mkObject(objClassName)
catch {
- // TODO:
case e: Throwable => throw new NCE(s"Error initializing
object of type: $objClassName", e)
}
diff --git a/openapi/nlpcraft_swagger.yml b/openapi/nlpcraft_swagger.yml
index 4391cb3..4c93453 100644
--- a/openapi/nlpcraft_swagger.yml
+++ b/openapi/nlpcraft_swagger.yml
@@ -267,6 +267,10 @@ paths:
type: string
maxLength: 64
description: ID of the model element to get its synonyms and
values.
+ pattern :
+ type: string
+ maxLength: 256
+ description: Optional JDK-compatible regex to filter returned
synonyms on.
responses:
'200':
description: Successful operation.