anz-bank / sysl

Sysl (pronounced "sizzle") is a system specification language
https://sysl.io
Apache License 2.0
122 stars 42 forks source link

Fix an issue where nested object type names would have repeated prefixes #963

Closed ghost closed 4 years ago

ghost commented 4 years ago

See the added test case, basically heavily nested objects would generate types like:

!type Foo_Bar_Baz_Foo_Bar_Baz_obj ....

this fix would remove the duplication

codecov[bot] commented 4 years ago

Codecov Report

Merging #963 into master will increase coverage by 1.16%. The diff coverage is 87.89%.

@@            Coverage Diff             @@
##           master     #963      +/-   ##
==========================================
+ Coverage   83.35%   84.51%   +1.16%     
==========================================
  Files          73       75       +2     
  Lines       10609    10487     -122     
==========================================
+ Hits         8843     8863      +20     
+ Misses       1432     1313     -119     
+ Partials      334      311      -23     
Impacted Files Coverage Δ
pkg/pbutil/output.go 76.00% <ø> (-0.48%) :arrow_down:
pkg/syslwrapper/app.go 93.44% <ø> (-0.05%) :arrow_down:
pkg/syslwrapper/test_helper.go 57.89% <ø> (-1.42%) :arrow_down:
pkg/importer/importer.go 63.15% <63.15%> (ø)
pkg/mod/gomod.go 73.68% <66.66%> (+1.27%) :arrow_up:
pkg/mod/module.go 66.66% <72.72%> (+0.95%) :arrow_up:
pkg/parse/parse.go 85.34% <73.07%> (+1.37%) :arrow_up:
pkg/importer/openapi.go 85.27% <84.46%> (-4.17%) :arrow_down:
pkg/parse/listener_impl.go 89.62% <86.48%> (+0.11%) :arrow_up:
pkg/importer/swagger.go 81.48% <88.88%> (+1.88%) :arrow_up:
... and 22 more