@@ -12,7 +12,6 @@ import {
1212import {
1313 parseOpenApiDocument ,
1414 type DatasetEntity ,
15- type OpenApiEntity ,
1615} from '@bcgov/plugin-catalog-common-bc-data-catalogue' ;
1716import type {
1817 BcDataCataloguePackage ,
@@ -173,7 +172,7 @@ export class BcDataCatalogueEntityFactory {
173172
174173 const allDatasets = new Map < string , DatasetEntity > ( ) ;
175174 const allApis = new Map < string , ApiEntity > ( ) ;
176- const allOpenApis = new Map < string , OpenApiEntity > ( ) ;
175+ const allOpenApis = new Map < string , ApiEntity > ( ) ;
177176 const openApiDefinitionToId = new Map < string , string > ( ) ;
178177
179178 for ( const pkg of allPackages ) {
@@ -280,7 +279,7 @@ export class BcDataCatalogueEntityFactory {
280279 definitionHost ,
281280 allOpenApis ,
282281 ) ;
283- const openApiId = this . naming . getOpenApiId ( openApiSafeName ) ;
282+ const openApiId = this . naming . getApiId ( openApiSafeName ) ;
284283
285284 const openApiEntity = await this . openApiEntityBuilder . build ( {
286285 pkg,
@@ -373,7 +372,7 @@ export class BcDataCatalogueEntityFactory {
373372 const systemEntities : SystemEntity [ ] = Array . from ( allSystems . values ( ) ) ;
374373 const datasetEntities : DatasetEntity [ ] = Array . from ( allDatasets . values ( ) ) ;
375374 const apiEntities : ApiEntity [ ] = Array . from ( allApis . values ( ) ) ;
376- const openApiEntities : OpenApiEntity [ ] = Array . from ( allOpenApis . values ( ) ) ;
375+ const openApiEntities : ApiEntity [ ] = Array . from ( allOpenApis . values ( ) ) ;
377376
378377 allEntities . push ( ...userEntities ) ;
379378 allEntities . push ( ...groupEntities ) ;
@@ -391,14 +390,14 @@ export class BcDataCatalogueEntityFactory {
391390 private buildOpenApiSafeName (
392391 resourceName : string ,
393392 host : string | undefined ,
394- allOpenApis : Map < string , OpenApiEntity > ,
393+ allOpenApis : Map < string , ApiEntity > ,
395394 ) : string {
396395 const baseName = host
397396 ? this . naming . toSafeName ( `${ resourceName } -${ host } ` )
398397 : this . naming . toSafeName ( resourceName ) ;
399398
400399 let candidateName = baseName ;
401- let candidateOpenApiId = this . naming . getOpenApiId ( candidateName ) ;
400+ let candidateOpenApiId = this . naming . getApiId ( candidateName ) ;
402401
403402 if ( ! allOpenApis . has ( candidateOpenApiId ) ) {
404403 return candidateName ;
@@ -420,7 +419,7 @@ export class BcDataCatalogueEntityFactory {
420419 candidateName = this . naming . toSafeName (
421420 `${ truncatedBase } ${ suffixWithSeparator } ` ,
422421 ) ;
423- candidateOpenApiId = this . naming . getOpenApiId ( candidateName ) ;
422+ candidateOpenApiId = this . naming . getApiId ( candidateName ) ;
424423
425424 let counter = 1 ;
426425 while ( allOpenApis . has ( candidateOpenApiId ) ) {
@@ -438,7 +437,7 @@ export class BcDataCatalogueEntityFactory {
438437 candidateName = this . naming . toSafeName (
439438 `${ truncatedBaseForCounter } ${ suffixWithSeparator } ${ counterSuffix } ` ,
440439 ) ;
441- candidateOpenApiId = this . naming . getOpenApiId ( candidateName ) ;
440+ candidateOpenApiId = this . naming . getApiId ( candidateName ) ;
442441 counter ++ ;
443442 }
444443
@@ -558,4 +557,4 @@ export class BcDataCatalogueEntityFactory {
558557 const match = email . trim ( ) . toLowerCase ( ) . match ( / @ ( [ \w . - ] + ) / ) ;
559558 return match ? match [ 1 ] : undefined ;
560559 }
561- }
560+ }
0 commit comments