Skip to content

Align ErrorResponse schema with actual text/plain error bodies#122

Merged
thehabes merged 4 commits into
mainfrom
followup/openapi-error-response-text-plain
May 21, 2026
Merged

Align ErrorResponse schema with actual text/plain error bodies#122
thehabes merged 4 commits into
mainfrom
followup/openapi-error-response-text-plain

Conversation

@thehabes
Copy link
Copy Markdown
Member

Summary

Follow-up to #121. Two small corrections that came out of static review but weren't included in that PR:

  • openapi/components/tinynode-shared-components.openapi.yaml — Change ErrorResponse from a JSON object envelope (message/error/status) to type: string. TinyNode routes (create.js, query.js, update.js, overwrite.js, delete.js) all return res.status(...).type('text/plain').send(err.message), so the previous schema was contract drift. TinyPEN behaves the same way, verified across /mnt/e/tinyPen/routes/.
  • test/routes/mount.test.js — Add helpful failure messages to the two new file-existence assertions so a renamed/deleted workflow or artifact produces an actionable error instead of AssertionError: false == true.

The downstream receiver baselines in cubap/rerum_openapi (seams/tinythings-to-deer/openapi/baseline.openapi.yaml, seams/rerum-to-tinythings/openapi/baseline.openapi.yaml) still `$ref` ErrorResponse under application/json content. That's a separate receiver-side cleanup — tracked elsewhere.

Test plan

  • npm run allTests — 77/77 unit tests pass locally (pre-existing playwright/e2e failure unrelated)
  • YAML parses cleanly (python3 -c "import yaml; yaml.safe_load(...)")
  • Workflow dry-run against local rerum-openapi clone produces the expected ErrorResponse diff and nothing else
  • After merge, watch "TinyNode Shared OpenAPI Sync" run on main and confirm a sync PR appears in cubap/rerum_openapi with only the ErrorResponse change

Copilot AI and others added 4 commits May 9, 2026 01:55
Resolves conflicts in openapi/components/tinynode-shared-components.openapi.yaml
and test/routes/mount.test.js. Keeps the local-side ErrorResponse schema
(type: string, matching TinyNode's actual text/plain error bodies) and the
helpful failure messages on the file-existence assertions added in the
preceding local commit.
@thehabes thehabes requested a review from cubap as a code owner May 21, 2026 16:13
@thehabes thehabes merged commit c57090d into main May 21, 2026
5 checks passed
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