Skip to content

docs(openapi): clarify internal files response items#13988

Open
luyua9 wants to merge 1 commit into
Comfy-Org:masterfrom
luyua9:fix/openapi-internal-files-response-luyua9
Open

docs(openapi): clarify internal files response items#13988
luyua9 wants to merge 1 commit into
Comfy-Org:masterfrom
luyua9:fix/openapi-internal-files-response-luyua9

Conversation

@luyua9
Copy link
Copy Markdown

@luyua9 luyua9 commented May 19, 2026

Summary

Update the OpenAPI schema for GET /internal/files/{directory_type} so each array item documents the suffix that the route already returns, for example example.png [output].

api_server/routes/internal/internal_routes.py formats every visible file as:

f"{entry.name} [{directory_type}]"

The previous schema only said array<string>, which made generated clients miss the directory-type suffix contract.

Validation

  • python3 - <<'PY' ... yaml.safe_load(open('openapi.yaml')) ... PY
  • git diff --check

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b50ce8dc-d03a-4110-8ea3-4cab51a28d33

📥 Commits

Reviewing files that changed from the base of the PR and between 6b61918 and 5d0fcd7.

📒 Files selected for processing (1)
  • openapi.yaml

📝 Walkthrough

Walkthrough

This PR updates the OpenAPI schema for the GET /internal/files/{directory_type} endpoint's 200 response. The returned filename strings are now constrained by a regex pattern requiring the format name [output|input|temp], enforcing that each filename is suffixed with a bracketed directory type. The schema description is also updated to document this suffix requirement.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: clarifying the OpenAPI schema for internal files response items with the directory-type suffix format.
Description check ✅ Passed The description is directly related to the changeset, explaining why the schema update was necessary and providing validation steps taken.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

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.

2 participants