-
Notifications
You must be signed in to change notification settings - Fork 4k
Improve OpenAPI parsing errors #3555
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
🦋 Changeset detectedLatest commit: 636d324 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
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.
Pull Request Overview
This PR improves OpenAPI parsing error messages by making version-related errors more explicit and refactors some function names for clarity.
- Added explicit error handling for missing OpenAPI/Swagger versions with clearer error messages
- Refactored function and variable names for better clarity (cache vs weakmap, NoCache suffix)
- Updated test expectations to match the new error message format
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/openapi-parser/src/v3.ts | Added explicit version validation with improved error message and restructured validation logic |
packages/openapi-parser/src/parse.test.ts | Updated test to expect the new, more specific error message |
packages/gitbook/src/lib/openapi/resolveOpenAPIOperationBlock.ts | Renamed variables and functions for clarity (weakmap → cache, base → NoCache) |
packages/gitbook/src/lib/openapi/fetch.ts | Refactored function names and added documentation, plus a console.log statement |
.changeset/tough-beers-own.md | Added changeset for the OpenAPI parsing improvements |
We make the error more explicit, saying that we didn't find any version.
d67c455
to
636d324
Compare
We make the error more explicit, saying that we didn't find any version.