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

Understanding CatalogsClient #4

Open
karoldeland opened this issue Jan 25, 2024 · 2 comments
Open

Understanding CatalogsClient #4

karoldeland opened this issue Jan 25, 2024 · 2 comments

Comments

@karoldeland
Copy link

Hi @mehdihadeli,
Great work in this template. I believe it's the better template out there. If possible, I would like to understand the benefit of having the CatalogApiClient in the Vertical.Slice.Template project. If I understand correctly, it's only used by tests and it's a client class targeting the product API in the same assembly. For me, it feels like a circular dependency. Could you explain a little?

Thank you for you work.

@karoldeland
Copy link
Author

Would be great if you can explain the purpose of the Vertical.Slice.Template.ApiClient project too.

@mehdihadeli
Copy link
Owner

Hi,
Thanks for your feedback.
I will refactor this template and add some new features soon :)
Regarding APIClient this is just a sample for some use cases in microservices world, for example we have a customer microservice and we need to call catalogs api endpoints on top of catalog api address, for doing this we should configure catalog address in our Client csproj, It will create all needed code for calling catalog micro. but this client project is not mandatory and I should create some flag like dotnet new generate-api-client --source=http://localhost:4000/swagger/v1/swagger.json --name="CatalogsApiClient" for generating it optionally.

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

No branches or pull requests

2 participants