Skip to content

Commit

Permalink
bumped libopenapi
Browse files Browse the repository at this point in the history
Signed-off-by: quobix <dave@quobix.com>
  • Loading branch information
daveshanley committed Jan 13, 2024
1 parent f24b5ac commit 6dd4fe4
Showing 4 changed files with 12 additions and 16 deletions.
10 changes: 2 additions & 8 deletions daemon/handle_request.go
Original file line number Diff line number Diff line change
@@ -252,20 +252,14 @@ func (ws *WiretapService) handleMockRequest(
// build a mock based on the request.
mock, mockStatus, mockErr := ws.mockEngine.GenerateResponse(request.HttpRequest)

// validate http request.
ws.ValidateRequest(request, newReq)

// sleep for a few ms, this prevents responses from being sent out of order.
time.Sleep(2 * time.Millisecond)

//for i := range validationErrs {
// for y := range validationErrs[i].SchemaValidationErrors {
// validationErrs[i].SchemaValidationErrors[y].ReferenceExample = ws.mockEngine.
// }
//}

headers := make(map[string]any)

// wiretap needs to work from anywhere, so allow everything.
headers := make(map[string]any)
setCORSHeaders(headers)
headers["Content-Type"] = "application/json"

5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ require (
github.com/google/uuid v1.5.0
github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb // indirect
github.com/pb33f/harhar v0.0.0-20240111233202-e393c2a39a60
github.com/pb33f/libopenapi v0.14.6
github.com/pb33f/libopenapi v0.14.7
github.com/pb33f/libopenapi-validator v0.0.39
github.com/pb33f/ranch v0.4.0
github.com/pterm/pterm v0.12.74
@@ -50,7 +50,7 @@ require (
github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
@@ -64,6 +64,7 @@ require (
atomicgo.dev/schedule v0.1.0 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -228,8 +228,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU=
github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc=
github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
@@ -291,8 +291,8 @@ github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pb33f/harhar v0.0.0-20240111233202-e393c2a39a60 h1:5Nt5F1BxaYfbLolyD0kIflqoOOnzZlp8rmvZL93HbDc=
github.com/pb33f/harhar v0.0.0-20240111233202-e393c2a39a60/go.mod h1:sJHiXr/Rdkg2j8P5FYGEcqPP1ptdk8zn6xeJ3aZfAvw=
github.com/pb33f/libopenapi v0.14.6 h1:4WCPV3MAjR0YlZwhCpfXyVKXtqUjhofF5qcufV/l7R4=
github.com/pb33f/libopenapi v0.14.6/go.mod h1:m+4Pwri31UvcnZjuP8M7TlbR906DXJmMvYsbis234xg=
github.com/pb33f/libopenapi v0.14.7 h1:mdgLWsi7My2RcnL5jT9V+Q8xcSaWlAclyjKX1QjBtvo=
github.com/pb33f/libopenapi v0.14.7/go.mod h1:m+4Pwri31UvcnZjuP8M7TlbR906DXJmMvYsbis234xg=
github.com/pb33f/libopenapi-validator v0.0.39 h1:L9DPaCx53iaYCqSzxVy4TxJilQzEunR25oN0bSdt+LQ=
github.com/pb33f/libopenapi-validator v0.0.39/go.mod h1:fPxkgnqzN6eRJHpkU3bRL5EeAr1ikNfFV2UmYtpRQ4k=
github.com/pb33f/ranch v0.4.0 h1:fve9Lozc9m0IGkygWD3EFkBtbRua+2gyi9yxYHvufh4=
@@ -555,8 +555,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
1 change: 1 addition & 0 deletions har/build_har.go
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ func BuildHAR(har []byte) (*harhar.HAR, error) {
var harFile harhar.HAR

err := json.Unmarshal(har, &harFile)

if err != nil {
return nil, err
}

0 comments on commit 6dd4fe4

Please # to comment.