jdomenechb / json-dereferencer
PHP class to replace JSON references by their targets
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
Installs: 675
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/jdomenechb/json-dereferencer
Requires
- php: >=7.1
This package is auto-updated.
Last update: 2023-01-26 21:58:40 UTC
README
This project provides an interface and an implementation of a PHP class to replace JSON references by their targets.
Features
For now, it only supports $ref
paths starting with root element #
.
Example
Input:
{ "responses": { "200": { "description": "The response", "schema": { "$ref": "#/components/schemas/user" } } }, "components": { "schemas": { "user": { "type": "string", "format": "email" } } } }
Output:
{ "responses": { "200": { "description": "The response", "schema": { "type": "string", "format": "email" } } }, "components": { "schemas": { "user": { "type": "string", "format": "email" } } } }