[Yan Qian] add swagger to generate json api documentation.