在CentOS上生成Swagger接口文档,可参考以下步骤:
sudo yum install -y java-1.8.0-openjdk-devel和sudo yum install -y maven。npm install -g swagger-ui-express安装;使用Python,可通过pip install swagger-ui-express安装。swagger.yaml或swagger.json),或在代码中通过注解配置,如Java中使用@EnableSwagger2等注解。http://localhost:8080/swagger-ui.html(端口可能因配置不同而不同)查看文档。