Skip to content
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

2.1.0-prerelease.2/3 is using snake_cased method names and incorrect type names #204

Closed
point-source opened this issue Aug 5, 2021 · 1 comment · Fixed by #217
Closed

Comments

@point-source
Copy link

It seems that methods are being named with snake_case and types have been inconsistently named such that the names don't match between the class declaration and references.

Specifically, this:

  ///
  ///@param external_code
  ///@param name
  ///@param slug
  ///@param limit Number of results to return per page.
  ///@param offset The initial index from which to return the results.

  @Get(path: '/account_event_statuses')
  Future<chopper.Response<AccountEventStatusesGet$Response>>
      accountEventStatusesList(
          {@Query('external_code') String? external_code,
          @Query('name') String? name,
          @Query('slug') String? slug,
          @Query('limit') int? limit,
          @Query('offset') int? offset});

has changed to this:

  ///
  ///@param external_code
  ///@param name
  ///@param slug
  ///@param limit Number of results to return per page.
  ///@param offset The initial index from which to return the results.
  @Get(path: '/account_event_statuses')
  Future<chopper.Response<AccountEventStatusesList$Response>>
      account_event_statuses_list(
          {@Query('external_code') String? external_code,
          @Query('name') String? name,
          @Query('slug') String? slug,
          @Query('limit') int? limit,
          @Query('offset') int? offset});

Since the new code does not follow dart format conventions, the analyzer warns on the snake-case method names.

Additionally, the new type name AccountEventStatusesList$Response does not resolve since the definition for it is still named AccountEventStatusesGet$Response.

I have tested this on this package using 2.1.0-prerelease .2 and .3: https://github.com/point-source/dart_lasso

Originally posted by @point-source in #200 (comment)

@Vovanella95
Copy link
Collaborator

Hi @point-source ,

We decided to always generate request names from path and remove next build option: use_path_for_request_names

If your project uses version less than 2.1.0-prerelease.7, please just set use_path_for_request_names to true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants