oas
Version:
Comprehensive tooling for working with OpenAPI definitions
42 lines (39 loc) • 1.58 kB
text/typescript
import { OASDocument } from './types.cjs';
/**
* The order of this object determines how they will be sorted in the compiled JSON Schema
* representation.
*
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#parameter-object}
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object}
*/
declare const types: Record<keyof OASDocument, string>;
interface getParametersAsJSONSchemaOptions {
/**
* If provided, the request body schema will be derived from this specific content type
* rather than the default preferred one (first JSON-like, then first available).
*/
contentType?: string;
/**
* Contains an object of user defined schema defaults.
*/
globalDefaults?: Record<string, unknown>;
/**
* If you wish to hide properties that are marked as being `readOnly`.
*/
hideReadOnlyProperties?: boolean;
/**
* If you wish to hide properties that are marked as being `writeOnly`.
*/
hideWriteOnlyProperties?: boolean;
/**
* If you wish to include discriminator mapping `$ref` components alongside your
* `discriminator` in schemas. Defaults to `true`.
*/
includeDiscriminatorMappingRefs?: boolean;
/**
* If you want the output to be two objects: body (contains `body` and `formData` JSON
* Schema) and metadata (contains `path`, `query`, `cookie`, and `header`).
*/
mergeIntoBodyAndMetadata?: boolean;
}
export { type getParametersAsJSONSchemaOptions as g, types as t };