swagger-api / swagger-api/swagger-codegen

[Go] Change query parameters to use `go-querystring` from `map[string]interface{}`

Open
#7,196 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description / Suggest an enhancement

Version 2.3.0 made a huge improvement for query string parameters by moving to a map[string]interface{} from a sequence of function parameters. Moving further to a query string parameter struct using Google's go-querystring (https://github.com/google/go-querystring) seems like it would be a nice enhancement.

Note: I still need to try out 3.0.0 to see if this is there already. I noticed it doesn't use the -c flag any more so need to look into this more.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by comparing generated Go client query-parameter handling in versions 2.3.0 and 3.0.0, including the changed -c flag, and check whether go-querystring is already used. Done should be defined by identifying the affected generator templates and tests, then confirming the requested struct-based query parameters work.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.