Comments (1)
Hi @aphex, thank you for helping test the library. As mentioned in the README there are still some bugs and missing things around. I am working on some refactorings and I am planning to do a new release soon.
Regarding your issues:
-
This is probably a typo, I will check it
-
It is possible to use
import type
, but I am refactoring the generated code for operations, and probablyTaskEither
will not be imported in these files anymore -
The handling of error responses is not very well implemented and tested in this version, for the first iteration I looked more at the successful responses. For this reason, it is possible that in the generated code there are some references to missing things.
The reason for having things like{ _tag: "JsonResponse", decoder: Error401Schema }
for handling errors is that is possible that an error is not a JSON but a string, or an empty response (or maybe also a binary file... I guess nobody is doing that but it is possible). So the runtime will need to know the response type to decode it.
At the moment the decoding of errors in the runtime is not implemented (it will just return anApiError
with theResponse
inside). The idea is that you will be able to have anApiError<T>
, where<T>
in your case will beschemas.Error
.
from openapi-io-ts.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openapi-io-ts.