You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Somehow it seems that the newly introduced Zalando rule 169 causes an issue in cases with null properties.
I stumbled over the issue in a case where a response example references an Example that contains a null property.
To better illustrate the issue, I created a draft PR that showcases it: #60
resonses:
...
application/json:
schema:
$ref: '#/components/schemas/Example'
examples:
default:
$ref: '#/components/examples/ExampleResponse'
...
components:
...
examples:
ExampleResponse:
summary: example response summary
value:
name: null # this null value causes the exception
This is the resulting stack trace:
TypeError: Cannot read properties of null (reading 'type')
at Object.$.paths..[?(@.type === 'string' && (@.format === 'date-time' || @.format === 'date' || @.format === 'time' || @.format === 'duration' || @.format === 'period'))] (eval at query (node_modules/nimma/dist/legacy/cjs/core/index.js:66:71), <anonymous>:117:31)
at eval (eval at query (node_modules/nimma/dist/legacy/cjs/core/index.js:66:71), <anonymous>:201:176)
at _traverseBody (node_modules/nimma/dist/legacy/cjs/runtime/traverse.js:13:5)
at _traverse (node_modules/nimma/dist/legacy/cjs/runtime/traverse.js:41:7)
at _traverseBody (node_modules/nimma/dist/legacy/cjs/runtime/traverse.js:17:5)
Side note: I'm not sure if the operator === is "standard" for JSONPath filters but it seems not to cause the issue. Never the less == seem to be more common.
The text was updated successfully, but these errors were encountered:
Somehow it seems that the newly introduced Zalando rule 169 causes an issue in cases with
null
properties.I stumbled over the issue in a case where a response example references an Example that contains a null property.
To better illustrate the issue, I created a draft PR that showcases it: #60
This is the resulting stack trace:
Side note: I'm not sure if the operator
===
is "standard" for JSONPath filters but it seems not to cause the issue. Never the less==
seem to be more common.The text was updated successfully, but these errors were encountered: