You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Adnan2199 (via GitHub)" <gi...@apache.org> on 2024/08/11 07:51:28 UTC
[PR] HDDS-11300. Update Swagger Documentation for Recon API. [ozone]
Adnan2199 opened a new pull request, #7057:
URL: https://github.com/apache/ozone/pull/7057
## What changes were proposed in this pull request?
The following Recon API endpoints are present in the ReconApi.md file but missing from the Swagger documentation. These endpoints should be added to the Swagger documentation to ensure completeness:
```
GET /api/v1/volumes: Fetches all volumes in the cluster.
GET /api/v1/buckets: Fetches all buckets in the cluster.
```
Action Items:
- Update the Swagger documentation to include these two endpoints.
- Ensure that the descriptions, parameters, and response schemas are accurately documented.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11300
## How was this patch tested?
Built the project locally, and started ozone on docker setup and verified the docs :-
The added doc changes are present on the following URL :-
```
http://localhost:9874/docs/interface/swaggerreconapi.html#/
```
<img width="1208" alt="image" src="https://github.com/user-attachments/assets/69653757-5563-40d3-b1f2-9c070f4c2637">
<img width="1232" alt="image" src="https://github.com/user-attachments/assets/c0fda26f-1206-4d69-89a7-3fac0bec1cb0">
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11300. Update Swagger Documentation for Recon API. [ozone]
Posted by "devabhishekpal (via GitHub)" <gi...@apache.org>.
devabhishekpal commented on code in PR #7057:
URL: https://github.com/apache/ozone/pull/7057#discussion_r1712932962
##########
hadoop-hdds/docs/themes/ozonedoc/static/swagger-resources/recon-api.yaml:
##########
@@ -229,6 +233,229 @@ paths:
application/json:
schema:
$ref: '#/components/responses/DeletedMismatchedContainers'
+
+ /volumes:
+ get:
+ tags:
+ - Volumes
+ summary: Fetches all volumes in the cluster.
+ operationId: getVolumes
+ parameters:
+ - name: prevKey
+ in: query
+ description: Only returns the volume after the given prevKey.
+ required: false
+ schema:
+ type: string
+ example: vol1
+ - name: limit
+ in: query
+ description: Only returns the limited number of results. The default limit is 1000.
+ required: false
+ schema:
+ type: integer
+ default: 1000
+ responses:
+ '200':
+ description: Successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ totalCount:
+ type: integer
+ example: 4
+ volumes:
+ type: array
+ items:
+ type: object
+ properties:
+ volume:
+ type: string
+ example: vol1
+ owner:
+ type: string
+ example: testuser
+ admin:
+ type: string
+ example: ozone
+ creationTime:
+ type: integer
+ example: 1665588176660
+ modificationTime:
+ type: integer
+ example: 1665590397315
+ quotaInNamespace:
+ type: integer
+ example: 2048
+ quotaInBytes:
+ type: integer
+ example: 1073741824
+ usedNamespace:
+ type: integer
+ example: 10
+ acls:
+ type: array
+ items:
+ type: object
+ properties:
+ type:
+ type: string
+ example: USER
+ name:
+ type: string
+ example: testuser
+ scope:
+ type: string
+ example: ACCESS
+ aclList:
+ type: array
+ items:
+ type: string
+ example: WRITE
Review Comment:
Can we shift this to the components section?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11300. Update Swagger Documentation for Recon API. [ozone]
Posted by "devabhishekpal (via GitHub)" <gi...@apache.org>.
devabhishekpal commented on code in PR #7057:
URL: https://github.com/apache/ozone/pull/7057#discussion_r1712932731
##########
hadoop-hdds/docs/themes/ozonedoc/static/swagger-resources/recon-api.yaml:
##########
@@ -229,6 +233,229 @@ paths:
application/json:
schema:
$ref: '#/components/responses/DeletedMismatchedContainers'
+
+ /volumes:
+ get:
+ tags:
+ - Volumes
+ summary: Fetches all volumes in the cluster.
+ operationId: getVolumes
+ parameters:
+ - name: prevKey
+ in: query
+ description: Only returns the volume after the given prevKey.
+ required: false
+ schema:
+ type: string
+ example: vol1
+ - name: limit
+ in: query
+ description: Only returns the limited number of results. The default limit is 1000.
+ required: false
+ schema:
+ type: integer
+ default: 1000
+ responses:
+ '200':
+ description: Successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ totalCount:
+ type: integer
+ example: 4
+ volumes:
+ type: array
+ items:
+ type: object
+ properties:
+ volume:
+ type: string
+ example: vol1
+ owner:
+ type: string
+ example: testuser
+ admin:
+ type: string
+ example: ozone
+ creationTime:
+ type: integer
+ example: 1665588176660
+ modificationTime:
+ type: integer
+ example: 1665590397315
+ quotaInNamespace:
+ type: integer
+ example: 2048
+ quotaInBytes:
+ type: integer
+ example: 1073741824
+ usedNamespace:
+ type: integer
+ example: 10
+ acls:
+ type: array
+ items:
+ type: object
+ properties:
+ type:
+ type: string
+ example: USER
+ name:
+ type: string
+ example: testuser
+ scope:
+ type: string
+ example: ACCESS
+ aclList:
+ type: array
+ items:
+ type: string
+ example: WRITE
+ example:
+ totalCount: 4
+ volumes:
+ - volume: vol1
+ owner: testuser
+ admin: ozone
+ creationTime: 1665588176660
+ modificationTime: 1665590397315
+ quotaInNamespace: 2048
+ quotaInBytes: 1073741824
+ usedNamespace: 10
+ acls:
+ - type: USER
+ name: testuser
+ scope: ACCESS
+ aclList:
+ - WRITE
+ - READ
+ - DELETE
+
+ /buckets:
+ get:
+ tags:
+ - Buckets
+ summary: Fetches all buckets in the cluster.
+ operationId: getBuckets
+ parameters:
+ - name: volume
+ in: query
+ description: The volume in string without any protocol prefix.
+ required: false
+ schema:
+ type: string
+ - name: prevKey
+ in: query
+ description: Only returns the bucket after the given prevKey. prevKey is ignored if volume is not specified.
+ required: false
+ schema:
+ type: string
+ example: bucket1
+ - name: limit
+ in: query
+ description: Only returns the limited number of results. The default limit is 1000.
+ required: false
+ schema:
+ type: integer
+ default: 1000
+ responses:
+ '200':
+ description: Successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ totalCount:
+ type: integer
+ example: 5
+ buckets:
+ type: array
+ items:
+ type: object
+ properties:
+ volumeName:
+ type: string
+ example: vol1
+ bucketName:
+ type: string
+ example: buck1
+ versioning:
+ type: boolean
+ example: false
+ storageType:
+ type: string
+ example: DISK
+ creationTime:
+ type: integer
+ example: 1665588176616
+ modificationTime:
+ type: integer
+ example: 1665590392293
+ usedBytes:
+ type: integer
+ example: 943718400
+ usedNamespace:
+ type: integer
+ example: 40000
+ quotaInBytes:
+ type: integer
+ example: 1073741824
+ quotaInNamespace:
+ type: integer
+ example: 50000
+ owner:
+ type: string
+ example: testuser
+ bucketLayout:
+ type: string
+ example: OBJECT_STORE
+ acls:
+ type: array
+ items:
+ type: object
+ properties:
+ type:
+ type: string
+ example: USER
+ name:
+ type: string
+ example: testuser
+ scope:
+ type: string
+ example: ACCESS
+ aclList:
+ type: array
+ items:
+ type: string
+ example: WRITE
+ example:
Review Comment:
We do not require a separate example section, as it will automatically pick up the values from the schema examples
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11300. Update Swagger Documentation for Recon API. [ozone]
Posted by "devabhishekpal (via GitHub)" <gi...@apache.org>.
devabhishekpal commented on code in PR #7057:
URL: https://github.com/apache/ozone/pull/7057#discussion_r1712932800
##########
hadoop-hdds/docs/themes/ozonedoc/static/swagger-resources/recon-api.yaml:
##########
@@ -229,6 +233,229 @@ paths:
application/json:
schema:
$ref: '#/components/responses/DeletedMismatchedContainers'
+
+ /volumes:
+ get:
+ tags:
+ - Volumes
+ summary: Fetches all volumes in the cluster.
+ operationId: getVolumes
+ parameters:
+ - name: prevKey
+ in: query
+ description: Only returns the volume after the given prevKey.
+ required: false
+ schema:
+ type: string
+ example: vol1
+ - name: limit
+ in: query
+ description: Only returns the limited number of results. The default limit is 1000.
+ required: false
+ schema:
+ type: integer
+ default: 1000
+ responses:
+ '200':
+ description: Successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ totalCount:
+ type: integer
+ example: 4
+ volumes:
+ type: array
+ items:
+ type: object
+ properties:
+ volume:
+ type: string
+ example: vol1
+ owner:
+ type: string
+ example: testuser
+ admin:
+ type: string
+ example: ozone
+ creationTime:
+ type: integer
+ example: 1665588176660
+ modificationTime:
+ type: integer
+ example: 1665590397315
+ quotaInNamespace:
+ type: integer
+ example: 2048
+ quotaInBytes:
+ type: integer
+ example: 1073741824
+ usedNamespace:
+ type: integer
+ example: 10
+ acls:
+ type: array
+ items:
+ type: object
+ properties:
+ type:
+ type: string
+ example: USER
+ name:
+ type: string
+ example: testuser
+ scope:
+ type: string
+ example: ACCESS
+ aclList:
+ type: array
+ items:
+ type: string
+ example: WRITE
+ example:
Review Comment:
We do not require an example section as it will pick up the examples from the schema section
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11300. Update Swagger Documentation for Recon API. [ozone]
Posted by "devabhishekpal (via GitHub)" <gi...@apache.org>.
devabhishekpal commented on code in PR #7057:
URL: https://github.com/apache/ozone/pull/7057#discussion_r1712932444
##########
hadoop-hdds/docs/themes/ozonedoc/static/swagger-resources/recon-api.yaml:
##########
@@ -229,6 +233,229 @@ paths:
application/json:
schema:
$ref: '#/components/responses/DeletedMismatchedContainers'
+
+ /volumes:
+ get:
+ tags:
+ - Volumes
+ summary: Fetches all volumes in the cluster.
+ operationId: getVolumes
+ parameters:
+ - name: prevKey
+ in: query
+ description: Only returns the volume after the given prevKey.
+ required: false
+ schema:
+ type: string
+ example: vol1
+ - name: limit
+ in: query
+ description: Only returns the limited number of results. The default limit is 1000.
+ required: false
+ schema:
+ type: integer
+ default: 1000
+ responses:
+ '200':
+ description: Successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ totalCount:
+ type: integer
+ example: 4
+ volumes:
+ type: array
+ items:
+ type: object
+ properties:
+ volume:
+ type: string
+ example: vol1
+ owner:
+ type: string
+ example: testuser
+ admin:
+ type: string
+ example: ozone
+ creationTime:
+ type: integer
+ example: 1665588176660
+ modificationTime:
+ type: integer
+ example: 1665590397315
+ quotaInNamespace:
+ type: integer
+ example: 2048
+ quotaInBytes:
+ type: integer
+ example: 1073741824
+ usedNamespace:
+ type: integer
+ example: 10
+ acls:
+ type: array
+ items:
+ type: object
+ properties:
+ type:
+ type: string
+ example: USER
+ name:
+ type: string
+ example: testuser
+ scope:
+ type: string
+ example: ACCESS
+ aclList:
+ type: array
+ items:
+ type: string
+ example: WRITE
+ example:
+ totalCount: 4
+ volumes:
+ - volume: vol1
+ owner: testuser
+ admin: ozone
+ creationTime: 1665588176660
+ modificationTime: 1665590397315
+ quotaInNamespace: 2048
+ quotaInBytes: 1073741824
+ usedNamespace: 10
+ acls:
+ - type: USER
+ name: testuser
+ scope: ACCESS
+ aclList:
+ - WRITE
+ - READ
+ - DELETE
+
+ /buckets:
+ get:
+ tags:
+ - Buckets
+ summary: Fetches all buckets in the cluster.
+ operationId: getBuckets
+ parameters:
+ - name: volume
+ in: query
+ description: The volume in string without any protocol prefix.
+ required: false
+ schema:
+ type: string
+ - name: prevKey
+ in: query
+ description: Only returns the bucket after the given prevKey. prevKey is ignored if volume is not specified.
+ required: false
+ schema:
+ type: string
+ example: bucket1
+ - name: limit
+ in: query
+ description: Only returns the limited number of results. The default limit is 1000.
+ required: false
+ schema:
+ type: integer
+ default: 1000
+ responses:
+ '200':
+ description: Successful operation
+ content:
+ application/json:
+ schema:
+ type: object
Review Comment:
Can we shift this to the components section and add it as a reference here?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11300. Update Swagger Documentation for Recon API. [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #7057:
URL: https://github.com/apache/ozone/pull/7057#issuecomment-2532703579
@Adnan2199 do you plan to continue work on this?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org