[api] move generation of patchinfo in the project model