mlambley / json-reference
A library for working with JSON References
Installs: 33 005
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 8
Open Issues: 0
Requires
- php: >=5.6.0
- psr/simple-cache: ^1.0
- sabre/uri: ^1.2.1
Requires (Dev)
- ext-curl: *
- cache/array-adapter: ^0.4.2
- cache/predis-adapter: ^0.4.0
- cache/simple-cache-bridge: ^0.1.0
- peterpostmann/fileuri: ^1.0
- phpbench/phpbench: ^0.13.0
- phpunit/phpunit: ^5.7
- scrutinizer/ocular: ~1.1
- squizlabs/php_codesniffer: ~2.3
- symfony/yaml: ^3.3
Suggests
- peterpostmann/fileuri: Returns a file uri from a path
- symfony/yaml: Load schemes from yaml files
This package is auto-updated.
Last update: 2024-12-17 15:05:50 UTC
README
Maintained Once Again!
This project was originally forked from thephpleague who is no longer maintaining it. However this library is the best json dereferencer I can find, so I will continue to maintain it.
Please log any issues or feature requests here
Most JSON schemas use JSON references to minimize duplication. A JSON reference is an object that looks like {"$ref": "http://some/where"} and points to a JSON object somewhere else.
JSON Reference is a library for resolving references.
- Resolves all references, replacing them with proxy objects.
- Supports references to external files, urls, or custom sources.
- Safely resolves circular references.
- Supports caching dereferenced schemas.
- Dereferenced schemas can be safely json_encoded.
- Works with Swagger, JSON Schema, and any other spec compliant JSON documents.
Install
Via Composer
composer require mlambley/json-reference
Usage
Complete documentation is available here
Change log
Please see CHANGELOG for more information about what has changed recently.
Testing
$ composer test-server
$ composer test
Benchmarks
The benchmarks require a local redis server to be running on localhost at the default port.
$ composer bench
Contributing
Please see CONTRIBUTING for details.
Credits
- [Matt Allan][link-author]
- [All Contributors][link-contributors]
License
The MIT License (MIT). Please see License File for more information.