Corollary 5.6.5.22. Let $U: \operatorname{\mathcal{E}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories. The following conditions are equivalent:
The functor $U$ is an opfibration in groupoids (Variant 4.2.2.4) and each fiber of $U$ is a small groupoid.
There exists a functor of $2$-categories $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \mathbf{Gpd}$ and an isomorphism of categories $\int _{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{E}}$ which carries $U$ to the forgetful functor $\int _{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$.