Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70fc0c6811
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "application/octet-stream": { | ||
| "schema": {"type": "string", "format": "binary"} |
There was a problem hiding this comment.
Advertise the media types the file route actually returns
When serving files with recognized extensions such as index.html, styles.css, or images, this route derives and returns text/html, text/css, or the relevant image type via mimetypes.guess_type(); application/octet-stream is only its fallback. Advertising only the fallback therefore gives the reference and generated clients an incorrect content-type contract for the normal success paths. Declare a wildcard/media-type ranges or enumerate the supported response types while retaining the binary schema.
Useful? React with 👍 / 👎.
…ates alongside the OpenAPI response metadata Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
No PR environment for this pull requestAdd the Updated on every push to this PR. |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2c9265e to
a53f013
Compare
https://linear.app/mindsdb/issue/ENG-2371/fail-ci-when-the-cowork-api-reference-drifts-from-the-servers-openapi
What changed
task and conversation aliases, the Responses lifecycle routes, schedules,
the artifact list and action routes, and search now declare their JSON
success schema, and the conditional SSE and file routes declare their real
media type, so the API reference drift check has a non-empty server schema
to compare against instead of
{}alongside the OpenAPI response metadata: staging had added org-mode and
desktop-only gates on the same nine decorators, so those routes now carry
both
Why this matters
Reviewing mindsdb/mindshub#12493 by hand found 18 of the 52 documented
endpoints do not exist and 20 of 26 checked response cards misdescribe the
server. The drift check that will guard the page reads
app.openapi(), whichtoday emits an empty success schema for these routes, so there is nothing for
it to compare. This PR fills those schemas without touching wire behavior.
Notes for the reviewer
response_model. Schemas are declared throughFastAPI's
responses=so returned payloads are neither filtered norcoerced. Existing endpoint tests remain the guard on serialization and
tenant scoping.
reference publishes get schemas; the desktop, coding-runtime, settings,
and compatibility routes are unchanged.
Ships with
The mindshub checker PR, not yet open. This PR is independent and can merge
first.
Checks
uv run pytest tests/test_openapi_contract.pymake test/unit🤖 Generated with Claude Code