The java builder steps did not respect handleListNullabilityTransparently. This was an issue because the code generation for the builder step interfaces did respect handleListNullabilityTransparently. This would sometimes result in a case where a builder step was created but the interface for the builder step was not created.
For the following model when handleListNullabilityTransparently is true, the builder step would be crated but the interface would not be created resulting in compilation error.
This is only an issue when handleListNullabilityTransparently is true, there is a field with required element optional list ([String!]), and there is no required field before the list field.
This would not have the issue
type Foo @model {
someRequiredField: String!
items: [String!]
}
Description of changes
The java builder steps did not respect
handleListNullabilityTransparently
. This was an issue because the code generation for the builder step interfaces did respecthandleListNullabilityTransparently
. This would sometimes result in a case where a builder step was created but the interface for the builder step was not created.For the following model when
handleListNullabilityTransparently
is true, the builder step would be crated but the interface would not be created resulting in compilation error.Interface creation: https://github.com/aws-amplify/amplify-codegen/blob/a909ff333af7513c6babfa8cf5f6cfce57e854e5/packages/appsync-modelgen-plugin/src/visitors/appsync-java-visitor.ts#L412-L419
Builder step creation: https://github.com/aws-amplify/amplify-codegen/blob/a909ff333af7513c6babfa8cf5f6cfce57e854e5/packages/appsync-modelgen-plugin/src/visitors/appsync-java-visitor.ts#L949-L955
This is only an issue when
handleListNullabilityTransparently
is true, there is a field with required element optional list ([String!]
), and there is no required field before the list field.This would not have the issue
Codegen Paramaters Changed or Added
N/A
Issue #, if available
N/A
Description of how you validated changes
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.