-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
Reproducer:
import (
"fmt"
"github.com/invopop/jsonschema"
)
func main() {
reflector := jsonschema.Reflector{ExpandedStruct: true}
schema := reflector.Reflect("some string")
fmt.Printf("%v", schema)
}panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4d8eb6]
goroutine 1 [running]:
github.com/invopop/jsonschema.(*Reflector).ReflectFromType(0xc0000b5eb8, {0x541dd8, 0x4ed2c0})
/home/slinkydeveloper/go/pkg/mod/github.com/invopop/[email protected]/reflect.go:191 +0x196
github.com/invopop/jsonschema.(*Reflector).Reflect(0x0?, {0x4ed2c0?, 0x53f418?})
/home/slinkydeveloper/go/pkg/mod/github.com/invopop/[email protected]/reflect.go:175 +0x45
Metadata
Metadata
Assignees
Labels
No labels