-
Notifications
You must be signed in to change notification settings - Fork 16
Bug: encoding
option in requestBody is not respected.
#104
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
Comments
Thanks for the info. It looks like I will need to change the ApiClient interface to implement this. export interface ApiClient<RequestOption> {
request: <T = SuccessResponses>(httpMethod: HttpMethod, url: string, headers: ObjectLike | any, requestBody: ObjectLike | any, queryParameters: QueryParameters | undefined, options?: RequestOption) => Promise<T>;
} Should I make the argument an I would like to hear your opinion. |
IMO, accepting object as an argument is a good choice. |
I also agree this. I think it's a common best practice to keep public API arguments defines as dict. |
you can check in playground v0,25.0 https://openapi-typescript-code-generator.netlify.app/v0.25.0/index.html Perhaps the Himenon/openapi-parameter-formatter would work well. |
Uh oh!
There was an error while loading. Please reload this page.
Steps To Reproduce
According to the OpenAPI 3.0 definition, requestBody has
encoding
option.However, the
encoding
option is missing from the generated code.The current behavior
encoding
option is dissappearThe expected behavior
encoding
option should be respected.IMO, if Content-Type is
application/x-www-form-urlencoded
,encoding
option is required for the type ofrequestBody
.The text was updated successfully, but these errors were encountered: