Closed imolorhe closed 2 weeks ago
Latest commit: c04ef4ffa58af3622d9bf4ba19048e4ff3931823
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Name | Link |
---|---|
Latest commit | c04ef4ffa58af3622d9bf4ba19048e4ff3931823 |
Latest deploy log | https://app.netlify.com/sites/codemirror-json-schema/deploys/66780b76481fe70008f96301 |
Deploy Preview | https://deploy-preview-133--codemirror-json-schema.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
oh I love this!
@imolorhe my only question is, why do we make this disabled by default?
@acao didn't want to change more behavior than necessary. Enabling it by default causes a test case (json-validation > 'not handle invalid json'
) to fail because now it can handle invalid JSON. This behavior change is fine though so maybe we just enable it by default
@imolorhe sounds good to me!
normally for > 0.x I would tag a new feature as a minor release, but with 0.x I think we just patch
As mentioned in #132, the "calculated" sub schema for a path in the JSON document can change based on the values of other fields in the document.
json-schema-library
already has the feature to get schema with the data when the schema is dynamic.To retrieve the data, I added
best-effort-json-parser
so we can get some data even if the JSON document isn't in a valid JSON state (which is going to be the case while writing the document). Given a document in the following state:it is able to retrieve the data as:
...which is sufficient context (at least for all the existing test cases)
Other changes in this PR include:
DocumentParser
type and moved parsers into a separate directoryloglevel
for better log tracing (logs now point to the file the logs come from as opposed todebug.ts
)