anz-bank / sysl

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

Feature/simpler openapi importing #933

Closed ghost closed 4 years ago

ghost commented 4 years ago

Rewrites the swagger/openapi importer to be much simpler! will automatically convert importer swagger2 -> openapi3 references correctly.

This version creates far fewer alias -> string types which should improve the sysl clarity (may cause some breakages but should be minor).

edit: The openapi.go change is basically a re-write, dont bother looking at the diff, just look at the new file version

codecov[bot] commented 4 years ago

Codecov Report

Merging #933 into master will increase coverage by 0.67%. The diff coverage is 83.77%.

@@            Coverage Diff             @@
##           master     #933      +/-   ##
==========================================
+ Coverage   83.35%   84.03%   +0.67%     
==========================================
  Files          73       74       +1     
  Lines       10609    10301     -308     
==========================================
- Hits         8843     8656     -187     
+ Misses       1432     1335      -97     
+ Partials      334      310      -24     
Impacted Files Coverage Δ
pkg/pbutil/output.go 76.00% <ø> (-0.48%) :arrow_down:
pkg/parse/listener_impl.go 89.50% <54.54%> (-0.01%) :arrow_down:
pkg/importer/importer.go 63.15% <63.15%> (ø)
pkg/mod/gomod.go 73.68% <66.66%> (+1.27%) :arrow_up:
pkg/parse/parse.go 83.47% <69.56%> (-0.50%) :arrow_down:
pkg/mod/module.go 66.66% <72.72%> (+0.95%) :arrow_up:
pkg/importer/formats.go 77.27% <77.27%> (ø)
pkg/importer/openapi.go 81.73% <80.71%> (-7.72%) :arrow_down:
pkg/importer/swagger.go 81.48% <88.88%> (+1.88%) :arrow_up:
pkg/importer/xsd.go 91.01% <95.23%> (+0.64%) :arrow_up:
... and 13 more