Skip to content

Conversation

carson2222
Copy link
Member

No description provided.

…dling

- Add shouldInlineInternal helper to determine when internal refs should be copied inline
- Internal refs under #/paths/ are now dereferenced (copied) instead of left as
- Components/schemas, definitions, and declarations still preserved as refs
lib/bundle.ts Outdated
if (!h || h === "#") {
return false;
}
if (h.startsWith("#/components/schemas") || h.indexOf("/definitions") !== -1 || h.startsWith("#/declarations")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you

  • use indexOf for definitions but startsWith for the rest?
  • write it as /definitions and not #/definitions (with pound sign) like the rest
  • mention #/declarations? Where do those come from? It's not an OpenAPI 2.0/3.0/3.1 concept as far as I know

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I mush have used some weird website to base it on lol
I cleaned it up

lib/bundle.ts Outdated
if (!h || h === "#") {
return false;
}
if (h.startsWith("#/components/schemas") || h.startsWith("#/definitions")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean why even do these checks when all we care about is whether it starts with paths? This is all redundant no?

@carson2222 carson2222 changed the title Fix/internal json pointer bundling fix/internal json pointer bundling Sep 1, 2025
@carson2222 carson2222 merged commit 5a801bf into main Sep 1, 2025
12 checks passed
@carson2222 carson2222 deleted the fix/internal-json-pointer-bundling branch September 1, 2025 10:40
Copy link

github-actions bot commented Sep 1, 2025

🎉 This PR is included in version 1.0.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants