Closed junsred closed 1 year ago
Hi @junsred,
If a reference starts with #
it means you're pointing to some resource inside the current file (please check the JSON pointer reference). In your example you're pointing to an external file (Error.yaml
). So you probably have to use something like $ref: './definitions/components/schemas/Error.yaml'
. The actual path will depend on how your folders are structured. I believe there's no legitimate way to define a root folder inside the OpenAPI definition.
BTW, it might be working in the preview because we cache the latest successful bundle.
Closing this as not active.
https://github.com/Redocly/openapi-starter/tree/main/openapi/paths#drawbacks-2
it is possible to use this way
$ref: '#/definitions/components/schemas/Error.yaml'
but extension shows error even though in preview it works