This repostory contains the OpenAPI definition for PiControl. As of now it provides the server API for Python FastAPI and the clöient API for Swift.
The Python server API needs to be generated and the generated sources need to be committed and pushed such that the repo can be installed directly from GitHub.
For Linux node and npm is required. Install the generator by executing the following shell command:
npm install @openapitools/openapi-generator-cli -gAdd the following alias to your shell profile:
alias openapi-generator="npx @openapitools/openapi-generator-cli"Afterwards restart your shell and you're good to go.
For macOS Homebrew is required. Install the generator by executing the following shell command:
brew install openapi-generatorAfterwards you're good to go.
Execute the shell script
./generate-python-server.shAfterwards you can commit and push the changes or install it by executing
pip install .