New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support enum types with numeric values #889
Comments
amazonka-apigateway
: CacheClusterSize enum has no patternsSame output as brendanhay#862, but sticks to `HashMap` internally to avoid triggering https://github.com/brendanhay/amazonka/issue/888 A couple of enums change value in a strange way, because the generator cannot handle enums-of-numeric values. See brendanhay#889
Given both of the examples have floating point values - is the desired behaviour to just |
I think we should just do |
Yeah - considering if there’s any low hanging things that are breaking changes. I’ll take a look at this one today. |
Okay, I've looked into this and it's annoying enough and affecting few enough people that I want to kick it back to post-2.0:
I don't really want to keep piling hacks atop hacks in this version of the generator. In the medium term, I want to build an AST representation of the data as it is represented in botocore, parsed out using waargonaut. (Unlike aeson, waargonaut remembers the order of keys in JSON objects, which is important for things like correctly emitting field names in order). Once we have that AST, I want to build a new version of the generator which takes the simplest necessary service description and write an adapter function between them. This will mean that people using IAM authentication with API Gateway can generate their own amazonka-style APIs to access them; Amazon's own Selling Partner API (SP-API) is a prominent example. |
Example: Every value in
apigateway
'sCacheClusterSize
type contains only numbers and dots, so they all get mashed together into a single strange pattern:https://github.com/boto/botocore/blob/ac9ce8eb9ab4296608c95c5d04461266925d90e2/botocore/data/apigateway/2015-07-09/service-2.json#L2337-L2350
Affected types include:
amazonka-apigateway
:CacheClusterSize
amazonka-cloudhsm
:ClientVersion
The text was updated successfully, but these errors were encountered: