@types/ibm-openapi-validator
TypeScript icon, indicating that this package has built-in type declarations

0.15.4 • Public • Published

Installation

npm install --save @types/ibm-openapi-validator

Summary

This package contains type definitions for ibm-openapi-validator (https://github.com/IBM/openapi-validator#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ibm-openapi-validator.

index.d.ts

interface validatorResultItem {
    path: string;
    message: string;
}

interface validatorResult {
    errors: [] | [validatorResultItem];
    warnings: [] | [validatorResultItem];
}

/**
 * @default false
 */
type validatorParameterDefaultMode = boolean;

/**
 * OpenAPI document validator
 * @param openApiDoc - OpenAPI document object
 * @param defaultMode - If set to true, the validator will ignore the .validaterc file and will use the [configuration defaults](https://github.com/IBM/openapi-validator#default-values).
 * @returns Validation results
 */
declare function validator(
    openApiDoc: { [property: string]: any },
    defaultMode?: validatorParameterDefaultMode,
): Promise<validatorResult>;

export = validator;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Rifa Achrinza.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/ibm-openapi-validator

Weekly Downloads

89

Version

0.15.4

License

MIT

Unpacked Size

4.11 kB

Total Files

5

Last publish

Collaborators

  • types