Skip to content

Commit d6c58be

Browse files
committed
updated go version
* updated minimum go version required to go1.19 (like most other go-openapi repos) * fixed wrong badges/links in README * relinted, removing deprecated stdlib function calls Signed-off-by: Frederic BIDON <[email protected]>
1 parent 95bb41d commit d6c58be

File tree

7 files changed

+59
-53
lines changed

7 files changed

+59
-53
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# OAI object model
1+
# OpenAPI v2 object model [![Build Status](https://github.com/go-openapi/spec/actions/workflows/go-test.yaml/badge.svg)](https://github.com/go-openapi/strfmt/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/spec/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/spec)
22

3-
[![Build Status](https://travis-ci.org/go-openapi/spec.svg?branch=master)](https://travis-ci.org/go-openapi/spec)
4-
<!-- [![Build status](https://ci.appveyor.com/api/projects/status/x377t5o9ennm847o/branch/master?svg=true)](https://ci.appveyor.com/project/casualjim/go-openapi/spec/branch/master) -->
5-
[![codecov](https://codecov.io/gh/go-openapi/spec/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/spec)
63
[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io)
74
[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/spec/master/LICENSE)
85
[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/spec.svg)](https://pkg.go.dev/github.com/go-openapi/spec)

circular_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package spec
22

33
import (
44
"encoding/json"
5-
"io/ioutil"
65
"net/http"
76
"net/http/httptest"
7+
"os"
88
"path/filepath"
99
"testing"
1010
"time"
@@ -175,7 +175,7 @@ func TestExpandCircular_Bitbucket(t *testing.T) {
175175

176176
func TestExpandCircular_ResponseWithRoot(t *testing.T) {
177177
rootDoc := new(Swagger)
178-
b, err := ioutil.ReadFile(filepath.Join("fixtures", "more_circulars", "resp.json"))
178+
b, err := os.ReadFile(filepath.Join("fixtures", "more_circulars", "resp.json"))
179179
require.NoError(t, err)
180180

181181
require.NoError(t, json.Unmarshal(b, rootDoc))

debug_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package spec
1616

1717
import (
18-
"io/ioutil"
1918
"os"
2019
"sync"
2120
"testing"
@@ -28,7 +27,7 @@ var (
2827
)
2928

3029
func TestDebug(t *testing.T) {
31-
tmpFile, _ := ioutil.TempFile("", "debug-test")
30+
tmpFile, _ := os.CreateTemp("", "debug-test")
3231
tmpName := tmpFile.Name()
3332
defer func() {
3433
Debug = false

expander_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package spec
1616

1717
import (
1818
"encoding/json"
19-
"io/ioutil"
19+
"io"
2020
"log"
2121
"net/http"
2222
"net/http/httptest"
@@ -380,7 +380,7 @@ func TestExpand_ContinueOnError(t *testing.T) {
380380
specPath := filepath.Join("fixtures", "expansion", "missingRef.json")
381381

382382
defer log.SetOutput(os.Stdout)
383-
log.SetOutput(ioutil.Discard)
383+
log.SetOutput(io.Discard)
384384

385385
// missing $ref in spec
386386
missingRefDoc, err := jsonDoc(specPath)
@@ -816,7 +816,7 @@ func resolutionContextServer() *httptest.Server {
816816
server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
817817
if req.URL.Path == "/resolution.json" {
818818

819-
b, _ := ioutil.ReadFile(filepath.Join(specs, "resolution.json"))
819+
b, _ := os.ReadFile(filepath.Join(specs, "resolution.json"))
820820
var ctnt map[string]interface{}
821821
_ = json.Unmarshal(b, &ctnt)
822822
ctnt["id"] = servedAt
@@ -828,7 +828,7 @@ func resolutionContextServer() *httptest.Server {
828828
return
829829
}
830830
if req.URL.Path == "/resolution2.json" {
831-
b, _ := ioutil.ReadFile(filepath.Join(specs, "resolution2.json"))
831+
b, _ := os.ReadFile(filepath.Join(specs, "resolution2.json"))
832832
var ctnt map[string]interface{}
833833
_ = json.Unmarshal(b, &ctnt)
834834
ctnt["id"] = servedAt
@@ -936,7 +936,7 @@ func TestExpand_RemoteRefWithNestedResolutionContextWithFragment(t *testing.T) {
936936
func TestExpand_TransitiveRefs(t *testing.T) {
937937
basePath := filepath.Join(specs, "todos.json")
938938

939-
rawSpec, err := ioutil.ReadFile(basePath)
939+
rawSpec, err := os.ReadFile(basePath)
940940
require.NoError(t, err)
941941

942942
var spec *Swagger

go.mod

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
module github.com/go-openapi/spec
22

33
require (
4-
github.com/go-openapi/jsonpointer v0.19.5
5-
github.com/go-openapi/jsonreference v0.20.0
6-
github.com/go-openapi/swag v0.19.15
7-
github.com/stretchr/testify v1.6.1
4+
github.com/go-openapi/jsonpointer v0.20.0
5+
github.com/go-openapi/jsonreference v0.20.2
6+
github.com/go-openapi/swag v0.22.4
7+
github.com/stretchr/testify v1.8.4
88
gopkg.in/yaml.v2 v2.4.0
99
)
1010

11-
go 1.13
11+
require (
12+
github.com/davecgh/go-spew v1.1.1 // indirect
13+
github.com/josharian/intern v1.0.0 // indirect
14+
github.com/mailru/easyjson v0.7.7 // indirect
15+
github.com/pmezard/go-difflib v1.0.0 // indirect
16+
github.com/rogpeppe/go-internal v1.11.0 // indirect
17+
gopkg.in/yaml.v3 v3.0.1 // indirect
18+
)
19+
20+
go 1.19

go.sum

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,41 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
22
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
44
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5-
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
6-
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
7-
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
8-
github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA=
9-
github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo=
10-
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
11-
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
12-
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
5+
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
6+
github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ=
7+
github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA=
8+
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
9+
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
10+
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
11+
github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU=
12+
github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
1313
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
1414
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
15-
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
15+
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
16+
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
1617
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
1718
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
1819
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
1920
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
20-
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
21-
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
22-
github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
23-
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
24-
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
25-
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
21+
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
22+
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
2623
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2724
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
25+
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
26+
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
2827
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
29-
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
30-
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
31-
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
28+
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
29+
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
30+
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
31+
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
32+
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
33+
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
34+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
3235
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
33-
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
34-
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
35-
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
36-
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
36+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
37+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
3738
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
3839
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
3940
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
40-
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ=
41-
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
41+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
42+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

resolver_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package spec
22

33
import (
44
"encoding/json"
5-
"io/ioutil"
65
"net/http"
76
"net/http/httptest"
7+
"os"
88
"path/filepath"
99
"testing"
1010

@@ -132,7 +132,7 @@ func TestResolveRemoteRef_RootSame(t *testing.T) {
132132
defer server.Close()
133133

134134
rootDoc := new(Swagger)
135-
b, err := ioutil.ReadFile(filepath.Join(specs, "refed.json"))
135+
b, err := os.ReadFile(filepath.Join(specs, "refed.json"))
136136
require.NoError(t, err)
137137
require.NoError(t, json.Unmarshal(b, rootDoc))
138138

@@ -160,7 +160,7 @@ func TestResolveRemoteRef_FromFragment(t *testing.T) {
160160
defer server.Close()
161161

162162
rootDoc := new(Swagger)
163-
b, err := ioutil.ReadFile(filepath.Join(specs, "refed.json"))
163+
b, err := os.ReadFile(filepath.Join(specs, "refed.json"))
164164
require.NoError(t, err)
165165
require.NoError(t, json.Unmarshal(b, rootDoc))
166166

@@ -180,7 +180,7 @@ func TestResolveRemoteRef_FromInvalidFragment(t *testing.T) {
180180
defer server.Close()
181181

182182
rootDoc := new(Swagger)
183-
b, err := ioutil.ReadFile(filepath.Join(specs, "refed.json"))
183+
b, err := os.ReadFile(filepath.Join(specs, "refed.json"))
184184
require.NoError(t, err)
185185
require.NoError(t, json.Unmarshal(b, rootDoc))
186186

@@ -199,7 +199,7 @@ func TestResolveRemoteRef_FromInvalidFragment(t *testing.T) {
199199
// defer server.Close()
200200
//
201201
// rootDoc := new(Swagger)
202-
// b, err := ioutil.ReadFile("fixtures/specs/refed.json")
202+
// b, err := os.ReadFile("fixtures/specs/refed.json")
203203
// require.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc))
204204
//
205205
// var tgt Schema
@@ -217,7 +217,7 @@ func TestResolveRemoteRef_ToParameter(t *testing.T) {
217217
defer server.Close()
218218

219219
rootDoc := new(Swagger)
220-
b, err := ioutil.ReadFile(filepath.Join(specs, "refed.json"))
220+
b, err := os.ReadFile(filepath.Join(specs, "refed.json"))
221221
require.NoError(t, err)
222222
require.NoError(t, json.Unmarshal(b, rootDoc))
223223

@@ -242,7 +242,7 @@ func TestResolveRemoteRef_ToPathItem(t *testing.T) {
242242
defer server.Close()
243243

244244
rootDoc := new(Swagger)
245-
b, err := ioutil.ReadFile(filepath.Join(specs, "refed.json"))
245+
b, err := os.ReadFile(filepath.Join(specs, "refed.json"))
246246
require.NoError(t, err)
247247
require.NoError(t, json.Unmarshal(b, rootDoc))
248248

@@ -261,7 +261,7 @@ func TestResolveRemoteRef_ToResponse(t *testing.T) {
261261
defer server.Close()
262262

263263
rootDoc := new(Swagger)
264-
b, err := ioutil.ReadFile(filepath.Join(specs, "refed.json"))
264+
b, err := os.ReadFile(filepath.Join(specs, "refed.json"))
265265
require.NoError(t, err)
266266
require.NoError(t, json.Unmarshal(b, rootDoc))
267267

@@ -312,7 +312,7 @@ func TestResolveLocalRef_FromInvalidFragment(t *testing.T) {
312312

313313
func TestResolveLocalRef_Parameter(t *testing.T) {
314314
rootDoc := new(Swagger)
315-
b, err := ioutil.ReadFile(filepath.Join(specs, "refed.json"))
315+
b, err := os.ReadFile(filepath.Join(specs, "refed.json"))
316316
require.NoError(t, err)
317317

318318
basePath := filepath.Join(specs, "refed.json")
@@ -335,7 +335,7 @@ func TestResolveLocalRef_Parameter(t *testing.T) {
335335

336336
func TestResolveLocalRef_PathItem(t *testing.T) {
337337
rootDoc := new(Swagger)
338-
b, err := ioutil.ReadFile(filepath.Join(specs, "refed.json"))
338+
b, err := os.ReadFile(filepath.Join(specs, "refed.json"))
339339
require.NoError(t, err)
340340

341341
basePath := filepath.Join(specs, "refed.json")
@@ -352,7 +352,7 @@ func TestResolveLocalRef_PathItem(t *testing.T) {
352352

353353
func TestResolveLocalRef_Response(t *testing.T) {
354354
rootDoc := new(Swagger)
355-
b, err := ioutil.ReadFile(filepath.Join(specs, "refed.json"))
355+
b, err := os.ReadFile(filepath.Join(specs, "refed.json"))
356356
require.NoError(t, err)
357357

358358
basePath := filepath.Join(specs, "refed.json")

0 commit comments

Comments
 (0)