json-schema-ref-parser
json-schema-ref-parser copied to clipboard
Change reference key name
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.