Skip to content

Conversation

@guohuang
Copy link
Contributor

For #2579 @wing328 I added "UserAgent" to config struct, i tried running the CLI with --http-user-agent it replaced the default value as expected.

ApiKey: make(map[string]string),
ApiKeyPrefix: make(map[string]string) ,
ApiKeyPrefix: make(map[string]string),
UserAgent: "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/{{{version}}}/go{{/httpUserAgent}}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guohuang I think {{version}} (the API spec version) should be replaced by {{packageVersion}} (SDK version)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is inconsistent, in php, it uses {artifactVersion}}, anyway, the code has been updated, it worked.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, different languages have different CLI name for option. For perl, it's moduleVersion. For Ruby, it's gemVersion.

I did it that way because Perl developers would have no idea what artifactVersion is and moduleVersion should be more familiar to them, and similarly for other languages.

@wing328 wing328 added this to the v2.2.0 milestone Apr 14, 2016
@wing328
Copy link
Contributor

wing328 commented Apr 14, 2016

@guohuang thanks for the contribution as always.

@wing328 wing328 merged commit 50eacbe into swagger-api:master Apr 14, 2016
@guohuang guohuang deleted the issue2579 branch April 15, 2016 02:57
@wing328 wing328 mentioned this pull request Apr 27, 2016
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants