From dd343fb476da7d6cb2a104444598a2d82bb59ce1 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 18 Nov 2021 16:40:01 +0800 Subject: [PATCH] [KYUUBI #1354][FOLLOWUP] Update url to camel case style ### _Why are the changes needed?_ Update url to camel case style [#1354](https://github.com/apache/incubator-kyuubi/pull/1408#discussion_r751948135) ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1412 from simon824/r3. Closes #1354 aa933713 [Simon] Merge branch 'apache:master' into r3 5260926a [simon] camel case style 6349ac5a [simon] ApiResponse b1f906e5 [simon] init Lead-authored-by: simon Co-authored-by: Simon <3656562@qq.com> Signed-off-by: ulysses-you --- .../org/apache/kyuubi/server/api/v1/SessionsResource.scala | 4 ++-- .../apache/kyuubi/server/api/v1/SessionsResourceSuite.scala | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala index 2cd057149..11bea8181 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala @@ -193,7 +193,7 @@ private[v1] class SessionsResource extends ApiRequestContext { description = "Create an operation with GET_TYPE_INFO type" ) @POST - @Path("{sessionHandle}/operations/typeinfo") + @Path("{sessionHandle}/operations/typeInfo") def getTypeInfo(@PathParam("sessionHandle") sessionHandleStr: String): OperationHandle = { val sessionHandle = getSessionHandle(sessionHandleStr) try { @@ -272,7 +272,7 @@ private[v1] class SessionsResource extends ApiRequestContext { description = "Create an operation with GET_TABLE_TYPES type" ) @POST - @Path("{sessionHandle}/operations/tabletypes") + @Path("{sessionHandle}/operations/tableTypes") def getTableTypes(@PathParam("sessionHandle") sessionHandleStr: String): OperationHandle = { val sessionHandle = getSessionHandle(sessionHandleStr) try { diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/SessionsResourceSuite.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/SessionsResourceSuite.scala index 3deafbfd4..18d9e66a0 100644 --- a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/SessionsResourceSuite.scala +++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/SessionsResourceSuite.scala @@ -223,7 +223,7 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper { var operationHandle = response.readEntity(classOf[OperationHandle]) assert(operationHandle.typ == OperationType.EXECUTE_STATEMENT) - response = webTarget.path(s"$pathPrefix/operations/typeinfo").request() + response = webTarget.path(s"$pathPrefix/operations/typeInfo").request() .post(Entity.entity(null, MediaType.APPLICATION_JSON_TYPE)) assert(200 == response.getStatus) operationHandle = response.readEntity(classOf[OperationHandle]) @@ -253,7 +253,7 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper { operationHandle = response.readEntity(classOf[OperationHandle]) assert(operationHandle.typ == OperationType.GET_TABLES) - response = webTarget.path(s"$pathPrefix/operations/tabletypes").request() + response = webTarget.path(s"$pathPrefix/operations/tableTypes").request() .post(Entity.entity(null, MediaType.APPLICATION_JSON_TYPE)) assert(200 == response.getStatus) operationHandle = response.readEntity(classOf[OperationHandle])