Giter Site home page Giter Site logo

Comments (1)

Fredx87 avatar Fredx87 commented on August 22, 2024

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:

  1. This is probably a typo, I will check it

  2. It is possible to use import type, but I am refactoring the generated code for operations, and probably TaskEither will not be imported in these files anymore

  3. 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 an ApiError with the Response inside). The idea is that you will be able to have an ApiError<T>, where <T> in your case will be schemas.Error.

from openapi-io-ts.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.