UNPKG

fluid-oas

Version:

Build declarative OpenApiv3.* specifications.

15 lines (14 loc) 549 B
import { withAdditionalItems, withItems, withMaxItems, withMinItems, withPrefixItems, } from "../common"; import { SchemaBase } from "../lib/base"; const ArrayBase = withAdditionalItems(withPrefixItems(withItems(withMaxItems(withMinItems((SchemaBase)))))()); class _OpenApiArray extends ArrayBase { toJSON() { const json = super.toJSON(); globalThis.Object.defineProperty(json, "type", { value: "array", enumerable: true, }); return json; } } export const Array = new _OpenApiArray();