code: function getBase(request, extra) {
    var parts = request.originalUrl.split('/');
    // Remove extra path parts.
    parts.splice(-extra, extra);
    var base = parts.join('/');
    return base;
  }
docs: Implements OpenAPI 3.0.0-RC (implementers draft) as described in: https://www.openapis.org/blog/2017/03/01/openapi-spec-3-implementers-draft-released# https://github.com/OAI/OpenAPI-Specification/blob/3.0.0-rc0/versions/3.0.md Figure out the basePath for OpenAPI definition