Skip to content

fix: replace @redocly/openapi-core with @readme/openapi-parser for $ref resolution#2563

Merged
stijnvanhulle merged 2 commits intochore/remove-redoclyfrom
copilot/sub-pr-2555
Feb 23, 2026
Merged

fix: replace @redocly/openapi-core with @readme/openapi-parser for $ref resolution#2563
stijnvanhulle merged 2 commits intochore/remove-redoclyfrom
copilot/sub-pr-2555

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

@redocly/openapi-core was throwing MissingPointerError for $ref pointers like #/definitions/enumNames.Type because redocly's bundler couldn't handle certain pointer tokens. Replaced it with @readme/openapi-parser (bundle()) which correctly resolves both local and external $refs.

🎯 Changes

  • @kubb/oas – Removed @redocly/openapi-core dependency. parse() now calls @readme/openapi-parser's bundle() when given a file path or URL to resolve external $refs before handing off to OASNormalize. Inline YAML/JSON strings skip bundling and fall through directly. Bundling failures are non-fatal — a warning is logged and parsing continues without bundling.
  • @kubb/plugin-oas – Updated plugin to align with the new parse() signature.
  • Tests – Added petStoreExternalFileRef.yaml + category.yaml mocks; added utils.spec.ts cases for external file ref and remote URL ref resolution; updated snapshots affected by the changed ref handling.
  • Changeset – Patch changeset added for @kubb/oas and @kubb/plugin-oas.
# petStoreExternalFileRef.yaml – now correctly resolves
components:
  schemas:
    Pet:
      properties:
        category:
          $ref: './category.yaml#/components/schemas/Category'
        category2:
          $ref: 'https://petstore3.swagger.io/api/v3/openapi.json#/components/schemas/Category'

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is for the docs (no release).

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@changeset-bot
Copy link

changeset-bot bot commented Feb 23, 2026

🦋 Changeset detected

Latest commit: 669b07e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@kubb/oas Patch
@kubb/plugin-oas Patch
@kubb/cli Patch
@kubb/plugin-client Patch
@kubb/plugin-cypress Patch
@kubb/plugin-faker Patch
@kubb/plugin-mcp Patch
@kubb/plugin-msw Patch
@kubb/plugin-react-query Patch
@kubb/plugin-redoc Patch
@kubb/plugin-solid-query Patch
@kubb/plugin-svelte-query Patch
@kubb/plugin-swr Patch
@kubb/plugin-ts Patch
@kubb/plugin-vue-query Patch
@kubb/plugin-zod Patch
@kubb/agent Patch
kubb Patch
@kubb/core Patch
@kubb/mcp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI changed the title [WIP] Fix missing pointer error due to removal of redocly fix: replace @redocly/openapi-core with @readme/openapi-parser for $ref resolution Feb 23, 2026
Copilot AI requested a review from stijnvanhulle February 23, 2026 10:31
@stijnvanhulle stijnvanhulle marked this pull request as ready for review February 23, 2026 10:31
@dosubot
Copy link

dosubot bot commented Feb 23, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@dosubot dosubot bot added @kubb/plugin-oas bug Something isn't working labels Feb 23, 2026
@stijnvanhulle stijnvanhulle merged commit 4a29103 into chore/remove-redocly Feb 23, 2026
5 checks passed
@stijnvanhulle stijnvanhulle deleted the copilot/sub-pr-2555 branch February 23, 2026 10:34
@github-actions github-actions bot mentioned this pull request Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working @kubb/plugin-oas

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants