fluid-oas
    Preparing search index...

    Interface OpenApiUnion

    A special type of schema, used for multiple "types" as specified in the latest JSON Schema.

    interface OpenApiUnion {
        addDescription(description: string): this;
        addExample(example: any): this;
        addExtensions(mappings: { [key: `x-${string}`]: OpenApiSchema }): this;
        addExternalDocs(docs: OpenApiDocumentation): this;
        ofTypes(...val: (OpenApiReferenceObject | OpenApiSchema)[]): this;
        override(overrideVal: unknown): this;
        toJSON(): unknown;
    }

    Hierarchy

    Index

    Methods

    • Adds a description to this OpenApiSchema

      Parameters

      • description: string

        Description

      Returns this

    • Extend the specification with an extension object schema.

      Parameters

      • mappings: { [key: `x-${string}`]: OpenApiSchema }

        key value mappings with names MUST beginning with "x-"

      Returns this

    • Overrides the toJSON method for a custom serialization.

      WARNING: overrideVal must be serializable and future changes are subject to breaking.

      Parameters

      • overrideVal: unknown

        Overrides the serialization of this object into this value.

      Returns this

    • Serializes the object into its equivalent OpenApi JSON value.

      Returns unknown