datamodel-code-generator icon indicating copy to clipboard operation
datamodel-code-generator copied to clipboard

modify __typename field to honor `--use-default-kwarg` flag

Open rpmcginty opened this issue 5 months ago • 2 comments

What is in this change?

This PR attempts to fix a bug in the codegen for graphql inputs when --use-default-kwarg is true. Specifically the typename__ field does not comply.

This one-liner simply propagates this configuration to the typename__ data model field generation

Links

Fixes https://github.com/koxudaxi/datamodel-code-generator/issues/2419

Related to https://github.com/koxudaxi/datamodel-code-generator/issues/2095

rpmcginty avatar Jun 13 '25 00:06 rpmcginty

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (main@edc9ee7). Learn more about missing BASE report. Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2420   +/-   ##
=======================================
  Coverage        ?   98.13%           
=======================================
  Files           ?       66           
  Lines           ?     8273           
  Branches        ?      828           
=======================================
  Hits            ?     8119           
  Misses          ?      115           
  Partials        ?       39           
Flag Coverage Δ
unittests 98.13% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Jun 13 '25 16:06 codecov[bot]

CodSpeed Performance Report

Merging #2420 will not alter performance

Comparing rpmcginty:patch-1 (56115a2) with main (5553dd2)

Summary

✅ 32 untouched benchmarks

codspeed-hq[bot] avatar Jun 13 '25 16:06 codspeed-hq[bot]