UNPKG

somod-http-extension

Version:

SOMOD middleware to intercept and validate Lambda event for AWS APIGateway

11 lines (10 loc) 311 B
export const getHttpSchemaPath = (path, method, key) => { let schemaKey = path + ":" + method; if (key == "body") { schemaKey += ":body"; } else { schemaKey += ":param:" + key.in + ":" + key.name; } return Buffer.from(schemaKey, "utf8").toString("base64url") + ".js"; };