Skip to content

Commit d201417

Browse files
committed
Merge branch 'master' into madetech-fix-api-gateway-requests
2 parents fbad6ba + ca367e3 commit d201417

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ to generate Elixir code. Code is generated by running the `generate.exs`
1010
script for Elixir:
1111

1212
```bash
13-
export SPEC_PATH=../../awslabs/aws-sdk-go/models/apis
13+
export SPEC_PATH=../../aws/aws-sdk-go/models/apis
1414
export TEMPLATE_PATH=priv
1515
export OUTPUT_PATH=../aws-elixir/lib/aws
1616
mix run generate.exs elixir $SPEC_PATH $TEMPLATE_PATH $OUTPUT_PATH
@@ -19,7 +19,7 @@ mix run generate.exs elixir $SPEC_PATH $TEMPLATE_PATH $OUTPUT_PATH
1919
and for Erlang:
2020

2121
```bash
22-
export SPEC_PATH=../../awslabs/aws-sdk-go/models/apis
22+
export SPEC_PATH=../../aws/aws-sdk-go/models/apis
2323
export TEMPLATE_PATH=priv
2424
export OUTPUT_PATH=../aws-erlang/src
2525
mix run generate.exs erlang $SPEC_PATH $TEMPLATE_PATH $OUTPUT_PATH

lib/aws_codegen.ex

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
defmodule AWS.CodeGen do
22
@elixir_services [
3+
{:json, "AWS.AppStream", "appstream/2016-12-01", "appstream.ex", []},
34
{:json, "AWS.AutoScaling", "application-autoscaling/2016-02-06", "autoscaling.ex", []},
5+
{:json, "AWS.Budgets", "budgets/2016-10-20", "budgets.ex", []},
46
{:json, "AWS.CertificateManager", "acm/2015-12-08", "certificate_manager.ex", []},
57
{:json, "AWS.CloudHSM", "cloudhsm/2014-05-30", "cloud_hsm.ex", []},
68
{:json, "AWS.CloudTrail", "cloudtrail/2013-11-01", "cloud_trail.ex", []},
79
{:json, "AWS.CloudWatch.Events", "events/2015-10-07", "cloudwatch_events.ex", []},
10+
{:json, "AWS.CodeBuild", "codebuild/2016-10-06", "code_build.ex", []},
811
{:json, "AWS.CodeCommit", "codecommit/2015-04-13", "code_commit.ex", []},
912
{:json, "AWS.CodeDeploy", "codedeploy/2014-10-06", "code_deploy.ex", []},
1013
{:json, "AWS.CodePipeline", "codepipeline/2015-07-09", "code_pipeline.ex", []},
1114
{:json, "AWS.Cognito", "cognito-identity/2014-06-30", "cognito.ex", []},
1215
{:json, "AWS.Cognito.IdentityProvider", "cognito-idp/2016-04-18", "cognito_identity_provider.ex", []},
1316
{:json, "AWS.Config", "config/2014-11-12", "config.ex", []},
17+
{:json, "AWS.CostAndUsageReport", "cur/2017-01-06", "cost_and_usage_report.ex", []},
1418
{:json, "AWS.DMS", "dms/2016-01-01", "dms.ex", []},
1519
{:json, "AWS.DataPipeline", "datapipeline/2012-10-29", "data_pipeline.ex", []},
1620
{:json, "AWS.DeviceFarm", "devicefarm/2015-06-23", "device_farm.ex", []},
@@ -23,32 +27,50 @@ defmodule AWS.CodeGen do
2327
{:json, "AWS.ECS", "ecs/2014-11-13", "ecs.ex", []},
2428
{:json, "AWS.EMR", "elasticmapreduce/2009-03-31", "emr.ex", []},
2529
{:json, "AWS.GameLift", "gamelift/2015-10-01", "gamelift.ex", []},
30+
{:json, "AWS.Health", "health/2016-08-04", "health.ex", []},
2631
{:json, "AWS.Inspector", "inspector/2016-02-16", "inspector.ex", []},
2732
{:json, "AWS.Kinesis", "kinesis/2013-12-02", "kinesis.ex", []},
33+
{:json, "AWS.Kinesis.Analytics", "kinesisanalytics/2015-08-14", "kinesis_analytics.ex", []},
2834
{:json, "AWS.Kinesis.Firehose", "firehose/2015-08-04", "kinesis_firehose.ex", []},
2935
{:json, "AWS.KMS", "kms/2014-11-01", "kms.ex", []},
36+
{:json, "AWS.Lightsail", "lightsail/2016-11-28", "lightsail.ex", []},
3037
{:json, "AWS.Logs", "logs/2014-03-28", "logs.ex", []},
3138
{:json, "AWS.MachineLearning", "machinelearning/2014-12-12", "machine_learning.ex", []},
3239
{:json, "AWS.Marketplace.CommerceAnalytics", "marketplacecommerceanalytics/2015-07-01", "marketplace_commerce_analytics.ex", []},
3340
{:json, "AWS.Marketplace.Metering", "meteringmarketplace/2016-01-14", "marketplace_metering.ex", []},
41+
{:json, "AWS.MechanicalTurk", "mturk-requester/2017-01-17", "mechanical_turk.ex", []},
3442
{:json, "AWS.OpsWorks", "opsworks/2013-02-18", "ops_works.ex", []},
43+
{:json, "AWS.OpsWorks.ChefAutomate", "opsworkscm/2016-11-01", "ops_works_chef_automate.ex", []},
44+
{:json, "AWS.Organizations", "organizations/2016-11-28", "organizations.ex", []},
45+
{:json, "AWS.Rekognition", "rekognition/2016-06-27", "rekognition.ex", []},
3546
{:json, "AWS.Route53.Domains", "route53domains/2014-05-15", "route53_domains.ex", []},
3647
{:json, "AWS.SSM", "ssm/2014-11-06", "ssm.ex", []},
3748
{:json, "AWS.ServiceCatalog", "servicecatalog/2015-12-10", "service_catalog.ex", []},
49+
{:json, "AWS.Shield", "shield/2016-06-02", "shield.ex", []},
50+
{:json, "AWS.Snowball", "snowball/2016-06-30", "snowball.ex", []},
51+
{:json, "AWS.StepFunctions", "states/2016-11-23", "step_functions.ex", []},
3852
{:json, "AWS.StorageGateway", "storagegateway/2013-06-30", "storage_gateway.ex", []},
3953
{:json, "AWS.Support", "support/2013-04-15", "support.ex", []},
54+
{:json, "AWS.SMS", "sms/2016-10-24", "sms.ex", []},
55+
{:json, "AWS.SSM", "ssm/2014-11-06", "ssm.ex", []},
4056
{:json, "AWS.SWF", "swf/2012-01-25", "swf.ex", []},
4157
{:json, "AWS.WAF", "waf/2015-08-24", "waf.ex", []},
58+
{:json, "AWS.WAF.Regional", "waf-regional/2016-11-28", "waf_regional.ex", []},
4259
{:json, "AWS.Workspaces", "workspaces/2015-04-08", "workspaces.ex", []},
4360
{:rest_json, "AWS.APIGateway", "apigateway/2015-07-09", "api_gateway.ex", [:strip_trailing_slash_in_url]},
61+
{:rest_json, "AWS.Batch", "batch/2016-08-10", "batch.ex", []},
62+
{:rest_json, "AWS.CloudDirectory", "clouddirectory/2016-05-10", "cloud_directory.ex", []},
4463
{:rest_json, "AWS.Cognito.Sync", "cognito-sync/2014-06-30", "cognito_sync.ex", []},
4564
{:rest_json, "AWS.EFS", "elasticfilesystem/2015-02-01", "efs.ex", []},
4665
{:rest_json, "AWS.Glacier", "glacier/2012-06-01", "glacier.ex", []},
4766
{:rest_json, "AWS.IoT", "iot/2015-05-28", "iot.ex", []},
4867
{:rest_json, "AWS.IoT.DataPlane", "iot-data/2015-05-28", "iot_data.ex", []},
4968
{:rest_json, "AWS.Lambda", "lambda/2015-03-31", "lambda.ex", []},
5069
{:rest_json, "AWS.MobileAnalytics", "mobileanalytics/2014-06-05", "mobile_analytics.ex", []},
70+
{:rest_json, "AWS.Polly", "polly/2016-06-10", "polly.ex", []},
71+
{:rest_json, "AWS.LexRuntime", "runtime.lex/2016-11-28", "lex_runtime.ex", []},
5172
{:rest_json, "AWS.Transcoder", "elastictranscoder/2012-09-25", "transcoder.ex", []},
73+
{:rest_json, "AWS.XRay", "xray/2016-04-12", "xray.ex", []},
5274
]
5375

5476
@erlang_services [

lib/aws_codegen/name.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ defmodule AWS.CodeGen.Name do
44
"""
55
def to_snake_case(text) do
66
String.replace(text, "iSCSI", "Iscsi")
7+
|> String.replace("BGP", "Bgp")
8+
|> String.replace("CSV", "Csv")
9+
|> String.replace("NFS", "Nfs")
710
|> String.replace("VTL", "Vtl")
811
|> String.replace("UUID", "Uuid")
912
|> String.to_char_list

test/aws_codegen/name_test.exs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ defmodule AWS.CodeGen.NameTest do
1010
assert "nerdy_caps" = Name.to_snake_case("nerdyCaps")
1111
end
1212

13+
test "to_snake_case/1 special cases BGP" do
14+
assert "create_bgp_peer" = Name.to_snake_case("CreateBGPPeer")
15+
end
16+
17+
test "to_snake_case/1 special cases CSV" do
18+
assert "get_csv_header" = Name.to_snake_case("GetCSVHeader")
19+
end
20+
21+
test "to_snake_case/1 special cases NFS" do
22+
assert "create_nfs_peer" = Name.to_snake_case("CreateNFSPeer")
23+
end
24+
1325
test "to_snake_case/1 special cases iSCSI" do
1426
assert "create_cached_iscsi_volume" = Name.to_snake_case("CreateCachediSCSIVolume")
1527
end

0 commit comments

Comments
 (0)