This is a minimal example for reproducing a bug with SecretStr in the python-pydantic-v1
generator in the https://github.com/OpenAPITools/openapi-generator project.
This project contains 2 generated clients:
- cli: The autogenerated client with the broken
python-pydantic-v1
generator - cli_fixed: The autogenerated client with the proposed fixed
python-pydantic-v1
generator (https://github.com/webertim/openapi-generator/tree/feature/CBR-python-pydantic-v1-secret-str)
You can install the required dependencies by running:
pip install -r requirements.txt
After that you should be able to run the following script to reproduce the current error.
./test_old.sh
The fixed client can be tested by running the following script. It should simply print Success!
after completing
./test_fixed.sh