[KYUUBI #1354][FOLLOWUP] Add ApiResponse for operation apis
### _Why are the changes needed?_ Add ApiResponse for operation apis #1354 ### _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 #1408 from simon824/r3. Closes #1354 6349ac5a [simon] ApiResponse b1f906e5 [simon] init Authored-by: simon <zhangshiming@cvte.com> Signed-off-by: ulysses-you <ulyssesyou@apache.org>
This commit is contained in:
parent
2baabf46ca
commit
5bf08495b9
@ -164,6 +164,13 @@ private[v1] class SessionsResource extends ApiRequestContext {
|
||||
Response.ok().build()
|
||||
}
|
||||
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
content = Array(new Content(
|
||||
mediaType = MediaType.APPLICATION_JSON
|
||||
)),
|
||||
description = "Create an operation with EXECUTE_STATEMENT type"
|
||||
)
|
||||
@POST
|
||||
@Path("{sessionHandle}/operations/statement")
|
||||
def executeStatement(@PathParam("sessionHandle") sessionHandleStr: String,
|
||||
@ -178,6 +185,13 @@ private[v1] class SessionsResource extends ApiRequestContext {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
content = Array(new Content(
|
||||
mediaType = MediaType.APPLICATION_JSON
|
||||
)),
|
||||
description = "Create an operation with GET_TYPE_INFO type"
|
||||
)
|
||||
@POST
|
||||
@Path("{sessionHandle}/operations/typeinfo")
|
||||
def getTypeInfo(@PathParam("sessionHandle") sessionHandleStr: String): OperationHandle = {
|
||||
@ -190,6 +204,13 @@ private[v1] class SessionsResource extends ApiRequestContext {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
content = Array(new Content(
|
||||
mediaType = MediaType.APPLICATION_JSON
|
||||
)),
|
||||
description = "Create an operation with GET_CATALOGS type"
|
||||
)
|
||||
@POST
|
||||
@Path("{sessionHandle}/operations/catalogs")
|
||||
def getCatalogs(@PathParam("sessionHandle") sessionHandleStr: String): OperationHandle = {
|
||||
@ -202,6 +223,13 @@ private[v1] class SessionsResource extends ApiRequestContext {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
content = Array(new Content(
|
||||
mediaType = MediaType.APPLICATION_JSON
|
||||
)),
|
||||
description = "Create an operation with GET_SCHEMAS type"
|
||||
)
|
||||
@POST
|
||||
@Path("{sessionHandle}/operations/schemas")
|
||||
def getSchemas(@PathParam("sessionHandle") sessionHandleStr: String,
|
||||
@ -215,6 +243,13 @@ private[v1] class SessionsResource extends ApiRequestContext {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
content = Array(new Content(
|
||||
mediaType = MediaType.APPLICATION_JSON
|
||||
)),
|
||||
description = "Create an operation with GET_TABLES type"
|
||||
)
|
||||
@POST
|
||||
@Path("{sessionHandle}/operations/tables")
|
||||
def getTables(@PathParam("sessionHandle") sessionHandleStr: String,
|
||||
@ -229,6 +264,13 @@ private[v1] class SessionsResource extends ApiRequestContext {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
content = Array(new Content(
|
||||
mediaType = MediaType.APPLICATION_JSON
|
||||
)),
|
||||
description = "Create an operation with GET_TABLE_TYPES type"
|
||||
)
|
||||
@POST
|
||||
@Path("{sessionHandle}/operations/tabletypes")
|
||||
def getTableTypes(@PathParam("sessionHandle") sessionHandleStr: String): OperationHandle = {
|
||||
@ -241,6 +283,13 @@ private[v1] class SessionsResource extends ApiRequestContext {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
content = Array(new Content(
|
||||
mediaType = MediaType.APPLICATION_JSON
|
||||
)),
|
||||
description = "Create an operation with GET_COLUMNS type"
|
||||
)
|
||||
@POST
|
||||
@Path("{sessionHandle}/operations/columns")
|
||||
def getColumns(@PathParam("sessionHandle") sessionHandleStr: String,
|
||||
@ -255,6 +304,13 @@ private[v1] class SessionsResource extends ApiRequestContext {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
content = Array(new Content(
|
||||
mediaType = MediaType.APPLICATION_JSON
|
||||
)),
|
||||
description = "Create an operation with GET_FUNCTIONS type"
|
||||
)
|
||||
@POST
|
||||
@Path("{sessionHandle}/operations/functions")
|
||||
def getFunctions(@PathParam("sessionHandle") sessionHandleStr: String,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user