Commit 8992ba9
Fix GitHub brand casing in SDK public surface (#1531)
* Fix GitHub brand casing in SDK public surface
Generated identifiers and docs spelled the brand as "Github" instead of
"GitHub". The names derive from schema titles/definition keys and from
lowercase wire values, so the fix is applied in codegen rather than by
hand-editing generated output.
- scripts/codegen/utils.ts: add shared brand normalization (loadSchemaJson)
that corrects title/description/markdownDescription, \ name segments,
and definitions/\ keys, with collision detection. Wire values such as
"github" and "github_reference" are left lowercase.
- Per-language casers fixed: typescript, python, csharp (fixBrandCasing),
rust (normalizeSchemaBrandCasing + fixBrandCasing), and go via the existing
identifier override map ("github" -> "GitHub").
- java/scripts/codegen/java.ts: local copies of the same helpers wired into
toPascalCase/toJavaClassName and the schema load sites.
- Regenerated nodejs, dotnet, python, go, and rust outputs.
- Java attachment union types are no longer emitted by the generator (Object
fallback for the 5-branch anyOf); hand-corrected the casing and renamed the
stale UserMessageAttachment*/SendAttachment* GitHub reference files.
- Updated E2E tests referencing the renamed symbols (go, dotnet, python, rust)
and corrected GitHubToken casing in docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Use order-insensitive stable stringify for Java codegen collision check
renameBrandDefinitionKeys compared schema fragments with JSON.stringify,
which is sensitive to object key order and could report false-positive
collisions (or miss real ones). Add a local key-sorted stableStringify
helper (mirroring scripts/codegen/utils.ts) and use it for the check.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 5995295 commit 8992ba9
35 files changed
Lines changed: 604 additions & 418 deletions
File tree
- .github/agents
- docs
- auth
- setup
- troubleshooting
- dotnet
- src/Generated
- test/E2E
- go
- internal/e2e
- rpc
- java
- scripts/codegen
- src/generated/java/com/github/copilot/generated
- rpc
- nodejs/src/generated
- python
- copilot/generated
- rust
- src/generated
- tests/e2e
- scripts/codegen
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
| 380 | + | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
| 398 | + | |
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments