fluid-oas
Version:
Build declarative OpenApiv3.* specifications.
31 lines (30 loc) • 1.32 kB
TypeScript
import type { OpenApiReferenceObject } from "../lib";
import { type SchemaInterface } from "../lib/base";
import type { OpenApiSchema } from "./OpenApiSchema";
export interface OpenApiObject extends SchemaInterface<object> {
/**
* Adds a maximum limit to the number of properties for this OpenApiObject.
* @param val - The maximum properties this object can hold.
*/
addMaxProperties(val: number): this;
/**
* Adds a minimum limit to the number of properties for this OpenApiObject.
* @param val - The minimum properties this object can hold.
*/
addMinProperties(val: number): this;
/**
* Adds pattern properties to this object, where each key is a regular expression
* and each value is a schema.
* @param mappings - RegExp as strings to schema mappings.
*/
addPatternProperties(mappings: Partial<{
[K in string]: OpenApiSchema | OpenApiReferenceObject;
}>): this;
addUnevaluatedProperties(unevaluatedProperties: boolean): this;
addProperties(mappings: Partial<{
[K in string]: OpenApiSchema | OpenApiReferenceObject;
}>): this;
addRequired(val: string[]): this;
addAdditionalProperties(additionalProperties: OpenApiSchema | OpenApiReferenceObject): this;
}
export declare const Object: OpenApiObject;