Align ErrorResponse schema with actual text/plain error bodies#122
Merged
Conversation
Agent-Logs-Url: https://github.com/CenterForDigitalHumanities/TinyNode/sessions/cf70963e-0b89-4625-9d20-10949e9b6dc2 Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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— ChangeErrorResponsefrom a JSON object envelope (message/error/status) totype: string. TinyNode routes (create.js,query.js,update.js,overwrite.js,delete.js) all returnres.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 ofAssertionError: 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`ErrorResponseunderapplication/jsoncontent. 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)python3 -c "import yaml; yaml.safe_load(...)")rerum-openapiclone produces the expectedErrorResponsediff and nothing elsecubap/rerum_openapiwith only theErrorResponsechange