Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liammartens/json-dereference
https://github.com/liammartens/json-dereference
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/liammartens/json-dereference
- Owner: LiamMartens
- Created: 2022-09-03T23:03:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-03T23:04:44.000Z (over 2 years ago)
- Last Synced: 2024-10-18T16:14:15.839Z (2 months ago)
- Language: TypeScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# json-deref
This is a very basic library to dereference JSON objects. It supports both local and remote references, but only supports root references (relative referencing is not supported).## Example
```js
import { dereference } from 'json-deref';await dereference({
obj: {
value: {
$ref: 'https://example.com/schema#/value',
},
},
}, {
loadSchema: async (url) => ({
value: 500,
})
})
```