amplify-category-api icon indicating copy to clipboard operation
amplify-category-api copied to clipboard

[DONOT MERGE]fix: handle Enums correctly on Typescript data schema generation

Open tejas2008 opened this issue 1 year ago • 0 comments

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 test passes
  • [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.

tejas2008 avatar Oct 17 '24 20:10 tejas2008