Skip to main content
Version: 0.24

Interface: ApiNamespace

Shared middleware applied to every Api mounted under a path prefix.

Create one with the apiNamespace constructor.

Extendsโ€‹

  • BaseSpecElement<"apiNamespace">

Propertiesโ€‹

kindโ€‹

kind: "apiNamespace"

The internal Wasp type of a SpecElement. Used by the compiler. You should not set this field directly, instead use the dedicated constructors.

Inherited fromโ€‹

BaseSpecElement.kind


middlewareConfigFnโ€‹

middlewareConfigFn: Reference<AnyFunction>

Reference to an Express middleware config function for this namespace.


pathโ€‹

path: string

Path prefix the namespace applies to (e.g. "/webhooks").