Skip to content

Conversation

lu-yg
Copy link
Collaborator

@lu-yg lu-yg commented Sep 24, 2025

English | 简体中文

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Built its own designer, fully self-validated

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Background and solution

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Documentation

    • Standardized Swagger/OpenAPI annotations across controllers for consistent, clearer API documentation in Swagger UI.
    • Consolidated response and parameter sections for improved readability.
    • No changes to endpoints, parameters, or responses; behavior remains unchanged.
  • Style

    • General formatting and indentation cleanup to improve code readability.
    • Minor whitespace/indent fixes without altering logic or functionality.

Copy link

coderabbitai bot commented Sep 24, 2025

Walkthrough

Reformatted Swagger/OpenAPI annotations across multiple controllers to standardize parameters and responses nesting and indentation. No changes to method signatures, mappings, return types, or logic. ResourceController includes a minor indentation adjustment without behavioral impact.

Changes

Cohort / File(s) Summary of Changes
OpenAPI annotation normalization
base/src/main/java/com/tinyengine/it/controller/AppController.java, .../AppExtensionController.java, .../BlockGroupController.java, .../CanvasController.java, .../ComponentController.java, .../ComponentLibraryController.java, .../DataSourceController.java, .../I18nEntryController.java, .../MaterialController.java, .../ModelController.java, .../PageController.java
Reformatted @Operation/@Parameter/@apiresponse blocks (nesting parameters/responses, indentation/line-break adjustments). No method signature, mapping, return type, or logic changes.
Non-OpenAPI formatting tweak
base/src/main/java/com/tinyengine/it/controller/ResourceController.java
Indentation-only adjustment in Content-Disposition expression; no semantic change.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble docs with tidy paws,
Aligning tags and schema laws.
No routes were changed, no logic hops—
just straighter lines and neater props.
Thump! My review is swift and bright,
carrots stacked, annotations right.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "fix: Modify code format" succinctly and accurately describes the PR's main change — formatting-only updates across controller OpenAPI/Swagger annotations as shown in the provided summaries — and is short and readable for history scanning.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
base/src/main/java/com/tinyengine/it/controller/PageController.java (1)

154-176: Remove duplicate setter in updatePage.

page.setLastUpdatedTime(null); is called twice.

Apply:

-            page.setLastUpdatedTime(null);
             page.setLastUpdatedTime(null);
🧹 Nitpick comments (28)
base/src/main/java/com/tinyengine/it/controller/DataSourceController.java (1)

154-166: Use HTTP DELETE for delete endpoint.

Current delete uses GET mapping; prefer DELETE for correctness and tooling compatibility.

Apply:

-    @GetMapping("/sources/delete/{id}")
+    @DeleteMapping("/sources/delete/{id}")

Ensure org.springframework.web.bind.annotation.DeleteMapping is imported.

base/src/main/java/com/tinyengine/it/controller/PageController.java (1)

164-166: Align mapping with path variable usage.

Route contains {id} but method doesn’t accept it; either remove {id} from path or accept and use the variable.

Example fix:

-    @PostMapping("/pages/update/{id}")
-    public Result<Page> updatePage(HttpServletRequest request) throws IOException {
+    @PostMapping("/pages/update/{id}")
+    public Result<Page> updatePage(@PathVariable Integer id, HttpServletRequest request) throws IOException {
         ...
-            Page page = JsonUtils.decode(json, Page.class);
+            Page page = JsonUtils.decode(json, Page.class);
+            page.setId(id);

Alternatively, drop {id} from the mapping if the body’s id is authoritative.

base/src/main/java/com/tinyengine/it/controller/ComponentLibraryController.java (1)

101-113: Prefer PUT for update endpoint.

Consider switching the update mapping to PUT for semantics and client expectations.

Apply:

-    @PostMapping("/component-library/update/{id}")
+    @PutMapping("/component-library/update/{id}")

Ensure org.springframework.web.bind.annotation.PutMapping is imported.

base/src/main/java/com/tinyengine/it/controller/AppExtensionController.java (1)

156-166: Use HTTP DELETE and a path variable for deletion.

Delete operation is exposed as GET without a resource-anchored path.

Apply:

-    @GetMapping("/apps/extension/delete")
-    public Result<AppExtension> deleteAppExtension(@RequestParam Integer id) {
+    @DeleteMapping("/apps/extension/{id}")
+    public Result<AppExtension> deleteAppExtension(@PathVariable Integer id) {
         return appExtensionService.deleteAppExtensionById(id);
     }

And add the missing import:

+import org.springframework.web.bind.annotation.DeleteMapping;
base/src/main/java/com/tinyengine/it/controller/AppController.java (6)

83-91: Path param docs OK; response schema likely incorrect.

Same mismatch as above (Result vs App). Suggest aligning schema or confirm unwrapping.

-                schema = @Schema(implementation = App.class))),
+                schema = @Schema(implementation = Result.class))),

104-112: Use @RequestBody (OpenAPI) for body docs instead of @parameter.

@parameter is for path/query/header/cookie. Body should use io.swagger.v3.oas.annotations.parameters.RequestBody.

-    @Operation(summary = "创建app", description = "创建app",
-        parameters = {
-            @Parameter(name = "app", description = "App入参对象")
-            }, responses = {
+    @Operation(summary = "创建app", description = "创建app",
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "App入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = App.class))
+        ),
+        responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json",
-                schema = @Schema(implementation = App.class))),
+                content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Result.class))),
             @ApiResponse(responseCode = "400", description = "请求失败")}
     )

126-134: Body docs should use @RequestBody; parameter name casing.

Rename "App" → "app" and switch to @RequestBody. Also adjust response schema to Result.

-    @Operation(summary = "修改单个App信息", description = "修改单个App信息",
-        parameters = {
-            @Parameter(name = "id", description = "appId"),
-            @Parameter(name = "App", description = "入参对象")}, responses = {
+    @Operation(summary = "修改单个App信息", description = "修改单个App信息",
+        parameters = {
+            @Parameter(name = "id", description = "appId")},
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = App.class))
+        ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
                  content = @Content(mediaType = "application/json",
-                 schema = @Schema(implementation = App.class))),
+                 schema = @Schema(implementation = Result.class))),
             @ApiResponse(responseCode = "400", description = "请求失败")
     })

148-156: Consider RESTful verb: use @DeleteMapping for deletions.

Endpoint currently uses GET for delete; prefer @DeleteMapping("/apps/{id}") to reflect intent and ease client/tooling.


169-176: Response schema mismatch (Result vs App).

Align with the actual envelope or confirm unwrapping.

-                schema = @Schema(implementation = App.class))),
+                schema = @Schema(implementation = Result.class))),

190-198: Body docs for Map payload should use @RequestBody; consider a typed DTO.

Replace @parameter on body with @RequestBody, and prefer a dedicated DTO over raw Map for validation/docs.

-    @Operation(summary = "修改应用对应的国际化语种关联", description = "修改应用对应的国际化语种关联",
-        parameters = {
-            @Parameter(name = "id", description = "appId"),
-            @Parameter(name = "param", description = "入参对象")}, responses = {
+    @Operation(summary = "修改应用对应的国际化语种关联", description = "修改应用对应的国际化语种关联",
+        parameters = {
+            @Parameter(name = "id", description = "appId")},
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Map.class))
+        ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json",
-                schema = @Schema(implementation = App.class))),
+                content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Result.class))),
             @ApiResponse(responseCode = "400", description = "请求失败")
     })
base/src/main/java/com/tinyengine/it/controller/MaterialController.java (5)

60-66: Response schema doesn’t reflect Result<List>.

Use the envelope (or confirm a global unwrapping config).

-                schema = @Schema(implementation = Material.class))),
+                schema = @Schema(implementation = Result.class))),

80-89: Document body with @RequestBody; fix parameter name casing.

Switch from @parameter to @RequestBody; "Material" → "material".

-    @Operation(summary = "创建Material", description = "创建Material",
-        parameters = {
-            @Parameter(name = "Material", description = "Material入参对象")
-    }, responses = {
+    @Operation(summary = "创建Material", description = "创建Material",
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "Material入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Material.class))
+        ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json",
-                schema = @Schema(implementation = Material.class))),
+                content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Result.class))),
             @ApiResponse(responseCode = "400", description = "请求失败")
     })

102-112: Body as @RequestBody; ‘id’ description typo (‘appId’).

Fix description and schema envelope.

-    @Operation(summary = "修改单个Material信息", description = "修改单个Material信息",
-        parameters = {
-            @Parameter(name = "id", description = "appId"),
-            @Parameter(name = "Material", description = "入参对象")
-    }, responses = {
+    @Operation(summary = "修改单个Material信息", description = "修改单个Material信息",
+        parameters = {
+            @Parameter(name = "id", description = "id")
+    }, requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Material.class))
+    ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json",
-                schema = @Schema(implementation = Material.class))),
+                content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Result.class))),
             @ApiResponse(responseCode = "400", description = "请求失败")
     })

125-134: Delete endpoint docs: response schema envelope.

Align response schema with Result.

-                schema = @Schema(implementation = Material.class))),
+                schema = @Schema(implementation = Result.class))),

146-154: Detail endpoint docs: response schema envelope.

Align response schema with Result.

-                schema = @Schema(implementation = Material.class))),
+                schema = @Schema(implementation = Result.class))),
base/src/main/java/com/tinyengine/it/controller/I18nEntryController.java (9)

79-84: Add parameter docs for query params.

Expose host and host_type in @operation to improve API docs.

-    @Operation(summary = "通过app获取国际化词条列表", description = "通过app获取国际化词条列表",
-        responses = {
+    @Operation(summary = "通过app获取国际化词条列表", description = "通过app获取国际化词条列表",
+        parameters = {
+            @Parameter(name = "host", description = "host"),
+            @Parameter(name = "host_type", description = "host类型")
+        }, responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json", schema = @Schema())),
+                content = @Content(mediaType = "application/json", schema = @Schema(implementation = Result.class))),
             @ApiResponse(responseCode = "400", description = "请求失败")
     })

99-107: Response schema type mismatch (returns I18nEntryDto).

Update schema (or wrap with Result if not unwrapped globally).

-                schema = @Schema(implementation = I18nEntry.class))),
+                schema = @Schema(implementation = Result.class))),

121-129: Use @RequestBody for body; response is a list.

Switch body docs and align envelope.

-    @Operation(summary = "创建国际化多语言词条", description = "创建国际化多语言词条",
-        parameters = {
-            @Parameter(name = "OperateI18nEntries", description = "入参对象")
-    }, responses = {
+    @Operation(summary = "创建国际化多语言词条", description = "创建国际化多语言词条",
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = OperateI18nEntries.class))
+        ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json",
-                schema = @Schema(implementation = I18nEntry.class))),
+                content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Result.class))),
             @ApiResponse(responseCode = "400", description = "请求失败")
     })

144-152: Batch create: same body doc and response considerations.

Mirror the RequestBody approach; return envelope.

-        parameters = {
-            @Parameter(name = "operateI18nBatchEntries", description = "入参对象")
-    }, responses = {
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = OperateI18nBatchEntries.class))
+        ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json",
-                schema = @Schema(implementation = I18nEntry.class))),
+                content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Result.class))),

169-178: Update single: response is I18nEntryDto; document body via @RequestBody.

Adjust both body and response schema.

-        parameters = {
-            @Parameter(name = "id", description = "I18nEntries主键id"),
-            @Parameter(name = "i18nEntries", description = "入参对象")
-    }, responses = {
+        parameters = {
+            @Parameter(name = "id", description = "I18nEntries主键id")
+    }, requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = I18nEntry.class))
+    ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json",
-                schema = @Schema(implementation = I18nEntry.class))),
+                content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Result.class))),

195-203: Update multiple: use @RequestBody; response is a list.

Align docs with payload and envelope.

-        parameters = {
-            @Parameter(name = "operateI18nEntries", description = "入参对象")
-    }, responses = {
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = OperateI18nEntries.class))
+        ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json",
-                schema = @Schema(implementation = I18nEntry.class))),
+                content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Result.class))),

220-228: Param name typo and response type mismatch.

Rename iDeleteI18nEntry → deleteI18nEntry to match method; response is List.

-        parameters = {
-            @Parameter(name = "iDeleteI18nEntry", description = "入参对象")
-    }, responses = {
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = DeleteI18nEntry.class))
+        ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json",
-                schema = @Schema(implementation = I18nEntry.class))),
+                content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Result.class))),

246-254: Multipart upload: document as multipart/form-data and correct response.

Use @RequestBody with mediaType multipart/form-data; response should be Result.

-        parameters = {
-            @Parameter(name = "id", description = "appId"),
-            @Parameter(name = "filesMap", description = "文件参数对象")
-    }, responses = {
+        parameters = { @Parameter(name = "id", description = "appId") },
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "文件参数对象", required = true,
+            content = @Content(mediaType = "multipart/form-data",
+                schema = @Schema(implementation = Map.class))
+        ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json", schema = @Schema())),
+                content = @Content(mediaType = "application/json",
+                    schema = @Schema(implementation = Result.class))),

290-298: Batch upload: same multipart and response envelope considerations.

Mirror single-file endpoint docs here as well.

-        parameters = {
-            @Parameter(name = "id", description = "appId"),
-            @Parameter(name = "filesMap", description = "文件参数对象")
-    }, responses = {
+        parameters = { @Parameter(name = "id", description = "appId") },
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "文件参数对象", required = true,
+            content = @Content(mediaType = "multipart/form-data",
+                schema = @Schema(implementation = Map.class))
+        ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json", schema = @Schema())),
+                content = @Content(mediaType = "application/json",
+                    schema = @Schema(implementation = Result.class))),
base/src/main/java/com/tinyengine/it/controller/BlockGroupController.java (4)

70-79: Parameter names in docs don’t match actual query params.

Docs use ids/appId/from, but method expects id/app/from. Align names to avoid broken clients/generated SDKs.

-        parameters = {
-            @Parameter(name = "ids", description = "分组ids"),
-            @Parameter(name = "appId", description = "appId"),
-            @Parameter(name = "from", description = "区分是在物料管理还是区块管理(block:在区块管理)")
-    }, responses = {
+        parameters = {
+            @Parameter(name = "id", description = "分组ids"),
+            @Parameter(name = "app", description = "appId"),
+            @Parameter(name = "from", description = "区分是在物料管理还是区块管理(block:在区块管理)")
+    }, responses = {

Also consider documenting the Result envelope in the 200 response.

-                content = @Content(mediaType = "application/json", schema = @Schema())),
+                content = @Content(mediaType = "application/json", schema = @Schema(implementation = Result.class))),

97-105: Create: use @RequestBody for body; rename blockGroups → blockGroup; response envelope.

-        parameters = {
-            @Parameter(name = "blockGroups", description = "入参对象")
-    }, responses = {
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = BlockGroup.class))
+        ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json",
-                schema = @Schema(implementation = BlockGroup.class))),
+                content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Result.class))),

119-127: Update: use @RequestBody; response returns a list.

Align body docs and response envelope/list.

-        parameters = {
-            @Parameter(name = "id", description = "分组id"),
-            @Parameter(name = "blockGroups", description = "入参对象")
-    }, responses = {
+        parameters = { @Parameter(name = "id", description = "分组id") },
+        requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
+            description = "入参对象", required = true,
+            content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = BlockGroup.class))
+        ), responses = {
             @ApiResponse(responseCode = "200", description = "返回信息",
-                content = @Content(mediaType = "application/json", schema = @Schema(implementation = BlockGroup.class))),
+                content = @Content(mediaType = "application/json", schema = @Schema(implementation = Result.class))),

146-154: Delete-by-id: use @DeleteMapping; response type docs.

Prefer @DeleteMapping and align schema with Result<List>.

-                content = @Content(mediaType = "application/json",
-                schema = @Schema(implementation = BlockGroup.class))),
+                content = @Content(mediaType = "application/json",
+                schema = @Schema(implementation = Result.class))),
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91aab3e and e139d53.

📒 Files selected for processing (12)
  • base/src/main/java/com/tinyengine/it/controller/AppController.java (7 hunks)
  • base/src/main/java/com/tinyengine/it/controller/AppExtensionController.java (5 hunks)
  • base/src/main/java/com/tinyengine/it/controller/BlockGroupController.java (4 hunks)
  • base/src/main/java/com/tinyengine/it/controller/CanvasController.java (1 hunks)
  • base/src/main/java/com/tinyengine/it/controller/ComponentController.java (3 hunks)
  • base/src/main/java/com/tinyengine/it/controller/ComponentLibraryController.java (5 hunks)
  • base/src/main/java/com/tinyengine/it/controller/DataSourceController.java (5 hunks)
  • base/src/main/java/com/tinyengine/it/controller/I18nEntryController.java (9 hunks)
  • base/src/main/java/com/tinyengine/it/controller/MaterialController.java (5 hunks)
  • base/src/main/java/com/tinyengine/it/controller/ModelController.java (7 hunks)
  • base/src/main/java/com/tinyengine/it/controller/PageController.java (6 hunks)
  • base/src/main/java/com/tinyengine/it/controller/ResourceController.java (1 hunks)
🔇 Additional comments (9)
base/src/main/java/com/tinyengine/it/controller/ResourceController.java (1)

337-338: Formatting-only change is correct.

Re-indentation of the ternary for Content-Disposition is fine; no behavior change.

base/src/main/java/com/tinyengine/it/controller/DataSourceController.java (1)

64-72: OpenAPI annotation reformat looks good.

Parameters and responses preserved; only indentation/line-break changes.

Also applies to: 87-95, 109-117, 131-140, 154-162

base/src/main/java/com/tinyengine/it/controller/PageController.java (1)

79-87: Annotation formatting changes are fine.

No behavior change; docs structure consistent.

Also applies to: 102-110, 125-133, 154-162, 197-205, 218-225

base/src/main/java/com/tinyengine/it/controller/ModelController.java (1)

62-73: Annotation reformat reads well.

No API or logic changes; OK to merge.

Also applies to: 89-97, 111-119, 134-143, 158-166, 180-188, 201-209

base/src/main/java/com/tinyengine/it/controller/ComponentLibraryController.java (1)

60-66: Annotation formatting changes look good.

Also applies to: 80-87, 101-110, 125-133, 146-154

base/src/main/java/com/tinyengine/it/controller/CanvasController.java (1)

58-67: Annotation reformat LGTM.

No behavior change.

base/src/main/java/com/tinyengine/it/controller/AppExtensionController.java (1)

91-99: Annotation formatting changes are fine.

Also applies to: 116-123, 136-143

base/src/main/java/com/tinyengine/it/controller/ComponentController.java (1)

64-71: OpenAPI annotation reformat otherwise looks good.

Also applies to: 95-102, 125-132

base/src/main/java/com/tinyengine/it/controller/AppController.java (1)

63-69: Align @operation response schema with actual return type (Result<List>)

Project uses springdoc-openapi (pom) and has OpenApiConfig, but no ModelConverter/OpenApiCustomiser/OperationCustomizer was found to unwrap a Result envelope — the @operation currently documents App while the controller returns Result<List>. Either enable global unwrapping or change the response schema to the Result envelope (e.g. schema = @Schema(implementation = Result.class) or create a ResultOfApp DTO representing Result<List>).

File: base/src/main/java/com/tinyengine/it/controller/AppController.java Lines: 63-69

Comment on lines +66 to 75
@Operation(summary = "获取应用的桥接源或工具类列表", description = "获取应用的桥接源或工具类列表",
parameters = {
@Parameter(name = "appId", description = "appId"),
@Parameter(name = "category", description = "category")}, responses = {
@ApiResponse(responseCode = "200", description = "返回信息",
content = @Content(mediaType = "application/json",
schema = @Schema(implementation = AppExtension.class))),
@ApiResponse(responseCode = "400", description = "请求失败")})
content = @Content(mediaType = "application/json",
schema = @Schema(implementation = AppExtension.class))),
@ApiResponse(responseCode = "400", description = "请求失败")
})
@SystemControllerLog(description = "获取应用的桥接源或工具类列表")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

API doc/param name mismatch (appId vs app).

Docs declare appId but the endpoint expects app query param; this will mislead clients and tools.

Apply:

-            @Parameter(name = "appId", description = "appId"),
+            @Parameter(name = "app", description = "appId"),

Or change the controller signature to accept @RequestParam Integer appId and adapt usage.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@Operation(summary = "获取应用的桥接源或工具类列表", description = "获取应用的桥接源或工具类列表",
parameters = {
@Parameter(name = "appId", description = "appId"),
@Parameter(name = "category", description = "category")}, responses = {
@ApiResponse(responseCode = "200", description = "返回信息",
content = @Content(mediaType = "application/json",
schema = @Schema(implementation = AppExtension.class))),
@ApiResponse(responseCode = "400", description = "请求失败")})
content = @Content(mediaType = "application/json",
schema = @Schema(implementation = AppExtension.class))),
@ApiResponse(responseCode = "400", description = "请求失败")
})
@SystemControllerLog(description = "获取应用的桥接源或工具类列表")
@Operation(summary = "获取应用的桥接源或工具类列表", description = "获取应用的桥接源或工具类列表",
parameters = {
@Parameter(name = "app", description = "appId"),
@Parameter(name = "category", description = "category")}, responses = {
@ApiResponse(responseCode = "200", description = "返回信息",
content = @Content(mediaType = "application/json",
schema = @Schema(implementation = AppExtension.class))),
@ApiResponse(responseCode = "400", description = "请求失败")
})
@SystemControllerLog(description = "获取应用的桥接源或工具类列表")
🤖 Prompt for AI Agents
In base/src/main/java/com/tinyengine/it/controller/AppExtensionController.java
around lines 66 to 75, the OpenAPI @Parameter declares name="appId" but the
controller expects the query param named "app", causing a mismatch; fix by
either updating the @Parameter (and any related @Parameter entries) to
name="app" so docs match the existing controller parameter, or change the
controller method signature and any usage to accept @RequestParam Integer appId
(and update code references) so the docs' appId becomes the actual query
parameter; ensure the chosen approach updates all annotations and usages
consistently.

Comment on lines +64 to 71
@Operation(summary = "上传bunled.json文件创建组件", description = "上传bunled.json文件创建组件",
parameters = {
@Parameter(name = "file", description = "文件参数对象")
}, responses = {
@ApiResponse(responseCode = "200", description = "返回信息",
content = @Content(mediaType = "application/json", schema = @Schema())),
@ApiResponse(responseCode = "400", description = "请求失败")
@ApiResponse(responseCode = "200", description = "返回信息",
content = @Content(mediaType = "application/json", schema = @Schema())),
@ApiResponse(responseCode = "400", description = "请求失败")
})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Minor typos in summaries: “bunled.json” → “bundle.json”.

Fix the user-facing text to avoid confusion in API docs.

Apply:

-    @Operation(summary = "上传bunled.json文件创建组件", description = "上传bunled.json文件创建组件",
+    @Operation(summary = "上传bundle.json文件创建组件", description = "上传bundle.json文件创建组件",
-    @Operation(summary = "上传bunled.json文件处理自定义组件", description = "上传bunled.json文件处理自定义组件",
+    @Operation(summary = "上传bundle.json文件处理自定义组件", description = "上传bundle.json文件处理自定义组件",

Also applies to: 95-102, 125-132

🤖 Prompt for AI Agents
In base/src/main/java/com/tinyengine/it/controller/ComponentController.java
around lines 64-71 (and similarly at 95-102 and 125-132), update the API
Operation summaries/descriptions to correct the typo "bunled.json" to
"bundle.json" (and any matching occurrences in parameter descriptions or other
user-facing text) so the generated API docs show "bundle.json"; make the exact
text change in each Operation annotation where the misspelling appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant