Fix errors on openapi client generation
This MR improves the openapi specs so that we can generate a client by running:
#!/bin/bash
function get_openapi {
url="https://localhost/backend/api/v1/openapi.json"
out="openapi.json"
curl --insecure $url --output $out
format_json $out
}
function generate_client {
docker run --rm -v $PWD:/local openapitools/openapi-generator-cli generate -i /local/openapi.json -g python -o /local/out/python
}
function main {
if [ "$1" == "openapi.json" ]; then
get_openapi
elif [ "$1" == "client" ]; then
generate_client
else
echo "Unknown target $1"
fi
}
main "$@"
with ./manage.sh openapi.json && ./manage.sh client
.