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

build: generate client with openapi-typescript #274

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

rafaelcr
Copy link
Collaborator

@rafaelcr rafaelcr commented Oct 9, 2024

This PR refactors the TS client to be generated with openapi-typescript instead of swagger-codegen. This allows us to ship it for recent node and typescript versions.

Fixes #268
Fixes #193

Copy link

github-actions bot commented Oct 9, 2024

Vercel deployment URL: https://token-metadata-cyhoaearf-hirosystems.vercel.app 🚀

"scripts": {
"prepublishOnly": "npm run build",
"build": "rimraf ./lib && npm run build:client --prefix .. && npm run build:node && npm run build:browser",
"build:node": "tsc && cp -R src/generated lib/generated",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@zone117x I noticed you didn't copy the generated types to the lib dir in the Stacks API client. Not sure why that never worked for me in my tests so I had to do this instead. I also tried including the src directory in the "files" entry in this file but it made no difference because the included path was still incorrect.

Let me know if you have other ideas.

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
1 participant