-
Notifications
You must be signed in to change notification settings - Fork 1
fix/internal json pointer bundling #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…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")) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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")) { |
There was a problem hiding this comment.
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?
🎉 This PR is included in version 1.0.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.