UNPKG

fluid-oas

Version:

Build declarative OpenApiv3.* specifications.

15 lines (14 loc) 709 B
import { withAdditionalProperties, withRequiredEnumerable, withProperties, withUnevaluatedProperties, withMinProperties, withMaxProperties, withPatternProperties, } from "../common"; import { SchemaBase } from "../lib/base"; const ObjectBase = withMaxProperties(withMinProperties(withPatternProperties(withUnevaluatedProperties(withAdditionalProperties(withRequiredEnumerable(withProperties((SchemaBase)))()))))); class _OpenApiObject extends ObjectBase { toJSON() { const json = super.toJSON(); globalThis.Object.defineProperty(json, "type", { value: "object", enumerable: true, }); return json; } } export const Object = new _OpenApiObject();