function createSerializer(debugString, serialize) {
    return function serializer(data, apiConfig, frame) {
        debug(debugString);
        const response = serialize(data, apiConfig, frame);
        frame.response = response;
    };
}
@template Data
@template Response
@param {string} debugString
@param {(data: Data, apiConfig: APIConfig, frame: import('@tryghost/api-framework').Frame) => Response} serialize

@returns {(data: Data, apiConfig: APIConfig, frame: import('@tryghost/api-framework').Frame) => void}