Skip to content

Commit 9a1815e

Browse files
Merge pull request #11 from oasdiff/bump/yaml-v0.0.7
fix: sequence item Name + bump yaml3 v0.0.6
2 parents 07cd08a + a2f8799 commit 9a1815e

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/gorilla/mux v1.8.0
88
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
99
github.com/oasdiff/yaml v0.0.7
10-
github.com/oasdiff/yaml3 v0.0.5
10+
github.com/oasdiff/yaml3 v0.0.6
1111
github.com/perimeterx/marshmallow v1.1.5
1212
github.com/stretchr/testify v1.9.0
1313
github.com/woodsbury/decimal128 v1.3.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9
2020
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
2121
github.com/oasdiff/yaml v0.0.7 h1:r/BR4tqb+W/5fSV6RknYrfBa+PSZnRRvZ/nUnDdepFQ=
2222
github.com/oasdiff/yaml v0.0.7/go.mod h1:EaJ6/lcrRLK+syawtvtrHdbrrln4/SUmQw6aBTIlaMs=
23-
github.com/oasdiff/yaml3 v0.0.5 h1:jD51TPEvs+yDMkb3Yl2Q5SVpjU7GZze4oHZSEC5/w+4=
24-
github.com/oasdiff/yaml3 v0.0.5/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o=
23+
github.com/oasdiff/yaml3 v0.0.6 h1:459QJwIK3pqFs91pIbH/XxCld0ugHd4/F8xHkFjaJPo=
24+
github.com/oasdiff/yaml3 v0.0.6/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o=
2525
github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s=
2626
github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw=
2727
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

openapi3/origin.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,12 @@ func originFromSeq(s []any) *Origin {
8787
count := toInt(s[idx])
8888
idx++
8989
locs := make([]Location, count)
90-
for j := 0; j < count && idx+1 < len(s); j++ {
91-
delta := toInt(s[idx])
92-
col := toInt(s[idx+1])
93-
locs[j] = Location{File: file, Line: keyLine + delta, Column: col}
94-
idx += 2
90+
for j := 0; j < count && idx+2 < len(s); j++ {
91+
name, _ := s[idx].(string)
92+
delta := toInt(s[idx+1])
93+
col := toInt(s[idx+2])
94+
locs[j] = Location{File: file, Line: keyLine + delta, Column: col, Name: name}
95+
idx += 3
9596
}
9697
o.Sequences[sname] = locs
9798
}

0 commit comments

Comments
 (0)