Open lunat opened 7 years ago
@lunat this sounds like a reasonable fix to me. Are you able to submit a PR and verify that it has resolved your issue?
@lunat @jimschubert should the users change the localization setting instead in his/her PC?
@wing328 It's not really reasonable to expect every client consumer to change their machine locale to en-US. Ideally, the format would be a configurable option in the spec, but the spec doesn't support that, as far as I'm aware.
I would think the best approach for now is to the input/output format for the API is a known format.
We may want to consider supporting global formatting configurations (number, currency, date) and then supporting per-operation formatting. What are your thoughts with that approach?
Hi,
In file ApiClient, the Method
public string ParameterToString(object obj)
contains an error at row: https://github.com/swagger-api/swagger-codegen/blob/c6b6249f1c792be804b2fb991cd0e104ce169536/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache#L311If I use a localization different from "US" and I have a double value this row returns a number with a comma "," instead dot "."
I think it should be better to return always the "dotted" number adding another "else if" condition:
Thanks,
lunat