MCPcopy Index your code
hub / github.com/github/copilot-sdk / fixBrandRef

Function fixBrandRef

scripts/codegen/utils.ts:163–169  ·  view source on GitHub ↗

Apply brand-casing only to the definition-name segment of a `$ref`.

(ref: string)

Source from the content-addressed store, hash-verified

161
162/** Apply brand-casing only to the definition-name segment of a `$ref`. */
163function fixBrandRef(ref: string): string {
164 const lastSlash = ref.lastIndexOf("/");
165 if (lastSlash === -1) return ref;
166 const prefix = ref.slice(0, lastSlash + 1);
167 const name = ref.slice(lastSlash + 1);
168 return `${prefix}${fixBrandCasing(name)}`;
169}
170
171function renameBrandDefinitionKeys(defs: Record<string, unknown>): void {
172 for (const oldKey of Object.keys(defs)) {

Callers 1

normalizeBrandCasingNodeFunction · 0.70

Calls 1

fixBrandCasingFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…