-
-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Labels
Description
Describe the bug
JSONPath fails in VM mode (eval: 'safe') but works in native mode.
Code sample or steps to reproduce
$..parameters..[?(@property !== 'properties' && @.example !== void 0 && (@.type || @.format || @.$ref || @.properties || @.items))]
{
"components": {
"schemas": {
"QueryCallbackResponse": {
"properties": {
"num_out": {
"description": "description",
"example": 123123123,
"format": "int32",
"title": "title",
"type": "integer"
}
},
"type": "object"
}
}
},
"openapi": "3.0.0",
"paths": {
"/brand/sample/querycallback": {
"get": {
"description": "description",
"operationId": "CallbackTesting",
"parameters": [
{
"description": "description",
"in": "query",
"name": "num_in",
"required": false,
"schema": {
"description": "description",
"example": 123123123123,
"format": "int32",
"title": "title",
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/QueryCallbackResponse"
}
}
},
"description": "description"
}
}
}
}
}
}
Console error or logs
Figure 1: JSONPath failure under VM (eval: 'safe')
Figure 2: Expected JSONPath result in native mode
Expected behavior
Expected result
[
{
"description": "description",
"example": 123123123123,
"format": "int32",
"title": "title",
"type": "integer"
}
]
Environment (IMPORTANT)
- JSONPath-Plus version: 10.3.0
Desktop**
- OS: Linux
- Browser and version: Node.js 20
Additional context
This behavior started occurring after upgrading to v10. No issues before v10.
From the changelog, I think the VM changes broke this.
80avin