要在Ubuntu中更新Swagger(现在称为OpenAPI Generator),请按照以下步骤操作:
sudo apt update
sudo apt install python3 python3-pip
pip3 install --upgrade openapi-generator-cli
这将安装或更新到最新版本的OpenAPI Generator。
openapi-generator --version
现在,您已经成功更新了Ubuntu中的Swagger(OpenAPI Generator)。如果您需要使用特定版本的OpenAPI Generator,可以使用以下命令安装:
pip3 install openapi-generator-cli==<版本号>
将<版本号>替换为您需要的版本,例如:
pip3 install openapi-generator-cli==5.0.0
这将安装指定版本的OpenAPI Generator。