Open lukap3 opened 2 years ago
Merging #91 (1ea0568) into master (fe54d35) will increase coverage by
0.02%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #91 +/- ##
==========================================
+ Coverage 94.37% 94.40% +0.02%
==========================================
Files 7 7
Lines 978 983 +5
==========================================
+ Hits 923 928 +5
Misses 39 39
Partials 16 16
Impacted Files | Coverage Δ | |
---|---|---|
openapi/generator.go | 93.98% <100.00%> (+0.04%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@lukap3 Need a rebase.
@wI2L done! thanks
Defining N>1 different types with the same name and generating a schema using them results in the last type "overriding" the rest without any error/warning.
There is a simple solution: using
UseFullSchemaNames(true)
adds the package name as a prefix which should resolve the conflict (except in cases where the package name is also the same)However, the issue remains: there is no error for these conflicts and it can result in incorrect schemas being generated without the user's knowledge.
This PR adds an error to the generator for cases when multiple types defined with the same name (even when using full schema names)