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

Remove CLI ESBuild step #161

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Remove CLI ESBuild step #161

merged 2 commits into from
Apr 16, 2024

Conversation

blomqma
Copy link
Owner

@blomqma blomqma commented Apr 15, 2024

This fix aims to address various ESBuild issues of users by removing the ESBuild step from the CLI
commands and parsing parsing the OpenAPI spec
directly from TS/JS files without any build step by using tsx.

The generate and validate functions are now
also exposed as entry points for the ESBuild output, allowing those functions to be used for custom CLIs.

The second commit also includes verifying that the CLI commands work with third-party dependencies, raised in this PR: #160

This fix aims to address various ESBuild issues of
users by removing the ESBuild step from the CLI
commands and parsing parsing the OpenAPI spec
directly from TS/JS files without any build step by
using tsx.

The `generate` and `validate` functions are now
also exposed as entry points for the ESBuild output,
allowing those functions to be used for custom CLIs.
Copy link

vercel bot commented Apr 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-rest-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 16, 2024 10:45pm
next-rest-framework-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 16, 2024 10:45pm

This allows testing that API routes with third-party dependencies
like JSDom don't cause issues in the OpenAPI generation.

This commit also adds an example on writing custom scripts
for generating/validating the OpenAPI spec.

The deep object comparison as part of the OpenAPI
generation/validation is also replaced with a faster
stringified comparison between the generated and
existing OpenAPI specs.

Co-authored-by: Austin Kelleher <[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