Comments (8)
Start a new pull request in StackBlitz Codeflow.
from openapi-ts.
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.
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.
Nope, all good, I missed that. Will have a look – thanks for reporting (again)!
from openapi-ts.
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.
@karolisKTri this is now properly handled, let me know if you have any more issues!
from openapi-ts.
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>
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.
@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)
- multipart/form-data with fetch client sends content-type application/json HOT 2
- Make `"auto"` the default `parseAs` option in `@hey-api/client-fetch` HOT 5
- Error with binary response HOT 8
- Wrong infered content type for excel documents HOT 13
- Transformed Date(s) in query ends up as empty string(s) HOT 3
- securitySchemes won't support GET api key authentication HOT 4
- fetch-client does not correctly handle multipart/form-data HOT 1
- Streaming HTTP query support HOT 2
- additionalProperties creates invalid key type
- Generated client-fetch services declares client locally, but it is not exported. HOT 2
- Fetch API docs don't match implementation HOT 7
- Some config options cannot be set through cli flags HOT 3
- Create explicit client interface
- Zod plugin HOT 4
- schemas.type form removes properties from schema HOT 1
- Cannot find name 'ThrowOnError' error TS2304 HOT 13
- Make `body` optional if all fields are optional
- `client-fetch` now required a `ThrowOnError` generic which breaks manually created services with `fetch-client` HOT 4
- ThrowOnError can not be set to true HOT 7
- client type error in services.gen.ts HOT 2
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-ts.