Adds middleware documentation.