Skip to content

Commit c57090d

Browse files
thehabesCopilotcubap
authored
Align ErrorResponse schema with actual text/plain error bodies (#122)
* Initial plan * feat: add shared openapi sync workflow Agent-Logs-Url: https://github.com/CenterForDigitalHumanities/TinyNode/sessions/cf70963e-0b89-4625-9d20-10949e9b6dc2 Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> * changes --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
1 parent 91f4607 commit c57090d

2 files changed

Lines changed: 9 additions & 14 deletions

File tree

openapi/components/tinynode-shared-components.openapi.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,8 @@ components:
9191
minimum: 0
9292
additionalProperties: true
9393
ErrorResponse:
94-
type: object
95-
description: Generic error envelope used across operations.
96-
properties:
97-
message:
98-
type: string
99-
error:
100-
type: string
101-
status:
102-
type: integer
103-
minimum: 100
104-
maximum: 599
105-
additionalProperties: true
94+
description: >-
95+
TinyNode emits plain-text error bodies (Content-Type: text/plain). The
96+
response body is the error message string; the HTTP status code carries
97+
the category. Consumers should not expect a structured JSON envelope.
98+
type: string

test/routes/mount.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ describe("Check to see that critical repo files are present", () => {
6565
assert.equal(fs.existsSync(`${filePath}README.md`), true)
6666
assert.equal(fs.existsSync(`${filePath}.gitignore`), true)
6767
assert.equal(fs.existsSync(`${filePath}package.json`), true)
68-
assert.equal(fs.existsSync(`${filePath}.github/workflows/shared_openapi_sync.yaml`), true)
69-
assert.equal(fs.existsSync(`${filePath}openapi/components/tinynode-shared-components.openapi.yaml`), true)
68+
assert.equal(fs.existsSync(`${filePath}.github/workflows/shared_openapi_sync.yaml`), true,
69+
"shared_openapi_sync.yaml workflow is missing — the receiver repo will stop receiving updates")
70+
assert.equal(fs.existsSync(`${filePath}openapi/components/tinynode-shared-components.openapi.yaml`), true,
71+
"canonical shared OpenAPI artifact is missing — sync workflow has nothing to publish")
7072
})
7173
})

0 commit comments

Comments
 (0)