Skip to content
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

Adding missing getters to ResourceSchema #2486

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

yasmewad
Copy link
Contributor

Background

  • When trying to get the required field from a CFN resourceSchema, I realized that the required and additionalProperties field do not have a getter making it impossible to retrieve the required field in CFN ResourceSchema via the ResourceSchema model.

Testing

  • gradle build

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@yasmewad yasmewad requested a review from a team as a code owner December 13, 2024 00:30
@yasmewad yasmewad requested a review from kstich December 13, 2024 00:30
@@ -231,6 +231,14 @@ public Map<String, Remote> getRemotes() {
return remotes;
}

public Set<String> getRequired() {
Copy link
Contributor

Choose a reason for hiding this comment

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

The current ordering of getters matches the class's properties at definition for ease of use, let's put these in their matching locations - required after properties and additionalProperties at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh okay.

@yasmewad yasmewad force-pushed the cfn-resource-getter branch from 59ad767 to 902186b Compare December 13, 2024 19:27
@yasmewad yasmewad merged commit d75650d into smithy-lang:main Dec 13, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants