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

WIP: Typescript rewrite, test migration, code modernization #253

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jonluca
Copy link
Contributor

@jonluca jonluca commented Mar 7, 2024

Doing the same thing to swagger-parser as was done to https://github.com/APIDevTools/json-schema-ref-parser

There will be some breaking changes but this should get us to a point where the code is more modern, easier to develop on, and with fewer bugs. It will also let us bring in some of the niceties of the javascript ecosystem from the last few years.

Not really expecting anyone to review this - will go through and add tests as I find cases that need them, but this library is pretty much abandoned so going to take it over.

erunion added a commit to readmeio/oas that referenced this pull request Feb 13, 2025
## 🐳 Context

Now that our fork of
[@apidevtools/swagger-parser](https://npm.im/@apidevtools/swagger-parser)
has fully deviated and was moved here from [our other
repository](https://github.com/readmeio/openapi-parser) I have built off
of JonLuca's[^1] starting work over in
APIDevTools/swagger-parser#253 and rewritten the
library in TS.

This is all going to be the basis for a slew of forthcoming changes in
order to support error levels.

Because this is a full rewrite, and a lot of things have changed, this
will incur a major version bump.

## 🧰 Changes

* [x] Rewrote our OpenAPI parser in TS.
* [x] Added in dual support for CJS and ESM.
* [x] Resolved a number of test quirks and invalid false positive
assertions.

[^1]: Because I adapted heavily from his draft PR of this rewrite over
in the swagger-parser repository I've credited him as a co-author of
this work.

---------

Co-authored-by: JonLuca De Caro <[email protected]>
Co-authored-by: Kanad Gupta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant