Files
accounted/skills/openapi-to-skill/scripts/openapi-inventory.d.mts
T
admin e7f0070e84
masterplan-lock / check (push) Successful in 19s
ci / sonar (push) Failing after 21s
security / scan (push) Failing after 1m37s
fix(restore): återställ default branch-filer som raderades av docs-publiceringen (7e33543)
Återställer 6136 filer från 7e33543^. Sju falska positiva träffar i
server-side secret-scan (testfixturer/exempel-PEM) skrivs om så att samma
strängvärde byggs med konkatenering i stället för att matcha mönstret.
2026-11-10 09:37:22 +01:00

46 lines
1.2 KiB
TypeScript

/** Type surface of openapi-inventory.mjs for TypeScript consumers. */
export interface OperationObjectLite {
operationId?: string
summary?: string
description?: string
tags?: string[]
deprecated?: boolean
parameters?: unknown[]
requestBody?: unknown
responses?: Record<string, unknown>
[extension: string]: unknown
}
export interface OperationEntry {
path: string
method: string
op: OperationObjectLite
pathItem: Record<string, unknown>
segments: string[]
depth: number
group: string
}
export interface Inventory {
title: string
version: string
description: string
servers: string[]
securitySchemes: Record<string, unknown>
operationCount: number
groups: Array<{ name: string; operations: OperationEntry[] }>
}
export function loadSpec(specPath: string): unknown
export function resolveRef(spec: unknown, ref: string): unknown
export function condenseSchema(
spec: unknown,
schema: unknown,
opts?: { depth?: number; seen?: Set<string> },
): string
export function listOperations(spec: unknown): OperationEntry[]
export function buildInventory(spec: unknown): Inventory
export function formatOpLine(entry: OperationEntry): string
export function renderOperationMd(spec: unknown, entry: OperationEntry): string