Skip to content

Instantly share code, notes, and snippets.

@dbiesecke
Last active December 27, 2023 13:24
Show Gist options
  • Save dbiesecke/3957204e2b4dff27500375a021561ea8 to your computer and use it in GitHub Desktop.
Save dbiesecke/3957204e2b4dff27500375a021561ea8 to your computer and use it in GitHub Desktop.
OpenAPI CodeGen

Docker geneartor

CID=$(docker run -d -p 8888:8080 openapitools/openapi-generator-online)
sleep 10 && GEN_IP=$(docker inspect --format '{{.NetworkSettings.IPAddress}}'  $CID)
  • Generate python client Lib - List of generator: generators
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' \
-d '{  "openAPIUrl": "https://developer.tenable.com/openapi/5eaa0b91ca22f7001c19f215", "options": {  "projectName": "test" , "packageVersion": "1.0.0",  "packageName": "testclient" , "projectName": "testproject" }}' \
'http://api.openapi-generator.tech/api/gen/clients/python-nextgen'
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' \
-d '{  "openAPIUrl": "https://raw.githubusercontent.com/Radarr/Radarr/develop/src/Radarr.Api.V3/openapi.json", "options": {  "projectName": "radarr" , "packageVersion": "3.0.0",  "packageName": "radarr-bash" , "projectName": "radarr-bash" }}' \
'http://api.openapi-generator.tech/api/gen/clients/bash'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment