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

1.0.3 • Public • Published

Installation

npm install --save @types/openapi-sampler

Summary

This package contains type definitions for openapi-sampler (https://github.com/APIs-guru/openapi-sampler/).

Details

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

index.d.ts

export type OpenApiSchema = any;

export type OpenApiSpec = any;

export interface Options {
    /**
     * Don't include non-required object properties not specified in `required` property of the schema object
     */
    readonly skipNonRequired?: boolean | undefined;

    /**
     * Don't include readOnly object properties
     */
    readonly skipReadOnly?: boolean | undefined;

    /**
     * Don't include writeOnly object properties
     */
    readonly skipWriteOnly?: boolean | undefined;

    /**
     * Don't log console warning messages
     */
    readonly quiet?: boolean | undefined;
}

/**
 * Generates samples based on OpenAPI payload/response schema
 * @param schema A OpenAPI Schema Object
 * @param options Options
 * @param spec whole specification where the schema is taken from. Required only when schema may contain `$ref`. `spec` must not contain any external references.
 */
export function sample(schema: OpenApiSchema, options?: Options, spec?: OpenApiSpec): unknown;

Additional Details

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

Credits

These definitions were written by Marcell Toth.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/openapi-sampler

Weekly Downloads

151

Version

1.0.3

License

MIT

Unpacked Size

4.6 kB

Total Files

5

Last publish

Collaborators

  • types