openapi-ts-json-schema
Version:
Generate TypeScript-first JSON schemas from OpenAPI definitions
18 lines (17 loc) • 620 B
TypeScript
import type { OpenApiDocument } from '../../types.js';
/**
* Convert parameter arrays found in:
* - paths[path].parameters
* - paths[path][operation].parameters
*
* ..into records of JSON schemas organized by "in" value
*
* Parameters schema $refs are fully supported
* $ref parameters are currently always inlined
*
* OpenAPI parameters docs:
* https://swagger.io/docs/specification/describing-parameters/
*
* @NOTE The schema must be dereferenced since openapi-jsonschema-parameters doesn't handle $refs
*/
export declare function convertOpenApiPathsParameters(schema: OpenApiDocument): OpenApiDocument;