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
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:
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.
The text was updated successfully, but these errors were encountered:
qwlong
changed the title
The URL parameters with underscores cannot be correctly converted to camel case.
The URL parameters with underscores /v1/{student_id}/courses cannot be correctly converted to camel case.
Jul 6, 2024
qwlong
added a commit
to qwlong/openapi_freezed_dio_builder
that referenced
this issue
Jul 6, 2024
…d to camel case. jonasbark#7jonasbark#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.
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:
Generated Code Example
The generated code does not properly convert the student_id parameter to camel case (studentId):
Expected Behavior
The parameter student_id should be correctly converted to camel case (studentId) in the generated code, ensuring consistency and correct functionality.
The text was updated successfully, but these errors were encountered: