Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Map apiml to base in when ProfileInfo loads schema
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <[email protected]>
  • Loading branch information
t1m0thyj committed Sep 14, 2023
1 parent 0524bcc commit 2743a86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/config/src/ProfileInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1420,13 +1420,14 @@ export class ProfileInfo {
let schemaMapKey: string;

if (profile.profLoc.locType === ProfLocType.TEAM_CONFIG) {
const profType = profile.profType === "apiml" ? "base" : profile.profType;
if (profile.profLoc.osLoc != null) {
// the profile exists, so use schema associated with its config JSON file
schemaMapKey = `${profile.profLoc.osLoc[0]}:${profile.profType}`;
schemaMapKey = `${profile.profLoc.osLoc[0]}:${profType}`;
} else {
// no profile exists, so loop through layers and use the first schema found
for (const layer of this.mLoadedConfig.mLayers) {
const tempKey = `${layer.path}:${profile.profType}`;
const tempKey = `${layer.path}:${profType}`;
if (this.mProfileSchemaCache.has(tempKey)) {
schemaMapKey = tempKey;
break;
Expand Down

0 comments on commit 2743a86

Please sign in to comment.