Improve constant value names
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 90
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 156
Description
> Migrated from https://github.com/Azure/autorest.go/issues/1689
---
In [`types.ts@getConstantValues()`](https://github.com/Azure/autorest.go/blob/main/packages/typespec-go/src/tcgcadapter/types.ts#L609) we call `naming.ensureNameCase()` which, as part of its work, calls [`deconstruct()`](https://github.com/Azure/autorest.go/blob/main/packages/naming.go/src/naming.ts#L69-L75) to split names into chunks.
This has some reasonable behavior, e.g. `user,system` is renamed to `UserSystem`. However, there are some screwy cases. This list isn't meant to be exhaustive but shows some cases that were noticed.
- `v1_0` becomes `V10`
- `application/*+json` becomes `ApplicationJSON`
- `3.14` becomes `314`
While it would be nice to fix this, it would result in breaking changes.
Contributor guide
Assessment
This issue has not been assessed yet.