Closed vsouz4 closed 2 years ago
Generator was failing abruptly because of TypeError:
TypeError: Argument 2 passed to DoclerLabs\ApiClientGenerator\Naming\SchemaNaming::getEnumConstName() must be of the type string, int given, called in /generator/src/Generator/Mu
tatorAccessorClassGeneratorAbstract.php on line 109 and defined in /generator/src/Naming/SchemaNaming.php:39
Instead of just identifying this scenario and presenting error message, I opened PR for adding support for numeric enums. The only caveat is that we ain't generating constants for these.
wrong parameter (string enum with int values)
Output from generator:
Expected: error message (e.g. "Error on mapping
enabled
: Only string enum fields are currently supported"). This message is already shown if you set type: integer instead.