amplify-category-api
amplify-category-api copied to clipboard
fix: handle Enums correctly on Typescript data schema generation
Description of changes
- Update Schema generator package to add handling of enums globally
- Inside the model use ref() to define those enums
- Added unit test to handle various combination of enum possibilities for Postgresql and mysql
This change would only affect an existing customer only if they re import the schema which is highly unlikely so we have determined this change to be a non breaking change.
CDK / CloudFormation Parameters Changed
Issue #, if available
https://github.com/aws-amplify/amplify-category-api/issues/2596
Description of how you validated changes
- Updated a current test snapshot
- Added more unit tests to validate proper enum handling generating snapshots and passing tests.
Checklist
- [x] PR description included
- [x]
yarn testpasses - [x] Tests are changed or added
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.