Skip to content

Commit fca1dc9

Browse files
Add Java @clientName renames for Operations and SubNamespace in multiple-services spec (#4221)
- [x] Add `@clientName` Java renames for Operations and SubNamespace in multiple-services spec - [x] Add changelog entry via `.chronus/changes/` --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
1 parent 7e12204 commit fca1dc9

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
3+
changeKind: feature
4+
packages:
5+
- "@azure-tools/azure-http-specs"
6+
---
7+
8+
Add `@clientName` Java-scoped renames for `Operations` and `SubNamespace` in the multiple-services spec to avoid name collisions in Java codegen.

packages/azure-http-specs/specs/service/multiple-services/main.tsp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import "@typespec/versioning";
22
import "@typespec/http";
33
import "@typespec/spector";
4+
import "@azure-tools/typespec-client-generator-core";
45

56
using Versioning;
67
using Http;
78
using Spector;
9+
using Azure.ClientGenerator.Core;
810

911
namespace Service.MultipleServices;
1012

@@ -20,6 +22,7 @@ namespace ServiceA {
2022
av2,
2123
}
2224

25+
@clientName("AOperations", "java")
2326
interface Operations {
2427
@scenario
2528
@scenarioDoc("""
@@ -34,6 +37,7 @@ namespace ServiceA {
3437
opA(@query("api-version") apiVersion: VersionsA): void;
3538
}
3639

40+
@clientName("ASubNamespace", "java")
3741
namespace SubNamespace {
3842
@scenario
3943
@scenarioDoc("""
@@ -61,6 +65,7 @@ namespace ServiceB {
6165
bv2,
6266
}
6367

68+
@clientName("BOperations", "java")
6469
interface Operations {
6570
@scenario
6671
@scenarioDoc("""
@@ -75,6 +80,7 @@ namespace ServiceB {
7580
opB(@query("api-version") apiVersion: VersionsB): void;
7681
}
7782

83+
@clientName("BSubNamespace", "java")
7884
namespace SubNamespace {
7985
@scenario
8086
@scenarioDoc("""

0 commit comments

Comments
 (0)