amplify-category-api
amplify-category-api copied to clipboard
[DONOT MERGE]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
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.