amplify-codegen
amplify-codegen copied to clipboard
fix(modelgen-swift): respect index sk fields in associate fields
Description of changes
- The
associatedWithfields now respect the index sortKeyFields in explicit uni hasMany relation. This change only affects swift modelgen. - Rewrite the flag value parsing for
processDirectives. Add new type definition and default value for directive process configuration.
Issue #, if available
Fix #539
Description of how you validated changes
yarn test
amplify-dev codegen models
Checklist
- [x] PR description included
- [x]
yarn testpasses - [ ] Tests are changed or added
- [ ] Relevant documentation is changed or added (and PR referenced)
- [ ] Breaking changes to existing customers are released behind a feature flag or major version update
- [ ] Changes are tested using sample applications for all relevant platforms (iOS/android/flutter/Javascript) that use the feature added/modified
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Codecov Report
Merging #542 (f0bc596) into main (181480d) will increase coverage by
0.02%. The diff coverage is96.55%.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@ Coverage Diff @@
## main #542 +/- ##
==========================================
+ Coverage 85.69% 85.71% +0.02%
==========================================
Files 148 148
Lines 7380 7364 -16
Branches 1962 1958 -4
==========================================
- Hits 6324 6312 -12
+ Misses 959 955 -4
Partials 97 97
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...-plugin/src/visitors/appsync-typescript-visitor.ts | 82.89% <0.00%> (+1.60%) |
:arrow_up: |
| ...nc-modelgen-plugin/src/utils/process-belongs-to.ts | 94.11% <100.00%> (+0.17%) |
:arrow_up: |
| ...odelgen-plugin/src/utils/process-connections-v2.ts | 92.20% <100.00%> (-0.20%) |
:arrow_down: |
| ...sync-modelgen-plugin/src/utils/process-has-many.ts | 90.80% <100.00%> (+0.44%) |
:arrow_up: |
| ...psync-modelgen-plugin/src/utils/process-has-one.ts | 96.15% <100.00%> (+3.84%) |
:arrow_up: |
| ...delgen-plugin/src/visitors/appsync-dart-visitor.ts | 98.11% <100.00%> (-0.01%) |
:arrow_down: |
| ...delgen-plugin/src/visitors/appsync-java-visitor.ts | 94.78% <100.00%> (-0.03%) |
:arrow_down: |
| ...-plugin/src/visitors/appsync-javascript-visitor.ts | 97.72% <100.00%> (-0.15%) |
:arrow_down: |
| ...ugin/src/visitors/appsync-json-metadata-visitor.ts | 95.74% <100.00%> (-0.14%) |
:arrow_down: |
| ...rc/visitors/appsync-model-introspection-visitor.ts | 98.66% <100.00%> (-0.06%) |
:arrow_down: |
| ... and 2 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more