Skip to content

fix type error handler to handle allOf conflicting type #233

fix type error handler to handle allOf conflicting type

fix type error handler to handle allOf conflicting type #233

Triggered via pull request December 2, 2025 21:36
Status Failure
Total duration 15s
Artifacts

nodejs.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

3 errors
build
Process completed with exit code 1.
src/keyword-error-message.test.js > Error messages > there should be one type message per schema: src/keyword-error-message.test.js#L1861
AssertionError: expected [ { …(3) }, { …(3) } ] to deeply equal [ { …(3) } ] - Expected + Received [ { "instanceLocation": "#", "message": "The instance should be of type ⁨\"number\"⁩ but found ⁨\"string\"⁩.", - "schemaLocation": [ - "https://example.com/main#/allOf/0/type", - "https://example.com/main#/allOf/1/type", - ], + "schemaLocation": "https://example.com/main#/allOf/0/type", + }, + { + "instanceLocation": "#", + "message": "The instance should be of type ⁨\"number\"⁩ but found ⁨\"string\"⁩.", + "schemaLocation": "https://example.com/main#/allOf/1/type", }, ] ❯ src/keyword-error-message.test.js:1861:30
src/keyword-error-message.test.js > Error messages > can be a number and integer at the same time: src/keyword-error-message.test.js#L1787
AssertionError: expected [ { …(3) } ] to deeply equal [ { …(3) } ] - Expected + Received [ { "instanceLocation": "#", - "message": "The instance should be of type ⁨\"integer\"⁩ but found ⁨\"string\"⁩.", - "schemaLocation": [ - "https://example.com/main#/allOf/0/type", - "https://example.com/main#/allOf/1/type", - ], + "message": "Conflicting types found. A JSON value can't be more than one type at a time.", + "schemaLocation": "https://example.com/main#/allOf/0/type", }, ] ❯ src/keyword-error-message.test.js:1787:30