@camunda8/docusaurus-plugin-openapi-docs 4.5.3 → 4.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,7 +125,13 @@ function buildCodeSamples(operationId, sdkExamples, siteDir, fileCache, mapCache
125
125
  console.warn(`SDK examples: operation-map not found at ${mapPath}`);
126
126
  continue;
127
127
  }
128
- operationMap = fs_extra_1.default.readJSONSync(mapPath);
128
+ try {
129
+ operationMap = fs_extra_1.default.readJSONSync(mapPath);
130
+ }
131
+ catch (err) {
132
+ console.warn(`SDK examples: failed to parse ${mapPath}: ${err instanceof Error ? err.message : err}`);
133
+ continue;
134
+ }
129
135
  mapCache.set(mapPath, operationMap);
130
136
  }
131
137
  // Try exact match first, then fall back to snake_case conversion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@camunda8/docusaurus-plugin-openapi-docs",
3
3
  "description": "OpenAPI plugin for Docusaurus.",
4
- "version": "4.5.3",
4
+ "version": "4.5.4",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -169,7 +169,14 @@ export function buildCodeSamples(
169
169
  console.warn(`SDK examples: operation-map not found at ${mapPath}`);
170
170
  continue;
171
171
  }
172
- operationMap = fs.readJSONSync(mapPath) as OperationMap;
172
+ try {
173
+ operationMap = fs.readJSONSync(mapPath) as OperationMap;
174
+ } catch (err) {
175
+ console.warn(
176
+ `SDK examples: failed to parse ${mapPath}: ${err instanceof Error ? err.message : err}`
177
+ );
178
+ continue;
179
+ }
173
180
  mapCache.set(mapPath, operationMap);
174
181
  }
175
182