Dereference schemas
- Dominant language
- JavaScript
- Stars
- 724
- Forks
- 150
- Avg merge
- 18h 22m
- Merged PRs (30d)
- 4
Description
I encountered an issue when I used my custom metaschema that uses the "allOf" keyword to extend the base JSON Schema draft.
```js
{
"$schema": "http://json-schema.org/schema",
"$id": "https://schemas.tf/json/metaschema/1-0-0",
"title": "Core schema meta-schema",
"allOf": [
{
"properties": {
"tfs_custom_prop": {
"type": "boolean",
"default": false
},
// more custom keywords
}
},
{
"$ref": "http://json-schema.org/draft/2019-09/schema#"
}
]
}
```
However, jsonschema2md fails to handle the external reference to `http://json-schema.org/draft/2019-09/schema#` and throws an error
```
[ERROR] { Error: can't resolve reference http://json-schema.org/draft/2019-09/schema# from id https://schemas.tf/json/metaschema/1-0-0#
(No stack trace)
```
I can work around this by dereferencing my metaschema before using it with `jsonschema2md` but it would be ideal if jsonschema2md had an option to enable deferencing.
Would you accept a PR for this enhancement?
Contributor guide
Research direction
Start by reproducing the reported failure with the custom metaschema and its external draft-2019-09 reference. Read the jsonschema2md entry point and existing option handling, then verify that an opt-in dereferencing option resolves the reference and preserves the generated Markdown output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100