Hierarchy

  • RequestBodyBuilder

Constructors

Properties

_description?: string
_mimeType?: string
_requestBody?: RequestBodyObject

Methods

  • Creates a deep copy of the current state of the request body and returns it.

    Returns

    A deep copy of the built request body object

    Returns RequestBodyObject

  • Add a content field to the request body object

    Returns

    RequestBodyBuilder instances for method chaining

    Parameters

    • content: { [media: string]: OpenAPIV3.MediaTypeObject }

      The content object per OpenApiv3 spec

      • [media: string]: OpenAPIV3.MediaTypeObject

    Returns RequestBodyBuilder

  • Add the schema object to the request body object. Allows for defining the type of media in place, or inheriting a global default.

    Returns

    RequestBodyBuilder instances for method chaining

    Throws

    A error if there is no default MIME and a mimeType wasn't included locally

    Parameters

    • schema: ReferenceObject | SchemaObject

      The MediaType object per OpenApiv3 spec

    • Optional mimeType: string

      The string of a valid MIME type

    Returns RequestBodyBuilder

  • Add the schema object to the request body object as an array. Allows for defining the type of media in place, or inheriting a global default.

    Returns

    RequestBodyBuilder instances for method chaining

    Throws

    A error if there is no default MIME and a mimeType wasn't included locally

    Parameters

    • schema: ReferenceObject | SchemaObject

      The MediaType object per OpenApiv3 spec

    • Optional mimeType: string

      The string of a valid MIME type

    Returns RequestBodyBuilder

Generated using TypeDoc