You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# when located in the `schemas` folder of the signal k specification
go-jsonschema -p signalk -o signalk.go -v signalk.json
go-jsonschema: Loading signalk.json
go-jsonschema: Failed: could not generate typefor field "resources": cannot generate referenced type: value must point to definition within file: 'groups/resources.json#'
I'll gladly help out any way I can but I'll gladly get some pointers on where to start looking.
The text was updated successfully, but these errors were encountered:
kmpm
changed the title
Fails to generate for Signal K, cannot generate referenced typ.
Fails to generate for Signal K, cannot generate referenced type.
Dec 5, 2023
hi @kmpm, thanks for reporting this. I tried building from main and running the tool, and I was able to reproduce the problem. There are two things causing this that might require some work: the first one being go-jsonschema is not able to handle #-terminated urls in refs, and the second one is that it does not handle the way array items are specified in one of the files. As a quick fix, you can remove all the # from the end of urls, and patch definitions.json#definitions/waypoint.feature.geometry.coordinates 's items to a supported format.
Two pics are worth two thousands words:
Signal K has a JSON schema at https://github.com/SignalK/specification/tree/master/schemas which go-jsonschema fails to generate code for.
I'll gladly help out any way I can but I'll gladly get some pointers on where to start looking.
The text was updated successfully, but these errors were encountered: