fluid-oas
    Preparing search index...

    Interface OpenApiArray

    Arrays are used for ordered elements. In JSON, each element in an array may be of a different type.

    interface OpenApiArray {
        addAdditionalItems(val: OpenApiReferenceObject | OpenApiSchema): this;
        addDefault(val: any[]): this;
        addDescription(description: string): this;
        addEnums(val: (null | any[])[]): this;
        addExample(example: any): this;
        addExtensions(mappings: { [key: `x-${string}`]: OpenApiSchema }): this;
        addExternalDocs(docs: OpenApiDocumentation): this;
        addItems(itemTypes: OpenApiReferenceObject | OpenApiSchema): this;
        addMaxItems(maxItems: number): this;
        addMinItems(minItems: number): this;
        addNullable(nullable: boolean): this;
        addPrefixItems(val: (OpenApiReferenceObject | OpenApiSchema)[]): this;
        addReadOnly(readOnly: boolean): this;
        addWriteOnly(writeOnly: boolean): this;
        override(overrideVal: unknown): this;
        toJSON(): unknown;
    }

    Hierarchy

    • SchemaInterface<any[]>
      • OpenApiArray
    Index

    Methods

    • Adds a description to this OpenApiSchema

      Parameters

      • description: string

        Description

      Returns this

    • Parameters

      • val: (null | any[])[]

      Returns this

    • Parameters

      • example: any

      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

    • As of v3.1.0 this has been removed. Still available for v3.0.* OAS

      Parameters

      • nullable: boolean

      Returns this

    • Parameters

      • readOnly: boolean

      Returns this

    • Parameters

      • writeOnly: boolean

      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