From ee9cf01f0c2a10c4a7c0816302f20387aed6fb84 Mon Sep 17 00:00:00 2001 From: tolatolatop Date: Sun, 26 Nov 2023 13:14:38 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=9F=E6=88=90=E7=AB=A0?= =?UTF-8?q?=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tolatolatop --- .gitignore | 1 + README.md | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0a3de7f..e12acdb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .devcontainer +*.jar \ No newline at end of file diff --git a/README.md b/README.md index 80977e6..2caeff0 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,13 @@ ## Gen 通过工具将`openapi.json`转换成其他格式 + +转换为swagger.yaml +```shell +api-spec-converter --from=openapi_3 --to=swagger_2 --syntax=yaml --order=alpha openapi.json > gen/swagger.yaml +``` + +转换为其他sdk ```shell -api-spec-converter --from=openapi_3 --to=swagger_2 --syntax=yaml --order=alpha openapi.json > /gen/swagger.yaml +java -jar .jre/swagger-codegen-cli.jar generate -i ./gen/swagger.yaml -l python -DpackageName=pygitee -o gen/pygitee ``` \ No newline at end of file