Skip to content

httpmock generation fails for query params with array types (e.g., Vec<T>) #1260

Description

@danieleades

The httpmock generator currently stringifies all query/header/path params via value.to_string() (see progenitor-impl/src/httpmock.rs). This implicitly requires Display and only supports single-value params.

For array query params (e.g., Vec), Display isn’t implemented and the generated mocks won’t compile.

It also doesn’t match the client’s actual query encoding (QueryParam uses serde and supports arrays by repeating the key). Should switch httpmock query matching to use the same serialization logic as the client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions