Skip to content
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

feat(breaking): dropping support for callback handling #289

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

erunion
Copy link
Member

@erunion erunion commented Jan 30, 2025

🧰 Changes

In order to update this library to support the newest version of json-schema-ref-parser we're dropping support for callbacks.

@erunion erunion added the enhancement New feature or request label Jan 30, 2025
@erunion erunion requested a review from kanadgupta January 30, 2025 20:37
@@ -71,6 +71,10 @@ import OpenAPIParser from '@readme/openapi-parser';

## Differences from `@apidevtools/swagger-parser`

The methods on `@readme/openapi-parser`, unlike `@apidevtools/swagger-parser`, do not support callbacks.
Copy link
Member

Choose a reason for hiding this comment

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

@@ -26,7 +26,7 @@ function validateSpec(api) {
const path = api.paths[pathName];
const pathId = `/paths${pathName}`;

if (path && pathName.indexOf('/') === 0) {
if (path && pathName.startsWith('/')) {
Copy link
Member

Choose a reason for hiding this comment

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

more like es-boomer syntax amirite

Copy link
Member

Choose a reason for hiding this comment

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

doesn't have to happen in this PR obviously but if we plan on maintaining this long term i think we should probably just do a proper conversion to TS?

Copy link
Member Author

Choose a reason for hiding this comment

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

yea working on it now 🙃

Copy link
Member

Choose a reason for hiding this comment

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

wild how much bloat callbacks support added to this file. woof

@erunion erunion merged commit 8c880e6 into main Jan 31, 2025
7 checks passed
@erunion erunion deleted the chore/drop-callbacks branch January 31, 2025 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants