1- import type { IR } from " ../../../ir/types" ;
2- import { stringCase } from " ../../../utils/stringCase" ;
3- import { sanitizeNamespaceIdentifier } from " ../../common/parser/sanitize" ;
4- import type { State } from " ../types/state" ;
1+ import type { IR } from ' ../../../ir/types' ;
2+ import { stringCase } from ' ../../../utils/stringCase' ;
3+ import { sanitizeNamespaceIdentifier } from ' ../../common/parser/sanitize' ;
4+ import type { State } from ' ../types/state' ;
55
66/**
77 * Verifies that operation ID is unique. For now, we only warn when this isn't
@@ -17,7 +17,7 @@ export const ensureUniqueOperationId = ({
1717} : {
1818 context : IR . Context ;
1919 id : string | undefined ;
20- method : IR . OperationObject [ " method" ] ;
20+ method : IR . OperationObject [ ' method' ] ;
2121 operationIds : Map < string , string > ;
2222 path : keyof IR . PathsObject ;
2323} ) => {
@@ -28,10 +28,10 @@ export const ensureUniqueOperationId = ({
2828 const operationKey = `${ method . toUpperCase ( ) } ${ path } ` ;
2929
3030 if ( operationIds . has ( id ) ) {
31- if ( context . config . logs . level !== " silent" ) {
31+ if ( context . config . logs . level !== ' silent' ) {
3232 // TODO: parser - support throw on duplicate
3333 console . warn (
34- `❗️ Duplicate operationId: ${ id } in ${ operationKey } . Please ensure your operation IDs are unique. This behavior is not supported and will likely lead to unexpected results.`
34+ `❗️ Duplicate operationId: ${ id } in ${ operationKey } . Please ensure your operation IDs are unique. This behavior is not supported and will likely lead to unexpected results.` ,
3535 ) ;
3636 }
3737 } else {
@@ -57,29 +57,29 @@ export const operationToId = ({
5757 id : string | undefined ;
5858 method : string ;
5959 path : string ;
60- state : Pick < State , " ids" > ;
60+ state : Pick < State , ' ids' > ;
6161} ) : string => {
6262 let result : string ;
6363
6464 const { output } = context . config ;
6565 const targetCase =
66- ( output !== void 0 && " case" in output ? output . case : void 0 ) ??
67- " camelCase" ;
66+ ( output !== void 0 && ' case' in output ? output . case : void 0 ) ??
67+ ' camelCase' ;
6868
6969 if (
7070 id &&
71- ( ! context . config . plugins [ " @hey-api/sdk" ] ||
72- context . config . plugins [ " @hey-api/sdk" ] . operationId )
71+ ( ! context . config . plugins [ ' @hey-api/sdk' ] ||
72+ context . config . plugins [ ' @hey-api/sdk' ] . operationId )
7373 ) {
7474 result = stringCase ( {
7575 case : targetCase ,
7676 value : sanitizeNamespaceIdentifier ( id ) ,
7777 } ) ;
7878 } else {
7979 const urlWithoutPlaceholders = path
80- . replace ( / { ( .* ?) } / g, " by-$1" )
80+ . replace ( / { ( .* ?) } / g, ' by-$1' )
8181 // replace slashes with hyphens for camelcase method at the end
82- . replace ( / [ / : + ] / g, "-" ) ;
82+ . replace ( / [ / : + ] / g, '-' ) ;
8383
8484 result = stringCase ( {
8585 case : targetCase ,
0 commit comments