@clarify-labs/renderer 0.11.18 → 0.11.20
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/output/{OpenApiOperation-hxX828Il.js → OpenApiOperation-B68CqUJW.js} +10 -3
- package/output/OpenApiOperation-B68CqUJW.js.map +1 -0
- package/output/{OpenApiOperation-XH6b7ntf.cjs → OpenApiOperation-Cv4N92VL.cjs} +10 -3
- package/output/OpenApiOperation-Cv4N92VL.cjs.map +1 -0
- package/output/index.cjs +10 -6
- package/output/index.cjs.map +1 -1
- package/output/index.js +10 -6
- package/output/index.js.map +1 -1
- package/output/openapi/entry.d.ts +2 -0
- package/output/openapi/lib/utils.d.ts +1 -1
- package/output/preview.cjs +1 -1
- package/output/preview.js +1 -1
- package/package.json +1 -1
- package/output/OpenApiOperation-XH6b7ntf.cjs.map +0 -1
- package/output/OpenApiOperation-hxX828Il.js.map +0 -1
|
@@ -1819,10 +1819,17 @@ function getOpenApiOperationEntryById(spec, operationId) {
|
|
|
1819
1819
|
const matches = listOpenApiOperations(spec).filter(({ operation }) => operation.operationId === operationId);
|
|
1820
1820
|
return matches.length === 1 ? matches[0] : void 0;
|
|
1821
1821
|
}
|
|
1822
|
-
function listOpenApiOperations(spec) {
|
|
1822
|
+
function listOpenApiOperations(spec, operationOrder) {
|
|
1823
1823
|
const paths = spec.paths ?? {};
|
|
1824
1824
|
const webhooks = spec.webhooks;
|
|
1825
|
-
|
|
1825
|
+
const operations = [...listOperationsFromPathItems(paths, "path", spec), ...isRecord(webhooks) ? listOperationsFromPathItems(webhooks, "webhook", spec) : []];
|
|
1826
|
+
if (!operationOrder?.length) return operations;
|
|
1827
|
+
const orderByOperationId = new Map(operationOrder.map((operationId, index) => [operationId, index]));
|
|
1828
|
+
return operations.map((entry, index) => ({
|
|
1829
|
+
entry,
|
|
1830
|
+
index,
|
|
1831
|
+
order: entry.operation.operationId ? orderByOperationId.get(entry.operation.operationId) : void 0
|
|
1832
|
+
})).sort((left, right) => (left.order ?? operationOrder.length) - (right.order ?? operationOrder.length) || left.index - right.index).map(({ entry }) => entry);
|
|
1826
1833
|
}
|
|
1827
1834
|
//#endregion
|
|
1828
1835
|
//#region source/openapi/components/EndpointMethodBadge.tsx
|
|
@@ -5973,4 +5980,4 @@ Object.defineProperty(exports, "primitives_exports", {
|
|
|
5973
5980
|
}
|
|
5974
5981
|
});
|
|
5975
5982
|
|
|
5976
|
-
//# sourceMappingURL=OpenApiOperation-
|
|
5983
|
+
//# sourceMappingURL=OpenApiOperation-Cv4N92VL.cjs.map
|