Open mderriey opened 3 days ago
Originally posted on Slack at https://svixcommunity.slack.com/archives/C022BJ2EBHV/p1727206631611579
svix npm package v1.34.0.
N/A
We're using the svix npm package to interact with the API and we found a case where the TypeScript types are incorrect.
The Svix.endpoint.patch function takes an EndpointPatch argument typed as follows:
Svix.endpoint.patch
EndpointPatch
export class EndpointPatch { // Most properties omitted for brevity 'channels'?: Array<string>; 'filterTypes'?: Array<string>; }
These two properties do not allow null, although the API does accept null values for these properties as per https://api.svix.com/docs#tag/Endpoint/operation/v1.endpoint.patch, meaning we've had to use an as type assertion to avoid a TypeScript error.
null
as
Any chance we can see if openapi-generator can correctly type those? All properties in this type are marked as nullable so I suspect it's an openapi-generator config we may be missing.
Thanks in advance!
Thanks for reporting!
Originally posted on Slack at https://svixcommunity.slack.com/archives/C022BJ2EBHV/p1727206631611579
Bug Report
Version
svix npm package v1.34.0.
Platform
N/A
Description
We're using the svix npm package to interact with the API and we found a case where the TypeScript types are incorrect.
The
Svix.endpoint.patch
function takes anEndpointPatch
argument typed as follows:These two properties do not allow
null
, although the API does acceptnull
values for these properties as per https://api.svix.com/docs#tag/Endpoint/operation/v1.endpoint.patch, meaning we've had to use anas
type assertion to avoid a TypeScript error.Any chance we can see if openapi-generator can correctly type those? All properties in this type are marked as nullable so I suspect it's an openapi-generator config we may be missing.
Thanks in advance!