Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: The URL parameters with underscores cannot be correctly converte…
…d to camel case. jonasbark#7 jonasbark#7 The URL parameters with underscores are not being correctly converted to camel case in the generated code. This issue occurs when using the OpenAPI YAML file with the following configuration: /v1/students/{student_id}/courses/reading: get: operationId: getV1StudentsStudentIdCourses parameters: - name: student_id in: path required: true schema: type: string Generated Code Example The generated code does not properly convert the student_id parameter to camel case (studentId): Future<Response<ApiV1EntitiesBasicCourse>> getV1StudentsStudentIdCourses( {required String studentId}) async { final queryParams = <String, dynamic>{}; final uri = baseUri.replace( queryParameters: queryParams, path: baseUri.path + '/v1/students/${student_id}/courses'); final response = await dio.getUri<Map<String, dynamic>>(uri); final parsed = ApiLearningV1EntitiesBasicCourse.fromJson(response.data!); return Response<ApiLearningV1EntitiesBasicCourse>( data: parsed, headers: response.headers, requestOptions: response.requestOptions, isRedirect: response.isRedirect, statusCode: response.statusCode, redirects: response.redirects, extra: response.extra, ); } Expected Behavior The parameter student_id should be correctly converted to camel case (studentId) in the generated code, ensuring consistency and correct functionality.
- Loading branch information