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

Normalize enum member name #2839

Open
wants to merge 108 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
40a6714
Normalize enum key name
MaryGao Sep 25, 2024
3bd2ec2
Update the enum name
MaryGao Sep 25, 2024
740f6ee
Merge to the latest main
MaryGao Oct 23, 2024
30ec2bc
Merge remote-tracking branch 'origin/main' into pr/MaryGao/2839
MaryGao Oct 23, 2024
8b92d22
Update the enum key after merging to main
MaryGao Oct 23, 2024
e5b97f3
Update the api view
MaryGao Oct 23, 2024
849eec1
Update the UT cases
MaryGao Oct 24, 2024
aed78af
Merge branch 'main' into enum-key-name-norm
MaryGao Oct 30, 2024
025ec54
Revert un-necessary autorest changes
MaryGao Oct 30, 2024
96ce453
Refresh the integration testing for cadl-ranch
MaryGao Oct 30, 2024
898dd1c
Update smoke testings
MaryGao Oct 30, 2024
73ed758
Update smoke testings
MaryGao Oct 31, 2024
434d615
Remove useless codes
MaryGao Oct 31, 2024
994156c
Push un-necessary changes
MaryGao Oct 31, 2024
ce76162
Refactor useless codes
MaryGao Oct 31, 2024
30aa597
fix ci RLC generation
v-jiaodi Oct 31, 2024
5489ed9
Fix the failure cases
MaryGao Oct 31, 2024
e650058
regen smoke
v-jiaodi Oct 31, 2024
3594c8c
update unit test
v-jiaodi Oct 31, 2024
1f3f77a
Fix the autorest issue
MaryGao Oct 31, 2024
dc36cfd
fix rlc generation
v-jiaodi Oct 31, 2024
5fcfe91
Merge branch 'main' into enum-key-name-norm
MaryGao Nov 5, 2024
6dbe044
Add test cases
MaryGao Nov 6, 2024
05d60c6
Fix the ci issues
MaryGao Nov 6, 2024
e576e32
Update the main branch
MaryGao Nov 12, 2024
5a08286
Merge branch 'main' into pr/MaryGao/2839
MaryGao Nov 12, 2024
4938ea5
Fix the host name issue
MaryGao Nov 12, 2024
18d1ba3
Update the ignoreEnumMemberNameNormalize feature
MaryGao Nov 12, 2024
57bad0f
Update the package.json library name
MaryGao Nov 12, 2024
2e2f76d
Update the smoke test
MaryGao Nov 12, 2024
f6d8149
Format rlc-common types
MaryGao Nov 12, 2024
177b942
Fix lint issue
MaryGao Nov 12, 2024
65a55ae
Update the test cases
MaryGao Nov 12, 2024
bedc279
Fix the issue in autorest typescript repo
MaryGao Nov 12, 2024
ba3fbed
Update the load test smoke
MaryGao Nov 12, 2024
7d82484
Update the spec
MaryGao Nov 12, 2024
d9005b0
Fix the name issue in restore poller
MaryGao Nov 12, 2024
4b27213
regen smoke test
v-jiaodi Nov 12, 2024
1e750cd
Update the modular integration
MaryGao Nov 12, 2024
4d8cdf1
Merge branch 'enum-key-name-norm' of https://github.com/marygao/autor…
MaryGao Nov 12, 2024
322d1bd
Update the integration test
MaryGao Nov 12, 2024
7f1cbfa
Fix the modular UTs
MaryGao Nov 12, 2024
99c0a70
Update the test cases
MaryGao Nov 13, 2024
c6def9f
Update the UTs
MaryGao Nov 13, 2024
81d3d75
Update the test cases
MaryGao Nov 13, 2024
56f0598
Merge remote-tracking branch 'origin/main' into enum-key-name-norm
MaryGao Nov 14, 2024
d2353bc
Resolve conflicts
MaryGao Nov 14, 2024
64495b7
Update UTs
MaryGao Nov 14, 2024
5d49852
fix ci
v-jiaodi Nov 15, 2024
eb90494
Merge branch 'main' into enum-key-name-norm
MaryGao Nov 19, 2024
c064ec5
Improve the normalization algo for number and upper cases
MaryGao Nov 19, 2024
0d50e1e
Revert the change and update the codegen
MaryGao Nov 19, 2024
b9874d3
Update the format
MaryGao Nov 19, 2024
6029c41
Revert the breaking changes
MaryGao Nov 19, 2024
406ce02
Revert un-necessary changes
MaryGao Nov 19, 2024
4a5481b
Update the integration for rlc and modular
MaryGao Nov 19, 2024
dc7c870
Update the lint issues
MaryGao Nov 20, 2024
68bbb1c
Update the autorest smoke testing
MaryGao Nov 20, 2024
24527c6
Push rename file changes
MaryGao Nov 20, 2024
f4f07ad
Update the file name changes
MaryGao Nov 20, 2024
815b7dc
Update the normalize style
MaryGao Nov 20, 2024
690b921
Update the smoek test
MaryGao Nov 20, 2024
8a92de3
fix ci
v-jiaodi Nov 20, 2024
d7c1d61
update
v-jiaodi Nov 20, 2024
6139fe6
update
v-jiaodi Nov 20, 2024
4ab4e88
update
v-jiaodi Nov 20, 2024
7a01172
update dpgName
v-jiaodi Nov 20, 2024
cfd75a0
update dpgName
v-jiaodi Nov 20, 2024
75b3b63
Update the autorest cases in HLC
MaryGao Nov 20, 2024
4d4ae20
Merge remote-tracking branch 'mary/enum-key-name-norm' into pr/MaryGa…
MaryGao Nov 20, 2024
64afca5
Update the int test
MaryGao Nov 20, 2024
e2bedaa
Merge branch 'main' into enum-key-name-norm
MaryGao Nov 20, 2024
ec92f0b
fix ci
v-jiaodi Nov 20, 2024
1e7a7b6
Improve with number for prefix and suffix
MaryGao Nov 21, 2024
4379f99
fix ci
v-jiaodi Nov 21, 2024
541ab72
fix modular ut test
v-jiaodi Nov 21, 2024
5f8efcb
update modular ut case
v-jiaodi Nov 21, 2024
d7b302c
fix ci
v-jiaodi Nov 21, 2024
b7c2a83
Merge pull request #50 from v-jiaodi/test1121
MaryGao Nov 21, 2024
ce65b44
Update the logic only working for non interface like type
MaryGao Nov 21, 2024
cc8227d
Update the enum list
MaryGao Nov 21, 2024
1d31df2
Update the enum list
MaryGao Nov 21, 2024
c0abf84
Update the test cases
MaryGao Nov 21, 2024
ae5d155
Merge branch 'main' into enum-key-name-norm
MaryGao Nov 21, 2024
b2ac3d2
fix ci
v-jiaodi Nov 22, 2024
335dbea
Merge branch 'enum-key-name-norm' of https://github.com/MaryGao/autor…
v-jiaodi Nov 22, 2024
9580d6e
fix ci
v-jiaodi Nov 22, 2024
ea07e67
Merge branch 'main' into enum-key-name-norm
MaryGao Nov 22, 2024
f1ff320
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi Nov 22, 2024
4f40117
merge main
kazrael2119 Dec 11, 2024
c104234
merge to the latest main
MaryGao Jan 2, 2025
3a2fcd4
Merge remote-tracking branch 'origin/main' into enum-key-name-norm
MaryGao Jan 2, 2025
cab3694
update tsp
v-jiaodi Jan 2, 2025
29aff5a
Fix the duplicated template name issues
MaryGao Jan 2, 2025
03bd972
Merge branch 'enum-key-name-norm' of https://github.com/MARYGAO/autor…
MaryGao Jan 2, 2025
39fc763
Update the test cases in smoke testing
MaryGao Jan 2, 2025
1a4cf90
Revert the fix and split it into a new repo
MaryGao Jan 7, 2025
3c168ff
Update a dictionary to improve splitting words
MaryGao Jan 7, 2025
cfd6a24
Merge remote-tracking branch 'origin/main' into enum-key-name-norm
MaryGao Jan 7, 2025
a17750b
Revert word list changes
MaryGao Jan 7, 2025
cf01ad5
Revert the test cases
MaryGao Jan 7, 2025
9827649
Update the smoke test
MaryGao Jan 7, 2025
a8f8757
fix ci
kazrael2119 Jan 7, 2025
3a100be
Update modelsGenerator.spec.ts
kazrael2119 Jan 7, 2025
6dbeb37
fix ci
kazrael2119 Jan 8, 2025
80dee4d
Fix the failed UTs
MaryGao Jan 8, 2025
bf3d000
Update enumUnion.md
kazrael2119 Jan 8, 2025
a64819b
Update index.d.ts
kazrael2119 Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,14 @@
"name": "[RLC-Common] Debug Unit Test",
"request": "launch",
"cwd": "${workspaceFolder}/packages/rlc-common",
"runtimeArgs": ["mocha", "test/**/*.spec.ts"],
"runtimeArgs": [
"mocha",
"-r",
"ts-node/register",
"--loader=ts-node/esm",
"--experimental-specifier-resolution=node",
"test/**/*.spec.ts"
],
"runtimeExecutable": "npx",
"skipFiles": ["<node_internals>/**"],
"type": "pwa-node",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,40 @@ export enum KnownPetStatus {
Pending = "pending",
/** Sold */
Sold = "sold",
/** PascalCase1 */
PascalCase1 = "pascalCase1",
/** PascalCase2 */
PascalCase2 = "PascalCase2",
/** Pascalcase3 */
Pascalcase3 = "pascalcase3",
/** Pascalcase4 */
Pascalcase4 = "Pascalcase4",
/** PascalCase5 */
PascalCase5 = "pascal_case_5",
/** PascalCase6 */
PascalCase6 = "pascal_case6",
/** PascalCase7 */
PascalCase7 = "_pascal_case7",
/** PascalCase8 */
PascalCase8 = "pascal, case8",
/** MAXOfMLD */
MAXOfMLD = "MAX_of_MLD",
/** YESORNO */
YESORNO = "YES OR NO",
/** FailedNOTValidation */
FailedNOTValidation = "FAILED_NOT_VALIDATION",
/** ValidationSuccess */
ValidationSuccess = "VALIDATION_SUCCESS",
/** PascalCase6666 */
PascalCase6666 = "___pascal____case6666",
/** Ninety */
Ninety = "090",
/** One0 */
One0 = "1.0",
/** Select */
Select = "$select",
/** HateThreating */
HateThreating = "hate/threating",
}

/**
Expand All @@ -80,7 +114,24 @@ export enum KnownPetStatus {
* ### Known values supported by the service
* **available** \
* **pending** \
* **sold**
* **sold** \
* **pascalCase1** \
* **PascalCase2** \
* **pascalcase3** \
* **Pascalcase4** \
* **pascal_case_5** \
* **pascal_case6** \
* **_pascal_case7** \
* **pascal, case8** \
* **MAX_of_MLD** \
* **YES OR NO** \
* **FAILED_NOT_VALIDATION** \
* **VALIDATION_SUCCESS** \
* **___pascal____case6666** \
* **090** \
* **1.0** \
* **$select** \
* **hate\/threating**
*/
export type PetStatus = string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,40 @@ export enum KnownPetStatus {
Pending = "pending",
/** Sold */
Sold = "sold",
/** PascalCase1 */
PascalCase1 = "pascalCase1",
/** PascalCase2 */
PascalCase2 = "PascalCase2",
/** Pascalcase3 */
Pascalcase3 = "pascalcase3",
/** Pascalcase4 */
Pascalcase4 = "Pascalcase4",
/** PascalCase5 */
PascalCase5 = "pascal_case_5",
/** PascalCase6 */
PascalCase6 = "pascal_case6",
/** PascalCase7 */
PascalCase7 = "_pascal_case7",
/** PascalCase8 */
PascalCase8 = "pascal, case8",
/** MAXOfMLD */
MAXOfMLD = "MAX_of_MLD",
/** YESORNO */
YESORNO = "YES OR NO",
/** FailedNOTValidation */
FailedNOTValidation = "FAILED_NOT_VALIDATION",
/** ValidationSuccess */
ValidationSuccess = "VALIDATION_SUCCESS",
/** PascalCase6666 */
PascalCase6666 = "___pascal____case6666",
/** Ninety */
Ninety = "090",
/** One0 */
One0 = "1.0",
/** Select */
Select = "$select",
/** HateThreating */
HateThreating = "hate/threating",
}

/**
Expand All @@ -79,7 +113,24 @@ export enum KnownPetStatus {
* ### Known values supported by the service
* **available** \
* **pending** \
* **sold**
* **sold** \
* **pascalCase1** \
* **PascalCase2** \
* **pascalcase3** \
* **Pascalcase4** \
* **pascal_case_5** \
* **pascal_case6** \
* **_pascal_case7** \
* **pascal, case8** \
* **MAX_of_MLD** \
* **YES OR NO** \
* **FAILED_NOT_VALIDATION** \
* **VALIDATION_SUCCESS** \
* **___pascal____case6666** \
* **090** \
* **1.0** \
* **$select** \
* **hate\/threating**
*/
export type PetStatus = string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,28 @@
"status": {
"type": "string",
"description": "pet status in the store",
"enum": ["available", "pending", "sold"]
"enum": [
"available",
"pending",
"sold",
"pascalCase1",
"PascalCase2",
"pascalcase3",
"Pascalcase4",
"pascal_case_5",
"pascal_case6",
"_pascal_case7",
"pascal, case8",
"MAX_of_MLD",
"YES OR NO",
"FAILED_NOT_VALIDATION",
"VALIDATION_SUCCESS",
"___pascal____case6666",
"090",
"1.0",
"$select",
"hate/threating"
]
},
"petRestrictionLevel": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"prefix": "package-version"
},
{
"path": "src/dPGCustomizationClient.ts",
"path": "src/dpgCustomizationClient.ts",
"prefix": "userAgentInfo"
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import DPGCustomizationClient from "./dPGCustomizationClient";
import DPGCustomizationClient from "./dpgCustomizationClient";

export * from "./dPGCustomizationClient";
export * from "./dpgCustomizationClient";
export * from "./parameters";
export * from "./responses";
export * from "./clientDefinitions";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import LRORestClient from "./lRORestClient";
import LRORestClient from "./lroRestClient";

export * from "./lRORestClient";
export * from "./lroRestClient";
export * from "./parameters";
export * from "./responses";
export * from "./clientDefinitions";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import DPGClient from "./dPGClient";
import DPGClient from "./dpgClient";

export * from "./dPGClient";
export * from "./dpgClient";
export * from "./parameters";
export * from "./responses";
export * from "./clientDefinitions";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import DPGClient from "./dPGClient";
import DPGClient from "./dpgClient";

export * from "./dPGClient";
export * from "./dpgClient";
export * from "./parameters";
export * from "./responses";
export * from "./clientDefinitions";
Expand Down
4 changes: 2 additions & 2 deletions packages/rlc-common/src/helpers/nameConstructors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ export function getResponseBaseName(
return normalizeName(
`${operationGroup}_${normalizeName(
operationName,
NameType.Operation,
NameType.Interface,
true
)}_${statusCode}`,
)} ${statusCode}`, // since status code is a number, we use space to separate it from operationName
NameType.Interface
);
}
Expand Down
Loading
Loading