schema-components - v3.7.0
    Preparing search index...

    Function deepNormaliseOpenApiDoc

    • Deep-normalise every Schema Object in an OpenAPI document.

      Walks: paths.* (operations + path-level parameters), webhooks.* (3.1), components.schemas, components.parameters, components.responses, components.requestBodies, components.headers, components.callbacks, components.pathItems (3.1). For each Schema-bearing location, applies the supplied normaliseSchema function.

      The walker is structural (it understands OAS document shapes) and delegates the per-schema transformation. For OAS 3.0 the caller passes a full Draft 04 + nullable + discriminator + example normaliser; for OAS 3.1 the caller passes a discriminator-only normaliser so the walker's discriminated-union detection sees the injected consts regardless of OAS minor version.

      Parameters

      Returns Record<string, unknown>