Comments (13)
If we don't specify an operationId, the API will look like this:
api.users.usersControllerCreate() -> UsersControllerCreateResponse
api.carts.cartsControllerCreate() -> CartsControllerCreateResponse
api.bookings.bookingsControllerCreate() -> BookingsControllerCreateResponse
from openapi-ts.
Try https://heyapi.vercel.app/openapi-ts/migrating.html#v0-46-0
from openapi-ts.
Wow, it works as expected!
Thank you.
from openapi-ts.
Hey @ianberdin, is this a regression?
from openapi-ts.
No, it's not. I can't use the next version 0.46.* because it breaks completely, so I'm using 0.45.3.
from openapi-ts.
There is no this
on root file, I see it does not use classes anymore (0.46.*):
from openapi-ts.
Thank you for your quick response. The issue with this
has been resolved.
The main problem now is non-unique names when using a custom operationId. Is there a way to fix this?
from openapi-ts.
And this, if I set new hey-api fetch client:
from openapi-ts.
Not that I'm aware, will need to look at this. Thanks for reporting!
from openapi-ts.
If I remove the operationId, it will look like this:
api.users.usersControllerCreate()
- not very appealing for a customer-facing API :(
from openapi-ts.
Are you on Discord @ianberdin? Would like to understand your use case better
from openapi-ts.
I've sent you a request in Discord.
@ianberdin mine username.
from openapi-ts.
I think you can resolve this with services.methodNameBuilder(), let me know if not
from openapi-ts.
Related Issues (20)
- Remove `$OpenApiTs` from type generation file HOT 1
- [methodNameBuilder] KO without asClass: true, HOT 4
- Typescript client not working when fastapi responses are in camelCase HOT 6
- Generic Types Not Resolving Correctly HOT 1
- Get response headers HOT 19
- Specifying local client doesn't work - it's overridden by global client HOT 5
- "import" isn't always renamed to "_import" when generating schema HOT 6
- How can I customize withCredentials option in axios? HOT 9
- combination of anyOf with root properties produces union of all including the root HOT 1
- Duplicated response type caused by long $ref HOT 8
- type generation with server side event HOT 1
- AdditionalProperties renders as `unknown`
- Export types from `@hey-api/client-fetch` HOT 5
- There will be an error when operationId is a js keyword, I think we should give this class a prefix or something HOT 7
- Login API with OAuth2PasswordRequestForm Fails Due to Incorrect Content-Type HOT 6
- Dependency-free support for new Fetch API client
- Node.js errors seem not caught by the library HOT 1
- Downloading a PDF file from generated contract throws error as treating file a JSON HOT 5
- Unable to prompt browser to save file with 'content-disposition: attachment;' HOT 4
- Explicit type annotation for all exports 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.