-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[codegen] Fix camel casing of punctuated properties #16197
base: master
Are you sure you want to change the base?
Conversation
Changelog[uncommitted] (2024-05-30)Bug Fixes
|
[OutputType] | ||
public sealed class Bar | ||
{ | ||
public readonly string? Has-a-hyphen; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a valid C# identifier.
import * as outputs from "../types/output"; | ||
|
||
export interface Bar { | ||
has-a-hyphen?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a valid TS identifier
I'm not confident this is actually correct. I don't see annotations being emitted to tell the SDK to serialise/deserialise to the wire protocol with the hyphenated names. There's also a bit of me that is not really keen on saying we support names like this in schema. I'd rather that the thing building the schema is responsible for coming up with "identifier like" names (e.g. fooBar, not foo-bar) rather than trying to make codegen deal with any possible string. See https://docs.google.com/document/d/1ns07htpLjw0dJPn5p7TBPVULvwwYc1Pl7l1c1jdGXoY/edit#heading=h.cpxu86q7zc1s for some discussion we've had around property/type naming systems in the past. This probably needs bringing to iac ideation meeting to be discussed. |
Description
Updates node and dotnet to use
cgstrings.Camel
in order to correctly remove punctuation.Fixes #15874.
Refs
auto-scaler
crd2pulumi#101Checklist
make tidy
to update any new dependenciesmake lint
to verify my code passes the lint checkgofumpt
make changelog
and committed thechangelog/pending/<file>
documenting my change