dubeejw commented on a change in pull request #2966: WIP: Path parameter
support for API GW
URL:
https://github.com/apache/incubator-openwhisk/pull/2966#discussion_r162440494
##########
File path: tests/src/test/scala/whisk/core/cli/test/ApiGwRestTests.scala
##########
@@ -245,4 +247,73 @@ class ApiGwRestTests extends ApiGwTests {
rr.stderr should include("A valid auth key is required")
}
+ def getSwaggerApiUrl(rr: RunResult): String = {
+ val apiResultRest = rr.asInstanceOf[RestResult]
+ return apiResultRest.getField("gwApiUrl") + "/path"
+ }
+
+ def getParametersFromJson(rr: RunResult, pathName: String): Vector[JsObject]
= {
+ val apiResult = rr.asInstanceOf[RestResult]
+ val apidoc = apiResult.getFieldJsObject("apidoc")
+ val paths = RestResult.getFieldJsObject(apidoc, "paths")
+ val path = RestResult.getFieldJsObject(paths, pathName)
+ val get = RestResult.getFieldJsObject(path, "get")
+ RestResult.getFieldListJsObject(get, "parameters")
+ }
+
+ behavior of "Wsk rest api creation with path parameters with swagger"
+
+ it should "create the API when swagger file contains path parameters" in
withAssetCleaner(wskprops) {
+ (wp, assetHelper) =>
+ println("**8****** apihost:")
Review comment:
Printlns not needed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services