-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[typescript-fetch-client] can not get the property value from the response msg #3818
Comments
You can set the
Ref: https://github.com/swagger-api/swagger-codegen#online-generators |
i have the same problem, but i (and i assume the OP) actually want camel case on the client. is the proposal to fix this or to use snake case as a workaround? |
@adamduffy have you tried setting |
just tried that and got the same results. the problem is with the rest response. if the values are in snake case and the typescript interface is in camel case, the two do not work together. the method signature is #3105 could also be solved at the same time we are doing this snake to camel logic in the rest client we have manually written, along with inheritance, asserting required props, child nesting, date formatting, etc. it got quite complex so i was hoping to automate it. |
I have the same problem as @fish2016 and @adamduffy had. I use a REST api where the json response is configured to be I want to keep this configuration but I don't know how to map the Thank you |
@MohamedHamouGisaia Did you ever figure out a solution to this problem? I'm running into the exact same problem right now. |
Any progress here? |
Description
Just like the following YAML and typescript-fetch-client generated code, the property name in YALM is of Snake case,
but the property name in generated typescript code is of camel case;
the name in YALM isn't same with the name in generated code,
so the value in message can not be resolved with the property name in the generated code.
after change the name in the generated code to snake case format, the value in message can be gotten correctly.
Is there any workaround to this issue?
This is the declaration of the response message in YAML
`CardBatchGetResp:
`
This is the typescript-fetch-client generated code from the declaration in YAML
`
export interface CardBatchGetResp {
}`
Swagger-codegen version
I don't konw which version am I using,
I use "http://editor.swagger.io/#/" to generate code, I know that Swagger Editor version is 2.10.3
The text was updated successfully, but these errors were encountered: