Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 536 Bytes

HOW_TO.md

File metadata and controls

14 lines (10 loc) · 536 Bytes

Generating the code

Use the swagger-codegen-cli

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate --additional-properties projectName=harbor_client --additional-properties packageVersion=2.7.0 --api-package harbor_client --config  --input-spec ~/Downloads/swagger.yaml --lang python --output harbor_client

Replace unwanted namings:

grep -rl swagger_client . | xargs sed -i 's/swagger_client/harbor_client/g'
grep -rl "from api" . | xargs sed -i 's/from api/from harbor_client.api./g'