Skip to content

[FEATURE] Allow setting Chopper request options #820

@hai-trung-le

Description

@hai-trung-le

(This is an extension of #642)

Is your feature request related to a problem? Please describe.
Chopper allows customizing some aspects of generated request handler, e.g., for GET request, the default syntax for nested query string is ?foo.bar.id=3, but we can change it to ?foo[bar][id]=3 by setting the argument listFormat:

@GET(path: '/api/user', listFormat: ListFormat.brackets)

However, there is no way to change those arguments in the *.swagger.dart file, other than manual editing, which is a cumbersome 3-step process (delete *.swagger.chopper.dart, edit *.swagger.dart, run build_runner)

Describe the solution you'd like
Options to set custom values for Chopper request handlers.

Swagger specification link
N/A

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions