Giter Site home page Giter Site logo

Comments (12)

mrlubos avatar mrlubos commented on July 20, 2024 1

I could add it if it was a huge dealbreaker due to migration or something like that, if you can live without it, there are other priorities :')

from openapi-ts.

hugokemme7 avatar hugokemme7 commented on July 20, 2024 1

No, thats okay. I will try to work around it with a cast.

from openapi-ts.

mrlubos avatar mrlubos commented on July 20, 2024

Hey @hugokemme7, are you migrating from older version or different solution?

from openapi-ts.

jordanshatford avatar jordanshatford commented on July 20, 2024

@hugokemme7 using unknown type makes more sense because the type is unknown. You could cast the resulting type to any. Is there any reason your object types are not better defined in your OpenAPI specification?

from openapi-ts.

hugokemme7 avatar hugokemme7 commented on July 20, 2024

@mrlubos I am migrating to a different solution

from openapi-ts.

hugokemme7 avatar hugokemme7 commented on July 20, 2024

@jordanshatford for loading data in a dropdown component we use a basic structure of {value: int, label: string}. However i now need to render a list that has the identifier of a guid instead of a int, so if i want to use the model and code behind it, i have to change value to type object.

from openapi-ts.

mrlubos avatar mrlubos commented on July 20, 2024

@hugokemme7 do you mind if I ask which one and why?

from openapi-ts.

hugokemme7 avatar hugokemme7 commented on July 20, 2024

@mrlubos I am sorry, I think i might have misunderstood you. I dont know if this will answer your question, but i use this library openapi-react-query-codegen. I use it to migrate my dotnet entities to tsx types. I originally placed an issue there, but he suggested i place it here, because they use this library for type specs etc.

from openapi-ts.

mrlubos avatar mrlubos commented on July 20, 2024

Gotcha @hugokemme7. Are you not able to use casting to any to work around the errors?

from openapi-ts.

hugokemme7 avatar hugokemme7 commented on July 20, 2024

@mrlubos yeah I could probably cast it, but it aint the cleanest solution. If there isnt a way to configure it, I will probably do that. Thanks for trying yo figure this out with me :)

from openapi-ts.

mrlubos avatar mrlubos commented on July 20, 2024

There isn't at the moment, it would have to be added as an option. How much of a pain is it to use type casting?

from openapi-ts.

hugokemme7 avatar hugokemme7 commented on July 20, 2024

@mrlubos it wouldnt be that much of a pain, was just more like my last resort option. Thanks for your time though.

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.