JSON Schema input crashes on latest version
See original GitHub issueHello,
I’ve created a schema.json
using the introspection query shown by the documentation. However, when running the script to create the documentation page, I hit an issue right away:
Cannot read property '__schema' of undefined
A closer look at lib/schema-loader/json.js
shows this:
try {
var schemaPath = path_1.resolve(options.schemaFile);
var introspection = require(schemaPath);
return Promise.resolve(introspection.data.__schema);
}
Why is there an expectation of a data
field in the introspected schema.json
file? I am able to generate a documentation page by removing the data
field. But, I would like to know why the data field was put in the first place. I’m not sure if there are grave consequences to doing this. If this is an uncaught issue, I would be happy to open a PR 😄
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:5
Top Results From Across the Web
Rider crashes when custom JSON schema mapping for Azure ...
Rider crashes when custom JSON schema mapping for Azure Devops organization is specified : IDEA-288613.
Read more >Seggregation of Json Schema Validation and Json Validation
I have a use case where I will take a json-schema as input, validate it, then keep in my system. Later I will...
Read more >Release notes for SQL Server Management Studio (SSMS)
Selecting the Design option for a view that references a table using spatial data causes SSMS to crash. Use T-SQL to make changes...
Read more >JSON Schema Serializer and Deserializer
json.schema.spec.version Indicates the specification version to use for JSON schemas ... The current JSON Schema specific producer does not show a > prompt, ......
Read more >Specification - JSON Schema
The current version is 2020-12! The previous version was 2019-09. Specification documents #. See also the release notes / change log (Work in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ayyazdaniaryan Any updates on that PR? I’m willing to help with it.
Usually one would write the
data
as a JSON but it looks like the pure introspection result is used here. This works for me using schema.json:I’m putting the
result
into JSON.stringify, notresult.data
.And execute: