Adapt doc generation to v1/v2