You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "yunchipang (via GitHub)" <gi...@apache.org> on 2025/06/04 18:05:38 UTC
[PR] [#6860] docs: add OpenAPI docs for fileset/files [gravitino]
yunchipang opened a new pull request, #7334:
URL: https://github.com/apache/gravitino/pull/7334
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
Add OpenAPI doc for fileset/files endpoint
### Why are the changes needed?
To generate docs for the new API endpoint at fileset/files
Fix: #6860 #7215
### Does this PR introduce _any_ user-facing change?
Yes, new REST API doc
### How was this patch tested?
(Please test your changes, and provide instructions on how to test it:
1. If you add a feature or fix a bug, add a test to cover your changes.
2. If you fix a flaky test, repeat it for many times to prove it works.)
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6860] docs: add OpenAPI docs for fileset/files [gravitino]
Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades commented on code in PR #7334:
URL: https://github.com/apache/gravitino/pull/7334#discussion_r2131339254
##########
docs/open-api/filesets.yaml:
##########
@@ -205,6 +205,55 @@ 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 files
+ operationId: listFilesetFiles
+ description: List metadata of files and directories in a fileset
+ parameters:
+ - name: sub_path
+ in: query
+ required: false
+ schema:
+ type: string
+ default: "/"
+ description: The sub path within the fileset to list files and directories from
+ - name: location_name
+ in: query
+ required: false
+ schema:
+ type: string
+ default: "default"
Review Comment:
It's default is null
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6860] docs: add OpenAPI docs for fileset/files [gravitino]
Posted by "mchades (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6860] docs: add OpenAPI docs for fileset/files [gravitino]
Posted by "yunchipang (via GitHub)" <gi...@apache.org>.
yunchipang commented on code in PR #7334:
URL: https://github.com/apache/gravitino/pull/7334#discussion_r2132620024
##########
docs/open-api/filesets.yaml:
##########
@@ -411,6 +487,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:
@mchades I reverted this change to make CI pass. It seems like they require an array, and I believe this is the same as
```
enum
- 0
```
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6860] docs: add OpenAPI docs for fileset/files [gravitino]
Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades merged PR #7334:
URL: https://github.com/apache/gravitino/pull/7334
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org