json-schema-ref-parser icon indicating copy to clipboard operation
json-schema-ref-parser copied to clipboard

Change reference key name

Open Ohems opened this issue 8 years ago • 0 comments

Currently the library can only parse keys with the name $ref. This matches the JSON Schema specifications, but sometimes it may be useful to rename the key to for example $ref-parse.

One use case is with Swagger. The OpenAPI specification allows references in some places but disallows them in others. By using a special reference tag you could parse some of the references beforehand with json-schema-ref-parser and then allow some of them to pass through to the OpenAPI which can handle the rest of them.

Ohems avatar Oct 23 '17 12:10 Ohems