microsoft / microsoft/typespec

[http-client-java] codegen, ServiceVersion will be created multiple times when there are multiple clients

Open
#7,734 0 comments 0 reactions 1 assignee Claimed by @haolingdong-msft View on GitHub
emitter:client:java
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

**Reproduce:**
Use [Communication.Messages](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/communication/Communication.Messages) to generate

**Output:**
There will be warning saying duplicate files found.
![Image](https://github.com/user-attachments/assets/43bf72f3-d44d-4b99-818f-3afd7ed44257)

**Root cause:**

service version are created multiple times in below part of code:

https://github.com/microsoft/typespec/blob/main/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/Javagen.java#L216-L226

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.