Redocly / Redocly/redocly-cli

better error handling when $ref references an external file in asyncapi

Open
#1,543 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

$ref p2 Type: Enhancement
Dominant language
TypeScript
Stars
1.5k
Forks
228
Avg merge
1d 14h
Merged PRs (30d)
48

Description

Is your feature request related to a problem? Please describe.

I am building my pipelines to publish APIs and when I tried to bundle the asyncapi files I found the error below

Describe the solution you'd like

Support for bundling asyncapi files is the expected solution.

Describe alternatives you've considered

not much since bunding is the whole idea...

Additional context

The error shown now is:

Something went wrong when processing .\cache-messages-1.0.json:

  • Cannot read properties of undefined (reading 'schemas')

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing bundling with an AsyncAPI file whose $ref points to an external JSON file, using the reported cache-messages-1.0.json case. Trace the undefined schemas error and determine the required external-reference handling; done means AsyncAPI files bundle without this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.