anz-bank / sysl

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

Refactor importer to use interface #899

Closed cuminandpaprika closed 4 years ago

cuminandpaprika commented 4 years ago

This PR aims to make importers more generic in the way they are called. It also simplifies the way formats are detected and more rigorously checks the file format.

Changes proposed in this pull request:

Checklist:

codecov[bot] commented 4 years ago

Codecov Report

Merging #899 into master will increase coverage by 0.07%. The diff coverage is 82.02%.

@@            Coverage Diff             @@
##           master     #899      +/-   ##
==========================================
+ Coverage   83.35%   83.42%   +0.07%     
==========================================
  Files          73       75       +2     
  Lines       10609    10710     +101     
==========================================
+ Hits         8843     8935      +92     
- Misses       1432     1440       +8     
- Partials      334      335       +1     
Impacted Files Coverage Δ
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/importer/swagger.go 76.00% <73.33%> (-3.60%) :arrow_down:
pkg/importer/openapi.go 91.62% <83.95%> (+2.17%) :arrow_up:
pkg/importer/formats.go 90.90% <90.90%> (ø)
pkg/importer/xsd.go 91.01% <95.23%> (+0.64%) :arrow_up:
pkg/importer/utils.go 88.23% <100.00%> (+0.35%) :arrow_up:
...g/mermaid/integrationdiagram/integrationdiagram.go 86.66% <100.00%> (+2.29%) :arrow_up:
pkg/mod/module.go 67.56% <100.00%> (+1.85%) :arrow_up:
... and 4 more