• Apply an API specification to a SimpleHttpRequestHandlerBasicInterface. This takes a standard http server (express or similar) and registers endpoints against it using a standard algorithm. That algorithm is outlined clearly in the code.

    See code for more details, and see ApiSpec for more detailed information about the input to this function. Finally, see the main readme for a detailed example.

    Type Parameters

    Parameters

    • apiSpec: ApiSpec<EndpointSpec>
    • r: {
          http: SimpleHttpRequestHandlerInterface;
          log: SimpleLoggerInterface;
      }
      • http: SimpleHttpRequestHandlerInterface
      • log: SimpleLoggerInterface
    • Optional authStub: ReqInfo
    • Optional globalBodyParsers: ((req, res, next) => void)[]

    Returns void

Generated using TypeDoc