Skip to content

oas-php/resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oas-php / resolver

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