Open fedorg opened 2 years ago
Since the merge request has stalled, I have published my version on NPM: @fedorg/openapi-typescript-fetch
You can use if you have the same issue with Record<string, never>
showing up in arguments. Use at least version ^1.1.3
HI @fedorg there are a couple of commits in master that has not yet been released (my bad) and a fix addressing this exact issue is one of them https://github.com/ajaishankar/openapi-typescript-fetch/commit/b62ee714e645c14b8e07c98aaaa53880e7d6c847. Will release the pending changes today, sorry about the confusion and your time...
These changes were released in 1.1.3. I think this PR should be closed.
The library had trouble detecting the POST body payload types of my API. The argument was being typed as an empty object, and preventing me from sending any payloads. I had to use hacks such as these to make things work:
Instead of this:
This PR fixes this by changing the inference of
OpArgType
slightly. This allows for these types of POST payloads to be sent. I have also added a test for a slice of my problematic API.