Skip to content

Conversation

@wing328
Copy link
Contributor

@wing328 wing328 commented Mar 14, 2016

Make the User-Agent configurable via --http-user-agent CLI option.

Default to Swagger-Codegen/{version}/{language}

@wing328 wing328 force-pushed the user_agent_update branch from a6cd10d to 6d2649d Compare March 15, 2016 03:42
wing328 added a commit that referenced this pull request Mar 15, 2016
Update User-Agent for Ruby, Python, PHP, Java, Android
@wing328 wing328 merged commit d02d3df into swagger-api:master Mar 15, 2016
@jqr
Copy link
Contributor

jqr commented Mar 15, 2016

I'm curious why this was made an option to generate instead of something in the config.json. Is there a general move towards options for new things?

@wing328
Copy link
Contributor Author

wing328 commented Mar 15, 2016

You can also supply the CLI option in the config, e.g.

{
  "sortParamsByRequiredFlag": true,
  "optionalAssemblyInfo": true,
  "httpUserAgent": "XXXXXX"
}

I did a test and worked for me. Can you give that a try?

@wing328 wing328 deleted the user_agent_update branch March 15, 2016 15:55
@jqr
Copy link
Contributor

jqr commented Mar 15, 2016

Ah, that makes sense. Thanks!

@inska
Copy link

inska commented Apr 27, 2016

Hi @wing328,

When can I do like this on the Swift Client?

Thanks,

@wing328
Copy link
Contributor Author

wing328 commented Apr 27, 2016

@inska I don't think anyone from the community has started working on it. I'll create a separate task for tracking to implement customisable user-agent in other langauges.

@wing328 wing328 mentioned this pull request Apr 27, 2016
17 tasks
@wing328
Copy link
Contributor Author

wing328 commented Apr 27, 2016

Now track via #2715

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.

3 participants