mchades commented on code in PR #7334:
URL: https://github.com/apache/gravitino/pull/7334#discussion_r2128055728
##########
docs/open-api/filesets.yaml:
##########
@@ -459,6 +554,27 @@ components:
}
}
+ FileInfoListResponse:
+ value: {
+ "code": 0,
+ "files": [
+ {
+ "name": "file.txt",
+ "isDir": false,
+ "size": 5,
+ "lastModified": 1748875070123,
+ "path": "/file.txt"
Review Comment:
the path should be in GVFS format
##########
docs/open-api/filesets.yaml:
##########
@@ -205,6 +205,54 @@ paths:
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
+
/metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/filesets/{fileset}/files:
+ parameters:
+ - $ref: "./openapi.yaml#/components/parameters/metalake"
+ - $ref: "./openapi.yaml#/components/parameters/catalog"
+ - $ref: "./openapi.yaml#/components/parameters/schema"
+ - $ref: "./openapi.yaml#/components/parameters/fileset"
+
+ get:
+ tags:
+ - fileset
+ summary: List metadata of files and directories in a fileset
+ operationId: listFilesetFiles
+ description: List metadata of files and directories in a fileset
+ parameters:
+ - name: subPath
Review Comment:
We can change the parameter name to `sub_path` to align with the
getFileLocation op
##########
docs/open-api/filesets.yaml:
##########
@@ -459,6 +554,27 @@ components:
}
}
+ FileInfoListResponse:
+ value: {
+ "code": 0,
+ "files": [
+ {
+ "name": "file.txt",
+ "isDir": false,
+ "size": 5,
+ "lastModified": 1748875070123,
+ "path": "/file.txt"
+ },
+ {
+ "name": "sub_dir",
+ "isDir": true,
+ "size": 0,
+ "lastModified": 1748875070124,
+ "path": "/sub_dir"
Review Comment:
the path should be in GVFS format
##########
docs/open-api/filesets.yaml:
##########
@@ -205,6 +205,54 @@ paths:
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
+
/metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/filesets/{fileset}/files:
Review Comment:
you should also add the path to there:
https://github.com/apache/gravitino/blob/f0f54c6087ccc9e47fba26cacc081f1a136da985/docs/open-api/openapi.yaml#L110-L112
##########
docs/open-api/filesets.yaml:
##########
@@ -411,6 +486,26 @@ components:
FilesetResponse:
$ref: "#/components/examples/FilesetResponse"
+ FileInfoListResponse:
+ description: The response containing a list of file/directory metadata
+ content:
+ application/vnd.gravitino.v1+json:
+ schema:
+ type: object
+ properties:
+ code:
+ type: integer
+ format: int32
+ description: Status code of the response
+ enum: [0]
Review Comment:
`0` not `[0]`
##########
docs/open-api/filesets.yaml:
##########
@@ -235,6 +283,33 @@ components:
default: {}
additionalProperties:
type: string
+ FileInfo:
+ type: object
+ required:
+ - name
+ - isDir
+ - size
+ - lastModified
+ - path
+ properties:
+ name:
+ type: string
+ description: The name of the file/directory
+ isDir:
+ type: boolean
+ description: Whether this is a directory
+ size:
+ type: integer
+ format: int64
+ description: The file size in bytes (0 if directory)
+ lastModified:
+ type: integer
+ format: int64
+ description: The last modification time of the file/directory
+ path:
+ type: string
+ description: The full path of the file/directory
Review Comment:
`full path` -> `gvfs path`
##########
docs/open-api/filesets.yaml:
##########
@@ -205,6 +205,54 @@ paths:
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
+
/metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/filesets/{fileset}/files:
+ parameters:
+ - $ref: "./openapi.yaml#/components/parameters/metalake"
+ - $ref: "./openapi.yaml#/components/parameters/catalog"
+ - $ref: "./openapi.yaml#/components/parameters/schema"
+ - $ref: "./openapi.yaml#/components/parameters/fileset"
+
+ get:
+ tags:
+ - fileset
+ summary: List metadata of files and directories in a fileset
Review Comment:
The summary should be shorter since it will be used as the title of the
content on the web page.
It can be: `List files`
##########
docs/open-api/filesets.yaml:
##########
@@ -205,6 +205,54 @@ paths:
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
+
/metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/filesets/{fileset}/files:
+ parameters:
+ - $ref: "./openapi.yaml#/components/parameters/metalake"
+ - $ref: "./openapi.yaml#/components/parameters/catalog"
+ - $ref: "./openapi.yaml#/components/parameters/schema"
+ - $ref: "./openapi.yaml#/components/parameters/fileset"
+
+ get:
+ tags:
+ - fileset
+ summary: List metadata of files and directories in a fileset
+ operationId: listFilesetFiles
+ description: List metadata of files and directories in a fileset
+ parameters:
+ - name: subPath
+ in: query
+ required: false
+ schema:
+ type: string
+ default: "/"
+ description: The sub path within the fileset to list files and
directories from
+ - name: locationName
+ in: query
+ required: false
+ schema:
+ type: string
+ description: The name of the storage location
Review Comment:
The default location will be used as the default.
##########
docs/open-api/filesets.yaml:
##########
@@ -205,6 +205,54 @@ paths:
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
+
/metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/filesets/{fileset}/files:
+ parameters:
+ - $ref: "./openapi.yaml#/components/parameters/metalake"
+ - $ref: "./openapi.yaml#/components/parameters/catalog"
+ - $ref: "./openapi.yaml#/components/parameters/schema"
+ - $ref: "./openapi.yaml#/components/parameters/fileset"
+
+ get:
+ tags:
+ - fileset
+ summary: List metadata of files and directories in a fileset
+ operationId: listFilesetFiles
+ description: List metadata of files and directories in a fileset
+ parameters:
+ - name: subPath
+ in: query
+ required: false
+ schema:
+ type: string
+ default: "/"
+ description: The sub path within the fileset to list files and
directories from
+ - name: locationName
Review Comment:
use `location_name`, you can also change the codes in this PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]