Giter VIP home page Giter VIP logo

Comments (10)

mrlubos avatar mrlubos commented on August 10, 2024 2

Unfortunately I am not. I would like to though. The official generators are lacking in so many other ways.

Don't worry, we'll get there. Keep listing any issues you're seeing elsewhere and we'll figure it out!

from openapi-ts.

mrlubos avatar mrlubos commented on August 10, 2024 1

@tajnymag a little update: this will work only with --useOptions, so please make sure you're using that flag. Out of interest, are you able to share your config?

I explored this a bit and the conclusion is that we will need to rework types quite a bit, it's not a quick fix. That pull request you linked doesn't implement it properly either and I'd rather wait until it works as expected than go through multiple iterations here

from openapi-ts.

mrlubos avatar mrlubos commented on August 10, 2024

@tajnymag just want to clarify the expected example types. Aren't they meant to be like this?

UserGetResponse: { id?: number, username?: string }
UserPostRequest: { username?: string, password?: string }
UserPutRequest: { username?: string, password?: string }
UserPatchRequest: { username?: string, password?: string }

from openapi-ts.

tajnymag avatar tajnymag commented on August 10, 2024

@tajnymag just want to clarify the expected example types. Aren't they meant to be like this?

UserGetResponse: { id?: number, username?: string }
UserPostRequest: { username?: string, password?: string }
UserPutRequest: { username?: string, password?: string }
UserPatchRequest: { username?: string, password?: string }

Yeah, they should. You are right.

from openapi-ts.

mrlubos avatar mrlubos commented on August 10, 2024

@tajnymag okay let me think about this. I pushed some changes yesterday that extract types for data objects when using --useOptions, more cool stuff to follow.

P.S. I believe --useOptions should be the default setting, and plan to support mostly that flag in the future

from openapi-ts.

tajnymag avatar tajnymag commented on August 10, 2024

@mrlubos Unfortunately I don't have anything to share. As I really needed multipart forms supported I've used the official openapi generator. Similarly, as the readOnly and writeOnly properties weren't well supported by any generator I had found, I manually created schemas for requests and responses.

from openapi-ts.

mrlubos avatar mrlubos commented on August 10, 2024

@tajnymag are you not currently using this package then?

from openapi-ts.

tajnymag avatar tajnymag commented on August 10, 2024

@tajnymag are you not currently using this package then?

Unfortunately I am not. I would like to though. The official generators are lacking in so many other ways.

from openapi-ts.

mrlubos avatar mrlubos commented on August 10, 2024

Why don't you use https://github.com/drwpow/openapi-typescript @tajnymag?

from openapi-ts.

tajnymag avatar tajnymag commented on August 10, 2024

Why don't you use https://github.com/drwpow/openapi-typescript @tajnymag?

I didn't want to hardcode any urls into the client. Also I subjectively dislike the API of drwpow/openapi-typescript

from openapi-ts.

Related Issues (20)

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.