Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

New acronyms #183

Merged
merged 2 commits into from
Dec 27, 2021
Merged

New acronyms #183

merged 2 commits into from
Dec 27, 2021

Conversation

muvaf
Copy link
Member

@muvaf muvaf commented Dec 21, 2021

Description of your changes

Adds new acronyms that I needed in Jet AWS to the list. Some of them are AWS-specific, like EC2, but I think that's probably harmless since there is no context that they can be real words.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

With Jet AWS.

Signed-off-by: Muvaffak Onus <me@muvaf.com>
@muvaf muvaf requested a review from ulucinar December 21, 2021 16:13
@@ -87,17 +86,17 @@ func DefaultResource(name string, terraformSchema *schema.Resource, opts ...Reso
// - aws_rds_cluster => Cluster
// - aws_rds_cluster_parameter_group => ClusterParameterGroup
// - kafka_topic => Topic
kind := strcase.ToCamel(strings.Join(words[2:], "_"))
kind := tjname.NewFromSnake(strings.Join(words[2:], "_")).Camel
Copy link
Member Author

Choose a reason for hiding this comment

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

Otherwise, strcase.ToCamel treates ec2 as two words Ec and 2, which causes it not to be found in the acronyms list.

Copy link
Member

Choose a reason for hiding this comment

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

I needed this in provider-jet-gcp as well for hl7 to HL7 👍

…n be handled properly because first converting to camel makes it see ec and 2 as different words

Signed-off-by: Muvaffak Onus <me@muvaf.com>
@turkenh turkenh merged commit 2299925 into crossplane:main Dec 27, 2021
@muvaf muvaf deleted the new-acros branch December 27, 2021 12:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants