Comments (2)
Shani Alaluf Shamah
Can you please clarify what value are you passing to $ref
, because I have tried passing to $ref
in YAML
array
,YAML object
,number
,boolean
, but all I get is
TypeError: ref.startsWith is not a function
- with absence of value (NOT
''
) andnull
I get
TypeError: Cannot read properties of null (reading 'startsWith')
-
with an empty string
''
the value is simply ignored (no exception thrown, execution successful) -
with
./
,/
,https...
,function
,undefined
Node.js gives various errors of failing to open or fetch file.
But no TypeError: Cannot read property 'startsWith' of undefined
So for now I cannot reproduce exactly your bug, to begin fixing it, on Node.js v16.17.0 and Node.js v18.9.0.
Maciej Urbańczyk solution
function isExternalReference(ref: string): boolean {
return typeof ref === 'string' && !ref.startsWith('#');
}
works - it makes bundler
ignore any value that is not a string
, thus might fix exactly your issue indirectly, so it definitely should be merged.
After this change is merged, please comment if exactly your issue was fixed.
from bundler.
User did not provide feedback, assuming issue fixed, resolved and closed.
from bundler.
Related Issues (20)
- base options not working as intended HOT 1
- Cleanup dependencies HOT 2
- Need for urgent changes in GitHub Actions automation HOT 1
- AsyncAPI spec v3 support in Bundler HOT 10
- Export flags to specify which spec is currently supported by bundler HOT 2
- Add option to specify baseFileDir or cwd HOT 5
- Refine AsyncAPI Bundling with Origin Tracing and Component Naming HOT 34
- Use @stoplight/json-ref-resolver instead of @apidevtools/json-schema-ref-parser HOT 4
- [Docs Bug 🐞 report]: Invalid usage example HOT 5
- Update README with new logo banner HOT 5
- Bundle references into components HOT 3
- Cannot bundle documents with different base paths HOT 9
- "invalid-yaml: The provided yaml is not valid" error when passing in JSON HOT 3
- Migrate bundler's codebase to TypeScript HOT 10
- Only `bundle` function should be exposed as part of public API HOT 3
- last release is broken without `lib` dir HOT 33
- Add missing release script to `package.json` HOT 4
- Document how to use package with `require` HOT 7
- Support `referenceIntoComponents` for other components than `message` HOT 55
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bundler.