nicolaferraro opened a new issue #561: Error in jsonschema gen
URL: https://github.com/apache/camel-k/issues/561
 
 
   I get this error while trying to `make build-resources`. Any idea?
   
   ```
   ./script/embed_resources.sh deploy
   go run cmd/util/json-schema-gen/jsonschemagen.go --out=./assets/json-schema
   Write Integration json-schema to: assets/json-schema/Integration.json
   Write IntegrationContext json-schema to: 
assets/json-schema/IntegrationContext.json
   panic: reflect: NumField of non-struct type
   
   goroutine 1 [running]:
   reflect.(*rtype).NumField(0xa94120, 0x6)
           /usr/local/go/src/reflect/type.go:1019 +0x5e
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectStructFields(0xc4200e10cd,
 0xc42020c1c0, 0xc4201c4e40, 0xb96c20, 0xa94120)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:269
 +0xc0
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectStructFields(0xc4200e10cd,
 0xc42020c1c0, 0xc4201c4e40, 0xb96c20, 0xaaa9c0)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:274
 +0x3f9
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectStruct(0xc4200e10cd,
 0xc4201c4e40, 0xb96c20, 0xaaa9c0, 0xef56e0)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:257
 +0x1c7
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectTypeToSchema(0xc4200e10cd,
 0xc4201c4e40, 0xb96c20, 0xaaa9c0, 0x0)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:191
 +0x90b
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectStructFields(0xc4200e10cd,
 0xc42020a540, 0xc4201c4e40, 0xb96c20, 0xacc800)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:282
 +0x1ea
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectStruct(0xc4200e10cd,
 0xc4201c4e40, 0xb96c20, 0xacc800, 0xef56e0)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:257
 +0x1c7
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectTypeToSchema(0xc4200e10cd,
 0xc4201c4e40, 0xb96c20, 0xacc800, 0x0)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:191
 +0x90b
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectStructFields(0xc4200e10cd,
 0xc42020a000, 0xc4201c4e40, 0xb96c20, 0xa9a4e0)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:282
 +0x1ea
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectStruct(0xc4200e10cd,
 0xc4201c4e40, 0xb96c20, 0xa9a4e0, 0xef56e0)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:257
 +0x1c7
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectTypeToSchema(0xc4200e10cd,
 0xc4201c4e40, 0xb96c20, 0xa9a4e0, 0x0)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:191
 +0x90b
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectStructFields(0xc4200e10cd,
 0xc4201ff500, 0xc4201c4e40, 0xb96c20, 0xa9a360)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:282
 +0x1ea
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectStruct(0xc4200e10cd,
 0xc4201c4e40, 0xb96c20, 0xa9a360, 0xef56e0)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:257
 +0x1c7
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).reflectTypeToSchema(0xc4200e10cd,
 0xc4201c4e40, 0xb96c20, 0xa9a360, 0x0)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:191
 +0x90b
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.(*Reflector).ReflectFromType(0xc4200e10cd,
 0xb96c20, 0xa9a360, 0x0)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:129
 +0x34d
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.ReflectFromType(0xb96c20,
 0xa9a360, 0xc42000e290)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:82
 +0x4b
   
github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema.Reflect(0xa9a360,
 0xc42019e200, 0xc4201e4800)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/alecthomas/jsonschema/reflect.go:76
 +0x50
   main.main.func1(0xc42011d680, 0xc420073610, 0x0, 0x1)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/cmd/util/json-schema-gen/jsonschemagen.go:50
 +0xc5
   
github.com/apache/camel-k/vendor/github.com/spf13/cobra.(*Command).execute(0xc42011d680,
 0xc42000c090, 0x1, 0x1, 0xc42011d680, 0xc42000c090)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/spf13/cobra/command.go:766
 +0x2c1
   
github.com/apache/camel-k/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc42011d680,
 0x0, 0xb12ae1, 0x31)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/spf13/cobra/command.go:852
 +0x30a
   
github.com/apache/camel-k/vendor/github.com/spf13/cobra.(*Command).Execute(0xc42011d680,
 0xc4200735e0, 0xaf54db)
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/spf13/cobra/command.go:800
 +0x2b
   main.main()
           
/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/cmd/util/json-schema-gen/jsonschemagen.go:81
 +0x373
   exit status 2
   make: *** [Makefile:65: build-resources] Error 1
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to