@@ -146,7 +146,7 @@ export function normalizeOperationIds(operations: ResolvedOperation[], apiBuilde
146146  operations . forEach ( operation  =>  { 
147147    const  normalizedOperationId  =  apiBuilder . createNormalizedOperationId ?.( operation )  ??  operation . operationId 
148148    // '-' is a slugified slash in the middle of a normalizedOperationId that should also be removed for a proper matching during comparison 
149-     normalizedOperationIdToOperation [ takeSubstringIf ( ! ! groupSlug ,   normalizedOperationId ,  groupSlug . length   +   '-' . length ) ]  =  operation 
149+     normalizedOperationIdToOperation [ removeGroupPrefixFromOperationId ( normalizedOperationId ,  groupSlug ) ]  =  operation 
150150  } ) 
151151  return  [ Object . keys ( normalizedOperationIdToOperation ) ,  normalizedOperationIdToOperation ] 
152152} 
@@ -268,13 +268,13 @@ export function createOperationChange(
268268  const  impactedSummary  =  calculateImpactedSummary ( [ changeSummary ] ) 
269269
270270  const  currentOperationFields  =  current  &&  { 
271-     operationId : takeSubstringIf ( ! ! currentGroup ,   current . operationId ,  removeFirstSlash ( currentGroup  ??  '' ) . length ) , 
271+     operationId : removeGroupPrefixFromOperationId ( current . operationId ,  currentGroup  ??  '' ) , 
272272    apiKind : current . apiKind , 
273273    metadata : getOperationMetadata ( current ) , 
274274  } 
275275
276276  const  previousOperationFields  =  previous  &&  { 
277-     previousOperationId : takeSubstringIf ( ! ! previousGroup ,   previous . operationId ,  removeFirstSlash ( previousGroup  ??  '' ) . length ) , 
277+     previousOperationId : removeGroupPrefixFromOperationId ( previous . operationId ,  previousGroup  ??  '' ) , 
278278    previousApiKind : previous . apiKind , 
279279    previousMetadata : getOperationMetadata ( previous ) , 
280280  } 
@@ -288,3 +288,7 @@ export function createOperationChange(
288288    ...previousOperationFields , 
289289  } 
290290} 
291+ 
292+ export  const  removeGroupPrefixFromOperationId  =  ( operationId : string ,  groupPrefix : string ) : string  =>  { 
293+   return  takeSubstringIf ( ! ! groupPrefix ,  operationId ,  removeFirstSlash ( groupPrefix ) . length  +  '-' . length ) 
294+ } 
0 commit comments