When using the "--import_class" to generate from a Python class, a false positive Error is thrown indicating that the user did not provide the FUNCTION (classname) argument. Exception has no impact on the functionality, as there is no exit call associated with the error (something that should be addressed).
Reproduction of Error
cms openapi generate Calculator --filename=./tests/generator-testclass/calculator.py --import_class
Error gets thrown here. But server will still start if desired with following command:
cms openapi server start ./tests/generator-testclass/calculator.yaml
Root Cause
Typo in case (ie. arguments.function vs. arguments.FUNCTION) in openapi.py
Description
When using the "--import_class" to generate from a Python class, a false positive Error is thrown indicating that the user did not provide the FUNCTION (classname) argument. Exception has no impact on the functionality, as there is no exit call associated with the error (something that should be addressed).
Reproduction of Error
cms openapi generate Calculator --filename=./tests/generator-testclass/calculator.py --import_class
Error gets thrown here. But server will still start if desired with following command:cms openapi server start ./tests/generator-testclass/calculator.yaml
Root Cause
Typo in case (ie. arguments.function vs. arguments.FUNCTION) in
openapi.py
Status
Resolved. Commit to be linked below.