Skip to content

fix: generating compiling code for enum-typed responses - #855

Open
maximeroucher wants to merge 2 commits into
epam-cross-platform-lab:masterfrom
maximeroucher:upstream/fix/enum-response-types
Open

maximeroucher wants to merge 2 commits into
epam-cross-platform-lab:masterfrom
maximeroucher:upstream/fix/enum-response-types

Conversation

@maximeroucher

Copy link
Copy Markdown
Contributor

Fix generation of methods whose success response is an enum (or a list of enums), which previously produced non-compiling code referencing InvalidType.

  • Prefixes enum-typed response types with enums. in the chopper client (Future<chopper.Response<List<enums.AccountType>>>).
  • Adds a show import for the used enum types so the chopper part resolves them.
  • Stops registering enums as models in generatedMapping.
  • Adds tests for enum response references and model-mapping exclusion.

Fixes #802.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.32%. Comparing base (a08d9a4) to head (d3f96c6).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #855      +/-   ##
==========================================
+ Coverage   63.65%   64.32%   +0.67%     
==========================================
  Files           9        9              
  Lines        1183     1197      +14     
==========================================
+ Hits          753      770      +17     
+ Misses        430      427       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] InvalidType when return is an Array of Enum.

1 participant