Use the openapi_merged.yaml
generated by epp-xsd-to-json-schema for
generating server and client code.
brew install openapi-generator
see: https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#15---homebrew
Template will include header params in the generated Python code.
spec-first/connexion#788 (comment)
export API_GEN_OUTPUT_DIR=/tmp/rpp
export API_GEN_MODULE_NAME=rpp_py_flask_server
Python Flask server stub
openapi-generator generate -g python-flask -i openapi_merged.yaml -t ./templates/mustache/server/python-flask -o $API_GEN_OUTPUT_DIR \
--additional-properties packageName=$API_GEN_MODULE_NAME
cd $API_GEN_OUTPUT_DIR
pip3 install -r requirements.txt
python3 -m $API_GEN_MODULE_NAME
Browse to: http://localhost:8080/rpp/v1/ui/
Python client
openapi-generator generate -g python -i openapi_merged.yaml -o $API_GEN_OUTPUT_DIR