[CELEBORN-1436][FOLLOWUP] Add swagger editor links for RESTful spec

### What changes were proposed in this pull request?

Add swagger editor links for RESTful spec.

Fix warn in the spec:
Master spec:
![image](https://github.com/user-attachments/assets/ff71aedf-c68d-472a-b0f8-e526d87d45ed)

Worker spec:
![image](https://github.com/user-attachments/assets/6820a25e-679f-4790-a3c2-d2757b34b0e4)

### Why are the changes needed?

To view the spec online.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
<img width="1103" alt="image" src="https://github.com/user-attachments/assets/0118e47d-da2d-43c8-a41d-085cde2ed06f" />

No warn now, see:
https://editor-next.swagger.io/?url=https://raw.githubusercontent.com/turbofei/incubator-celeborn/openapi/openapi/openapi-client/src/main/openapi3/master_rest_v1.yaml

https://editor-next.swagger.io/?url=https://raw.githubusercontent.com/turbofei/incubator-celeborn/openapi/openapi/openapi-client/src/main/openapi3/worker_rest_v1.yaml

Closes #3200 from turboFei/openapi.

Authored-by: Wang, Fei <fwang12@ebay.com>
Signed-off-by: Shuang <lvshuang.xjs@alibaba-inc.com>
This commit is contained in:
Wang, Fei 2025-04-21 15:28:52 +08:00 committed by Shuang
parent b8bb6c1e6b
commit f1b71e3eb7
5 changed files with 9 additions and 12 deletions

View File

@ -85,12 +85,8 @@ See the [migration guide](migration.md) for API mappings.
#### Master
See the master openapi spec yaml in the repo `openapi/openapi-client/src/main/openapi3/master_rest_v1.yaml`.
See the master openapi spec yaml in the repo `openapi/openapi-client/src/main/openapi3/master_rest_v1.yaml`, or use the [Swagger Editor](https://editor-next.swagger.io/?url=https://raw.githubusercontent.com/apache/celeborn/main/openapi/openapi-client/src/main/openapi3/master_rest_v1.yaml) online for visualization.
#### Worker
See the worker openapi spec yaml in the repo `openapi/openapi-client/src/main/openapi3/worker_rest_v1.yaml`.
**Note:**
You can locally preview the OpenAPI specification YAML file in IDE, or use the [Swagger Editor](https://editor.swagger.io/) online for visualization.
See the worker openapi spec yaml in the repo `openapi/openapi-client/src/main/openapi3/worker_rest_v1.yaml`, or use the [Swagger Editor](https://editor-next.swagger.io/?url=https://raw.githubusercontent.com/apache/celeborn/main/openapi/openapi-client/src/main/openapi3/worker_rest_v1.yaml) online for visualization.

View File

@ -60,7 +60,8 @@ class ApplicationResource extends ApiRequestContext {
content = Array(new Content(
mediaType = MediaType.APPLICATION_JSON,
schema = new Schema(implementation = classOf[HandleResponse]))))
@DELETE
@POST
@Path("/delete_apps")
def deleteApps(request: DeleteAppsRequest): HandleResponse = {
val apps = request.getApps.asScala
apps.foreach(app => statusSystem.deleteApp(app))

View File

@ -74,7 +74,7 @@ public class ApplicationApi extends BaseApi {
Object localVarPostBody = deleteAppsRequest;
// create path and map variables
String localVarPath = "/api/v1/applications";
String localVarPath = "/api/v1/applications/delete_apps";
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
@ -104,7 +104,7 @@ public class ApplicationApi extends BaseApi {
TypeReference<HandleResponse> localVarReturnType = new TypeReference<HandleResponse>() {};
return apiClient.invokeAPI(
localVarPath,
"DELETE",
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),

View File

@ -253,7 +253,9 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ApplicationsHeartbeatResponse'
delete:
/api/v1/applications/delete_apps:
post:
tags:
- Application
operationId: deleteApps

View File

@ -652,10 +652,8 @@ components:
properties:
primaryPartitions:
$ref: '#/components/schemas/ShufflePartitionLocations'
default: { }
replicaPartitions:
$ref: '#/components/schemas/ShufflePartitionLocations'
default: { }
WorkerId:
type: object