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!: Support multiple clients in the same package #5

Merged
merged 2 commits into from
Jun 9, 2023

Conversation

erezrokah
Copy link
Member

Summary

Currently if you try to generate interfaces for multiple clients from the same package, they override each other and only one client is generated.
This PR adds support for generating multiple clients per package.


Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

Copy link
Member

@hermanschaaf hermanschaaf left a comment

Choose a reason for hiding this comment

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

💯

@erezrokah erezrokah added the automerge Add to automerge PRs once requirements are met label Jun 9, 2023
@kodiakhq kodiakhq bot merged commit db0fd3c into main Jun 9, 2023
@kodiakhq kodiakhq bot deleted the feat/support_multiple_clients_package branch June 9, 2023 16:12
@erezrokah erezrokah mentioned this pull request Jun 12, 2023
5 tasks
kodiakhq bot pushed a commit that referenced this pull request Jun 12, 2023

Follow up to #5.
At the moment all clients are generated under the `services` package, which means that if there are overlapping client names from different mocked packages their names will collide.
This PR puts each service clients in their own directory and package. The directory and package names are decided by looking at the longest common prefix of clients and removing it from the import path.

---
@cq-bot cq-bot mentioned this pull request Jun 12, 2023
kodiakhq bot pushed a commit that referenced this pull request Jun 12, 2023
🤖 I have created a release *beep* *boop*
---


## [0.3.0](v0.2.1...v0.3.0) (2023-06-12)


### ⚠ BREAKING CHANGES

* Service per dir ([#6](#6))
* Support multiple clients in the same package ([#5](#5))

### Features

* Service per dir ([#6](#6)) ([12795c8](12795c8))
* Support generic output type ([#1](#1)) ([f8dc681](f8dc681))
* Support multiple clients in the same package ([#5](#5)) ([db0fd3c](db0fd3c))
* Support packages versions greater than v1 ([#4](#4)) ([19193a6](19193a6))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Add to automerge PRs once requirements are met breaking feat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants