openapi-fetch-otel-fix
v0.9.2-otel-fix.7
Published
Fast, type-safe fetch client for your OpenAPI schema. Only 5 kb (min). Works with React, Vue, Svelte, or vanilla JS.
Downloads
14
Maintainers
Readme
This is a fork of the original openapi-fetch library by drwpow. The original library is a great tool for generating TypeScript types from OpenAPI 3.0 definitions. However, it has some limitations and bugs that I wanted to fix.
This should be used at your own risk, as it is not as well tested as the original library.
Changes
- Modified lines 113-114 of src/index.js to pass a
path
andrequestInit
instead of the request object that the original library was using. This fixes an error when OpenTelemetry is used with the client that this library generates. - This, in effect, disables request middleware functionality. This is a trade-off that I was willing to make, as I was not using the middleware functionality and it was causing errors.