@umami/shiso 1.15.0 → 1.16.0
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.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/scripts/lib/openapi.mjs +6 -1
package/CHANGELOG.md
ADDED
package/package.json
CHANGED
package/scripts/lib/openapi.mjs
CHANGED
|
@@ -372,7 +372,12 @@ export function normalizeOperations(spec) {
|
|
|
372
372
|
const serverUrl = operation.servers?.[0]?.url || spec.servers?.[0]?.url || FALLBACK_SERVER;
|
|
373
373
|
const normalized = {
|
|
374
374
|
id: slugify(
|
|
375
|
-
operation.operationId
|
|
375
|
+
operation.operationId
|
|
376
|
+
? operation.operationId
|
|
377
|
+
.replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')
|
|
378
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
379
|
+
.replace(/[_\s]+/g, '-')
|
|
380
|
+
: `${method}-${pathName}`,
|
|
376
381
|
`${method}-${slugify(pathName, 'root')}`,
|
|
377
382
|
),
|
|
378
383
|
key: `${upper} ${pathName}`,
|