Skip to content

Commit 7dab72d

Browse files
committed
correct the profile of cache layer schema for Canner persistence store
1 parent 6c7df80 commit 7dab72d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/extension-store-canner/src/lib/canner/persistenceStore.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,17 @@ export class CannerPersistenceStore extends PersistentStore {
141141
merged.templates[workspaceSourceName] = value;
142142
});
143143
// API Schemas
144+
const profile = `canner-${workspaceSqlName}`;
144145
artifact.schemas.forEach((schema) => {
145146
// concat the workspace sql name prefix to urlPath, urlPath has the "/" prefix, so concat directly
146147
schema.urlPath = `${workspaceSqlName}${schema.urlPath}`;
147148
// concat the workspace sql name prefix to template source, so it could find the "sourceName" in templates
148149
schema.templateSource = `${workspaceSqlName}/${schema.templateSource}`;
149150
// replace the profile to the canner enterprise integration used profile name, it will match to the profiles from canner profile reader.
150-
schema.profiles = [`canner-${workspaceSqlName}`];
151+
schema.profiles = [profile];
152+
schema.cache =
153+
schema.cache?.map((cacheData) => ({ ...cacheData, profile })) || [];
154+
151155
merged.schemas.push(schema);
152156
});
153157
// Specs, only support the oas3 specification for canner enterprise integration used

0 commit comments

Comments
 (0)