oas-php / resolver
JSON Reference resolver
Installs: 17 285
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7.4
- ext-json: *
- nikic/iter: ^2.0
- psr/http-factory: ^1.0
- psr/simple-cache: ^1.0
Requires (Dev)
- cache/array-adapter: ^1.0
- guzzlehttp/psr7: ^1.1
- oas-php/sample: dev-master
- phpunit/phpunit: ^9.4
- symfony/yaml: ^5.1
Suggests
- cache/array-adapter: For caching require "cache/array-adapter:^1.0
- guzzlehttp/psr7: For working with URI's require "guzzlehttp/psr7:^1.1
- symfony/yaml: For decoding YAML documens require "symfony/yaml:^5.1
This package is auto-updated.
Last update: 2024-11-09 02:06:07 UTC
README
JSON Reference resolver
An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, $ref fields MUST be used in the specification to reference those parts as follows from the JSON Schema definitions.
This package is part of oas-php project and is used internally by oas-php/document
to resolve $ref's
. However, it's not confined just to OAS. In fact, it might be used with any document which uses JSON References.
installation
The oas-php/resolver
is a composer package. Install it by running:
composer req oas-php/resolver
The package dependency list is short as possible. However, I suggest installing a few optional packages, so you don't need to configure anything yourself.
usage
If you install suggested packages, the simplest use case may look like:
$resolved = (new Resolver)->resolve('https://oas-php.github.io/sample/theater/openapi.json');
See documentation to learn more.
license
MIT