You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new type to OperationConfig so user can implement CustomCheckRequiredFieldsMissingMethod (#112)
Issue #, if available:
[#850](aws-controllers-k8s/community#850)
Description of changes:
Adds new `pkg/generate/config.OperationConfig.CustomCheckRequiredFieldsMissingMethod `field of type *string so that user can implement a `CustomCheckRequiredFieldsMissingMethod` method as code-generator cannot handle certain cases.
ex. For the `SageMaker` resource `ModelPackage`. There are versioned `modelPackage` and unversioned `modelPackage`, they both have a different required field being `ModelPackageGroupName` and `ModelPackageName`. `requiredFieldsMissingFromReadOneInput` will by default auto-generate to check for `ModelPackageName` and will infinitely recreate since it will never find the required field when a user attempts to make a versioned `modelPackage` which is `modelPackageGroupName` as it does not contain a `ModelPackageName`. ModelPackage has one or the other for its required field but not both.
This new field allows the user to create their own custom implementation for `requiredFieldsMissingFromReadOneInput`, `requiredFieldsMissingFromSetAttributesInput`, and `requiredFieldsMissingFromGetAttributesInput`so that in cases where the auto-generated default required fields do not handle cases where it may be complicated ex: Have an exclusive-or of required fields.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
0 commit comments