mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-14 00:13:50 +00:00
* typescript-fetch: Fix model date crash Fix a runtime crash converting to json when a date or datetime is both nullable AND required. There are 4 cases to account for: | required | nullable | values | |----------|----------|--------| | f | f | string OR undefined | | f | t | string OR null OR undefined | | t | f | string | | t | t | string OR null | And importantly when required and nullable code that would crash on null was being generated. additionally when required is false and nullable is true we still want to allow consumers to be able to pass in `undefined` OR `null` and pass that value to the server. Some servers treat null and undefined differently for some operations so having that ability is pretty reasonable. fix: https://github.com/OpenAPITools/openapi-generator/issues/21820 * Update typescript-fetch samples ./bin/generate-samples.sh ./bin/configs/*.yaml || exit