You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating the client, the output is the following Dart code:
///@param name name of user ///@param email email of user ///@param password password of user ///@param password_confirmation password confirmation of user@Post(path:'/register', optionalBody:true)
Future<chopper.Response<User>> registerPost(
{@Field() requiredString? name,
@Field() requiredString? email,
@Field() requiredString? password,
@Field() requiredString? passwordConfirmation});
As you can see, the field password_confirmation appears as camel case in the code. This does not get processed by the API and the request fails.
Expected behavior
The proper output should include the password_confirmation field as follows:
Describe the bug
When generating formData requests, the generator doesn't handle underscore (
_
) in form field names well.To Reproduce
I have the following request in our API definition:
When generating the client, the output is the following Dart code:
As you can see, the field
password_confirmation
appears as camel case in the code. This does not get processed by the API and the request fails.Expected behavior
The proper output should include the
password_confirmation
field as follows:Library version used:
The text was updated successfully, but these errors were encountered: