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 importer format detection for OpenAPI and Swagger #925

Closed cuminandpaprika closed 4 years ago

cuminandpaprika commented 4 years ago

Fixes a bug with file format detection when the below is used, which is valid openapi

openapi: 3.0.0

Checklist:

codecov[bot] commented 4 years ago

Codecov Report

Merging #925 into master will decrease coverage by 0.02%. The diff coverage is 83.38%.

@@            Coverage Diff             @@
##           master     #925      +/-   ##
==========================================
- Coverage   83.35%   83.33%   -0.03%     
==========================================
  Files          73       75       +2     
  Lines       10609    10744     +135     
==========================================
+ Hits         8843     8953     +110     
- Misses       1432     1451      +19     
- Partials      334      340       +6     
Impacted Files Coverage Δ
pkg/parse/listener_impl.go 89.59% <62.50%> (+0.08%) :arrow_up:
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/swagger.go 76.00% <73.33%> (-3.60%) :arrow_down:
pkg/pbutil/output.go 76.00% <75.00%> (-0.48%) :arrow_down:
pkg/importer/formats.go 77.27% <77.27%> (ø)
pkg/importer/openapi.go 89.42% <88.98%> (-0.02%) :arrow_down:
pkg/importer/xsd.go 91.01% <95.23%> (+0.64%) :arrow_up:
... and 5 more