Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ linters:
disable:
- depguard
- funlen
- goconst
- godox
- gomodguard
- gomodguard_v2
- exhaustruct
- nlreturn
- nonamedreturns
Expand Down
2 changes: 1 addition & 1 deletion debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestDebug(t *testing.T) {
Debug = false
_ = tmpFile.Close()

flushed, _ := os.Open(tmpName) //nolint:gosec // test file, path is from os.CreateTemp
flushed, _ := os.Open(tmpName)
buf := make([]byte, 500)
_, _ = flushed.Read(buf)
specLogger.SetOutput(os.Stdout)
Expand Down
6 changes: 5 additions & 1 deletion header.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ func (h Header) MarshalJSON() ([]byte, error) {
if err != nil {
return nil, err
}
return jsonutils.ConcatJSON(b1, b2, b3), nil
b4, err := json.Marshal(h.VendorExtensible)
if err != nil {
return nil, err
}
return jsonutils.ConcatJSON(b1, b2, b3, b4), nil
}

// UnmarshalJSON unmarshals this header from JSON.
Expand Down
1 change: 1 addition & 0 deletions header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const headerJSON = `{

func TestIntegrationHeader(t *testing.T) {
assert.JSONUnmarshalAsT(t, header, headerJSON)
assert.JSONMarshalAsT(t, headerJSON, header)
}

func TestJSONLookupHeader(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion schema_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (r *schemaLoader) updateBasePath(transitive *schemaLoader, basePath string)

func (r *schemaLoader) resolveRef(ref *Ref, target any, basePath string) error {
tgt := reflect.ValueOf(target)
if tgt.Kind() != reflect.Ptr {
if tgt.Kind() != reflect.Pointer {
return ErrResolveRefNeedsAPointer
}

Expand Down
Loading