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(openapi-fetch): baseUrl per request #1817

Merged
merged 6 commits into from
Aug 18, 2024

Conversation

Gruak
Copy link
Contributor

@Gruak Gruak commented Aug 4, 2024

Changes

ref: #1633

Now baseUrl can be set per request and it should take precedence over baseUrl client option:

client.GET("/endpoint", {
  baseUrl: "https://api.example.com",
})

How to Review

The tests should pass.

Checklist

  • Unit tests updated
  • docs/ updated (if necessary)
  • pnpm run update:examples run (only applicable for openapi-typescript)

@Gruak Gruak requested a review from a team as a code owner August 4, 2024 18:45
Copy link

changeset-bot bot commented Aug 4, 2024

🦋 Changeset detected

Latest commit: 21a5e4c

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

This PR includes changesets to release 2 packages
Name Type
openapi-fetch Minor
openapi-react-query Major

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
Contributor

@kerwanp kerwanp left a comment

Choose a reason for hiding this comment

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

Great work!
Looks good to me, just two small comments. Happy to discuss about it if needed!

packages/openapi-fetch/test/index.test.ts Outdated Show resolved Hide resolved
.changeset/happy-singers-fry.md Outdated Show resolved Hide resolved
@kerwanp kerwanp added the openapi-fetch Relevant to the openapi-fetch library label Aug 10, 2024
@kerwanp kerwanp self-requested a review August 18, 2024 22:43
@kerwanp kerwanp merged commit 2a4b067 into openapi-ts:main Aug 18, 2024
7 checks passed
@@ -0,0 +1,5 @@
---
"openapi-fetch": minor
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note for next time: we’re using minor patches only for breaking changes while we’re on 0.x on openapi-fetch. patch includes feature additions and bugfixes before 1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openapi-fetch Relevant to the openapi-fetch library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants