Description
openedon May 15, 2024
Our API depends on null's being allowed as part of the request:
const updateWidgetRequest: UpdateWidgetRequest = {
name: 'Sproket',
size: 5,
inspectionDetails: null,
};
This is different than sending undefined for inspectionDetails. Our API treats undefined on patch as no change, but null as a means to clear the value.
While the swagger file defines the type as nullable, the generated code only allows InspectionDetails | undefined
We've tried to hack a value by doing:
inspectionDetails: <InspectionDetails>(<unknown>null)
This is awful and still doesn't work. This call to writeObjectValue strips it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Type
Projects
Status
Done ✔️