raystack / raystack/chronicle

feat: support external $ref resolution in OpenAPI loader

Open
#130 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2
Forks
1
Avg merge
12h 29m
Merged PRs (30d)
12

Description

Problem

`src/lib/openapi.ts` only resolves internal `#/` JSON pointer references. External file references (e.g. `$ref: './common/errors.yaml'`) fail silently, resulting in unresolved `$ref` objects appearing in the rendered API docs.

The V2→V3 conversion is also incomplete:

  • Ignores `consumes`/`produces` fields (assumes JSON for everything)
  • Doesn't convert all security scheme types
  • Missing request/response examples

Suggested Fix

  • For external file refs, resolve relative to the spec file's directory
  • For the V2 conversion, carry over `consumes`/`produces` as content type entries in V3 request/response objects

Contributor guide

No contributing guide indexed for this repository

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 in src/lib/openapi.ts by tracing external $ref handling and the V2→V3 conversion. Check how references are resolved relative to the spec file, then verify that consumes/produces become content-type entries and that the listed conversion gaps are covered. Done means external references no longer remain unresolved in rendered API docs and the specified V2 fields are preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.