Giter VIP home page Giter VIP logo

Comments (8)

stackblitz avatar stackblitz commented on August 10, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

from openapi-ts.

mrlubos avatar mrlubos commented on August 10, 2024

Thanks! Where did you get the import in types from? Can you paste that part of your OpenAPI spec so I don't have to recreate it myself?

from openapi-ts.

karolisKTri avatar karolisKTri commented on August 10, 2024

I added modified schema in stackblitz example, check file: openapi.json. I updated openapi-ts.config.ts so that you can edit it in project and regenerate any time.

I can paste it here as well if you need it anyway?

from openapi-ts.

mrlubos avatar mrlubos commented on August 10, 2024

Nope, all good, I missed that. Will have a look – thanks for reporting (again)!

from openapi-ts.

mrlubos avatar mrlubos commented on August 10, 2024

Hey @karolisKTri, until this is resolved, you should be able to use services.methodNameBuilder() to work around it. Let me know if that doesn't help

EDIT: disregard, this won't help with types

from openapi-ts.

mrlubos avatar mrlubos commented on August 10, 2024

@karolisKTri this is now properly handled, let me know if you have any more issues!

from openapi-ts.

karolisKTri avatar karolisKTri commented on August 10, 2024

Once I made the update the problem the problem with import is gone.
But now there is a problem in services.gen.ts:

const client: Client<Request, Response, RequestOptions>

image
Unfortunately I can't reproduce it in Stackblitz.
The "fix" that I found is to modify generated file with return type for client:
export const client: ReturnType<typeof createClient> = createClient(createConfig());
Probably I should file a separate bug, but maybe you'll know something right away?

from openapi-ts.

mrlubos avatar mrlubos commented on August 10, 2024

@karolisKTri open a new issue please, think it's time to write a proper type for clients because this issue keeps popping up with various interfaces

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.