Apply brand-casing only to the definition-name segment of a `$ref`.
(ref: string)
| 161 | |
| 162 | /** Apply brand-casing only to the definition-name segment of a `$ref`. */ |
| 163 | function 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 | |
| 171 | function renameBrandDefinitionKeys(defs: Record<string, unknown>): void { |
| 172 | for (const oldKey of Object.keys(defs)) { |
no test coverage detected
searching dependent graphs…