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

fix: sanitize "+" in uri #1687

Merged
merged 4 commits into from
Feb 10, 2025
Merged

fix: sanitize "+" in uri #1687

merged 4 commits into from
Feb 10, 2025

Conversation

hunshcn
Copy link
Contributor

@hunshcn hunshcn commented Feb 8, 2025

No description provided.

Signed-off-by: hunshcn <hunsh.cn@gmail.com>
Copy link

stackblitz bot commented Feb 8, 2025

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

changeset-bot bot commented Feb 8, 2025

🦋 Changeset detected

Latest commit: e8b3058

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hey-api/openapi-ts Patch

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

Copy link

vercel bot commented Feb 8, 2025

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

Name Status Preview Comments Updated (UTC)
hey-api-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 9, 2025 11:20am

@mrlubos
Copy link
Member

mrlubos commented Feb 8, 2025

Hi @hunshcn, just to clarify, are you still working with the legacy parser? What's your configuration?

Regarding this pull request, please add a change log (pnpm changeset) and ideally there'd be an actual specification test with a snapshot. But if this is only for the legacy parser, you can skip that!

@hunshcn
Copy link
Contributor Author

hunshcn commented Feb 8, 2025

Hi @hunshcn, just to clarify, are you still working with the legacy parser? What's your configuration?

I has a endpoint contains "+". The uri like /api/v1/resources+overview.

After convert openapi-ts -i path/to/openapi.json -o src/client -c @hey-api/client-fetch, I will get a function named apiV1Resources+overview which is incorrect.

@mrlubos
Copy link
Member

mrlubos commented Feb 8, 2025

Yeah that makes sense. Are you able to add the requested changes?

Copy link

codecov bot commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.16%. Comparing base (1df55ed) to head (e8b3058).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1687   +/-   ##
=======================================
  Coverage   57.16%   57.16%           
=======================================
  Files         189      189           
  Lines       25620    25620           
  Branches     1911     1911           
=======================================
  Hits        14646    14646           
  Misses      10965    10965           
  Partials        9        9           
Flag Coverage Δ
unittests 57.16% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

pkg-pr-new bot commented Feb 8, 2025

Open in Stackblitz

@hey-api/client-axios

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/client-axios@1687

@hey-api/client-fetch

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/client-fetch@1687

@hey-api/client-next

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/client-next@1687

@hey-api/client-nuxt

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/client-nuxt@1687

@hey-api/openapi-ts

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/openapi-ts@1687

commit: e8b3058

@mrlubos
Copy link
Member

mrlubos commented Feb 8, 2025

Thank you @hunshcn! I will aim to release this by Monday

@mrlubos mrlubos merged commit 1de7641 into hey-api:main Feb 10, 2025
17 checks passed
@github-actions github-actions bot mentioned this pull request Feb 10, 2025
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.

2 participants