Open manchuwook opened 1 year ago
Just putting the demo code after adding the dependency in package.json, result.pointers is undefined.
import { parseWithPointers, safeParse, safeStringify } from "@stoplight/json"; const result = parseWithPointers(`{ "hello": "world", "address": { "street": 123 } }`); console.log(result.data); console.log(result.pointers);
(node:44456) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time (Use `node --trace-warnings ...` to show where the warning was created) { hello: 'world', address: { street: 123 } } undefined
It gives undefined
It should have a source map with multiple paths
node ./sample.mjs
{ //... other settings "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", "@openapi-contrib/json-schema-to-openapi-schema": "^2.2.4", "@openapitools/openapi-generator-cli": "^2.5.2", "@stoplight/json": "^3.20.1", "@stoplight/json-schema-merge-allof": "^0.7.8", "@stoplight/json-schema-ref-parser": "^9.2.2", "fs-extra": "^11.1.0", "json-schema-merge-allof": "^0.8.1", "json-schema-to-jsdoc": "^1.1.0", "node-glob": "^1.2.0", "openapi-types": "^12.1.0", "uuid": "^9.0.0" }, "devDependencies": { "@types/node": "^18.11.18" } }
Just putting the demo code after adding the dependency in package.json, result.pointers is undefined.
Context
Current Behavior
It gives undefined
Expected Behavior
It should have a source map with multiple paths
Possible Workaround/Solution
Steps to Reproduce
node ./sample.mjs
Environment