koxudaxi / datamodel-code-generator

Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.
https://koxudaxi.github.io/datamodel-code-generator/
MIT License
2.65k stars 296 forks source link

Feature/fix hyphen in reference #2000

Closed luca-knaack-webcom closed 3 months ago

luca-knaack-webcom commented 3 months ago

This PR would fix #1141. There are two relevant positions in the codebase, where the module and import names have to be altered to change - to _.

This PR builds on top of the changes made in #1999, which is why this PR contains more changes than it should. The reals changes are just two lines.

codecov[bot] commented 3 months ago

Codecov Report

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

Please upload report for BASE (main@b1c0f22). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2000 +/- ## ======================================= Coverage ? 98.85% ======================================= Files ? 37 Lines ? 4201 Branches ? 979 ======================================= Hits ? 4153 Misses ? 30 Partials ? 18 ``` | [Flag](https://app.codecov.io/gh/koxudaxi/datamodel-code-generator/pull/2000/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Koudai+Aono) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/koxudaxi/datamodel-code-generator/pull/2000/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Koudai+Aono) | `98.52% <100.00%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Koudai+Aono#carryforward-flags-in-the-pull-request-comment) to find out more.

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

codspeed-hq[bot] commented 3 months ago

CodSpeed Performance Report

Merging #2000 will not alter performance

Comparing luca-knaack-webcom:feature/fix-hyphen-in-reference (82f5eac) with main (b1c0f22)

Summary

✅ 29 untouched benchmarks

luca-knaack-webcom commented 3 months ago

code from this PR is already contained in #1999